| author | |
| committer | |
| log | 3a7fe0d0105ed69354960896a5d9eadd9dee3563 |
| tree | 9a7558f2ea6c26df4889d700f5368777258d4423 |
| parent | 37f6f7990e882ac9869513cf920f8cd0c4850039 |
| parent | 59a67e9a43fe28537e9d0cf7fd346aaba8a6ce77 |
| signature |
libc: update macos headers236 files changed, 82764 insertions(+), 30487 deletions(-)
lib/libc/darwin/libSystem.11.tbd+11-11| ... | ... | @@ -4,17 +4,17 @@ targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatal |
| 4 | 4 | arm64e-macos, arm64e-maccatalyst ] |
| 5 | 5 | uuids: |
| 6 | 6 | - target: x86_64-macos |
| 7 | value: 89E331F9-9A00-3EA4-B49F-FA2B91AE9182 | |
| 7 | value: EADFB1D1-E113-35B4-BD2D-C1E4C38010D4 | |
| 8 | 8 | - target: x86_64-maccatalyst |
| 9 | value: 89E331F9-9A00-3EA4-B49F-FA2B91AE9182 | |
| 9 | value: EADFB1D1-E113-35B4-BD2D-C1E4C38010D4 | |
| 10 | 10 | - target: arm64-macos |
| 11 | 11 | value: 00000000-0000-0000-0000-000000000000 |
| 12 | 12 | - target: arm64-maccatalyst |
| 13 | 13 | value: 00000000-0000-0000-0000-000000000000 |
| 14 | 14 | - target: arm64e-macos |
| 15 | value: A9F7E132-0FFC-31FC-83C6-3848CA460DF3 | |
| 15 | value: A03485B7-4C44-3F47-8BF9-5D6E1BE0CF27 | |
| 16 | 16 | - target: arm64e-maccatalyst |
| 17 | value: A9F7E132-0FFC-31FC-83C6-3848CA460DF3 | |
| 17 | value: A03485B7-4C44-3F47-8BF9-5D6E1BE0CF27 | |
| 18 | 18 | install-name: '/usr/lib/libSystem.B.dylib' |
| 19 | 19 | current-version: 1292.100.5 |
| 20 | 20 | reexported-libraries: |
| ... | ... | @@ -2058,19 +2058,19 @@ targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatal |
| 2058 | 2058 | arm64e-macos, arm64e-maccatalyst ] |
| 2059 | 2059 | uuids: |
| 2060 | 2060 | - target: x86_64-macos |
| 2061 | value: A78F60F4-ABD5-3646-93F9-1F1109C4552D | |
| 2061 | value: 62A19DE4-50C5-3866-B5B2-43220E379C3B | |
| 2062 | 2062 | - target: x86_64-maccatalyst |
| 2063 | value: A78F60F4-ABD5-3646-93F9-1F1109C4552D | |
| 2063 | value: 62A19DE4-50C5-3866-B5B2-43220E379C3B | |
| 2064 | 2064 | - target: arm64-macos |
| 2065 | value: B7A2A355-3D98-3BBF-82CC-A82E05B30F1B | |
| 2065 | value: C11F3472-54B1-3A61-A02F-6A80EA06F414 | |
| 2066 | 2066 | - target: arm64-maccatalyst |
| 2067 | value: B7A2A355-3D98-3BBF-82CC-A82E05B30F1B | |
| 2067 | value: C11F3472-54B1-3A61-A02F-6A80EA06F414 | |
| 2068 | 2068 | - target: arm64e-macos |
| 2069 | value: 1B63FA43-CA44-3EB6-BF55-54F2E306B3CE | |
| 2069 | value: D4C172DA-4E97-32E4-8969-C738E4AC9559 | |
| 2070 | 2070 | - target: arm64e-maccatalyst |
| 2071 | value: 1B63FA43-CA44-3EB6-BF55-54F2E306B3CE | |
| 2071 | value: D4C172DA-4E97-32E4-8969-C738E4AC9559 | |
| 2072 | 2072 | install-name: '/usr/lib/system/libsystem_kernel.dylib' |
| 2073 | current-version: 7195.101.1 | |
| 2073 | current-version: 7195.101.2 | |
| 2074 | 2074 | parent-umbrella: |
| 2075 | 2075 | - targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatalyst, |
| 2076 | 2076 | arm64e-macos, arm64e-maccatalyst ] |
lib/libc/darwin/libSystem.12.tbd+422-365| ... | ... | @@ -4,19 +4,19 @@ targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatal |
| 4 | 4 | arm64e-macos, arm64e-maccatalyst ] |
| 5 | 5 | uuids: |
| 6 | 6 | - target: x86_64-macos |
| 7 | value: 2F242680-1523-3527-B7BA-13F7398854BF | |
| 7 | value: 5E73061C-E99B-3651-BD84-E34B6365E97D | |
| 8 | 8 | - target: x86_64-maccatalyst |
| 9 | value: 2F242680-1523-3527-B7BA-13F7398854BF | |
| 9 | value: 5E73061C-E99B-3651-BD84-E34B6365E97D | |
| 10 | 10 | - target: arm64-macos |
| 11 | 11 | value: 00000000-0000-0000-0000-000000000000 |
| 12 | 12 | - target: arm64-maccatalyst |
| 13 | 13 | value: 00000000-0000-0000-0000-000000000000 |
| 14 | 14 | - target: arm64e-macos |
| 15 | value: 679CDB15-D472-38E8-8840-B38874010D51 | |
| 15 | value: DEE4A1ED-F9DF-3515-BE62-166170214E4C | |
| 16 | 16 | - target: arm64e-maccatalyst |
| 17 | value: 679CDB15-D472-38E8-8840-B38874010D51 | |
| 17 | value: DEE4A1ED-F9DF-3515-BE62-166170214E4C | |
| 18 | 18 | install-name: '/usr/lib/libSystem.B.dylib' |
| 19 | current-version: 1311 | |
| 19 | current-version: 1311.100.3 | |
| 20 | 20 | reexported-libraries: |
| 21 | 21 | - targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatalyst, |
| 22 | 22 | arm64e-macos, arm64e-maccatalyst ] |
| ... | ... | @@ -59,17 +59,17 @@ targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatal |
| 59 | 59 | arm64e-macos, arm64e-maccatalyst ] |
| 60 | 60 | uuids: |
| 61 | 61 | - target: x86_64-macos |
| 62 | value: B547F879-03EB-3693-80A2-D588EF6EB815 | |
| 62 | value: 347DF236-2F9C-3EC3-B164-55417B437B97 | |
| 63 | 63 | - target: x86_64-maccatalyst |
| 64 | value: B547F879-03EB-3693-80A2-D588EF6EB815 | |
| 64 | value: 347DF236-2F9C-3EC3-B164-55417B437B97 | |
| 65 | 65 | - target: arm64-macos |
| 66 | 66 | value: 00000000-0000-0000-0000-000000000000 |
| 67 | 67 | - target: arm64-maccatalyst |
| 68 | 68 | value: 00000000-0000-0000-0000-000000000000 |
| 69 | 69 | - target: arm64e-macos |
| 70 | value: BB47A721-69A7-3EEA-9D9B-82F88FFF2641 | |
| 70 | value: E5029B58-FF22-3EC8-9708-A97E2C90C310 | |
| 71 | 71 | - target: arm64e-maccatalyst |
| 72 | value: BB47A721-69A7-3EEA-9D9B-82F88FFF2641 | |
| 72 | value: E5029B58-FF22-3EC8-9708-A97E2C90C310 | |
| 73 | 73 | install-name: '/usr/lib/system/libcache.dylib' |
| 74 | 74 | current-version: 85 |
| 75 | 75 | parent-umbrella: |
| ... | ... | @@ -77,7 +77,7 @@ parent-umbrella: |
| 77 | 77 | arm64e-macos, arm64e-maccatalyst ] |
| 78 | 78 | umbrella: System |
| 79 | 79 | exports: |
| 80 | - targets: [ x86_64-macos, arm64e-macos, x86_64-maccatalyst, arm64e-maccatalyst, | |
| 80 | - targets: [ arm64e-macos, x86_64-macos, x86_64-maccatalyst, arm64e-maccatalyst, | |
| 81 | 81 | arm64-macos, arm64-maccatalyst ] |
| 82 | 82 | symbols: [ _cache_create, _cache_destroy, _cache_get, _cache_get_and_retain, |
| 83 | 83 | _cache_get_cost_hint, _cache_get_count_hint, _cache_get_info, |
| ... | ... | @@ -96,25 +96,25 @@ targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatal |
| 96 | 96 | arm64e-macos, arm64e-maccatalyst ] |
| 97 | 97 | uuids: |
| 98 | 98 | - target: x86_64-macos |
| 99 | value: 2308E152-A258-36BC-A841-D3E8E9F59F43 | |
| 99 | value: C36DA5CF-B8E6-36C1-98EF-FF138B438EE0 | |
| 100 | 100 | - target: x86_64-maccatalyst |
| 101 | value: 2308E152-A258-36BC-A841-D3E8E9F59F43 | |
| 101 | value: C36DA5CF-B8E6-36C1-98EF-FF138B438EE0 | |
| 102 | 102 | - target: arm64-macos |
| 103 | 103 | value: 00000000-0000-0000-0000-000000000000 |
| 104 | 104 | - target: arm64-maccatalyst |
| 105 | 105 | value: 00000000-0000-0000-0000-000000000000 |
| 106 | 106 | - target: arm64e-macos |
| 107 | value: E6CCD148-5E91-3111-BE37-1C19402F4637 | |
| 107 | value: 5AAADB40-420D-326A-AC38-CFE1D81DA1E5 | |
| 108 | 108 | - target: arm64e-maccatalyst |
| 109 | value: E6CCD148-5E91-3111-BE37-1C19402F4637 | |
| 109 | value: 5AAADB40-420D-326A-AC38-CFE1D81DA1E5 | |
| 110 | 110 | install-name: '/usr/lib/system/libcommonCrypto.dylib' |
| 111 | current-version: 60190 | |
| 111 | current-version: 60191.100.1 | |
| 112 | 112 | parent-umbrella: |
| 113 | 113 | - targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatalyst, |
| 114 | 114 | arm64e-macos, arm64e-maccatalyst ] |
| 115 | 115 | umbrella: System |
| 116 | 116 | exports: |
| 117 | - targets: [ x86_64-macos, arm64e-macos, x86_64-maccatalyst, arm64e-maccatalyst, | |
| 117 | - targets: [ arm64e-macos, x86_64-macos, x86_64-maccatalyst, arm64e-maccatalyst, | |
| 118 | 118 | arm64-macos, arm64-maccatalyst ] |
| 119 | 119 | symbols: [ _CCAESCmac, _CCAESCmacCreate, _CCAESCmacDestroy, _CCAESCmacFinal, |
| 120 | 120 | _CCAESCmacOutputSizeFromContext, _CCAESCmacUpdate, _CCBigNumAdd, |
| ... | ... | @@ -190,13 +190,13 @@ tbd-version: 4 |
| 190 | 190 | targets: [ x86_64-macos, arm64-macos, arm64e-macos ] |
| 191 | 191 | uuids: |
| 192 | 192 | - target: x86_64-macos |
| 193 | value: 805EDC9F-9F04-3DF0-96B6-B2530FAE7722 | |
| 193 | value: AD346AFB-8737-3E88-B4C5-25D77181AE44 | |
| 194 | 194 | - target: arm64-macos |
| 195 | value: 2CF1B1A8-6B2C-3DA7-9A6F-B08089C83421 | |
| 195 | value: 0B616B91-A847-3817-B571-4498A1D36CC0 | |
| 196 | 196 | - target: arm64e-macos |
| 197 | value: 92001FF7-799E-3BA8-BF46-5FA01FFB952C | |
| 197 | value: 7E374D5C-9785-3D65-88D2-98B92AD24C78 | |
| 198 | 198 | install-name: '/usr/lib/system/libcompiler_rt.dylib' |
| 199 | current-version: 102.2 | |
| 199 | current-version: 103.1 | |
| 200 | 200 | parent-umbrella: |
| 201 | 201 | - targets: [ x86_64-macos, arm64-macos, arm64e-macos ] |
| 202 | 202 | umbrella: System |
| ... | ... | @@ -237,7 +237,7 @@ exports: |
| 237 | 237 | ___paritysi2, ___parityti2, ___popcountdi2, ___popcountsi2, |
| 238 | 238 | ___popcountti2, ___powixf2, ___subvdi3, ___subvsi3, ___subvti3, |
| 239 | 239 | ___ucmpdi2, ___ucmpti2, ___udivdi3, ___udivmoddi4, ___umoddi3 ] |
| 240 | - targets: [ arm64-macos, x86_64-macos, arm64e-macos ] | |
| 240 | - targets: [ arm64-macos, arm64e-macos, x86_64-macos ] | |
| 241 | 241 | symbols: [ '$ld$hide$os10.10$___chkstk_darwin', '$ld$hide$os10.10$___extendhfsf2', |
| 242 | 242 | '$ld$hide$os10.10$___truncdfhf2', '$ld$hide$os10.10$___truncsfhf2', |
| 243 | 243 | '$ld$hide$os10.10$_atomic_flag_clear', '$ld$hide$os10.10$_atomic_flag_clear_explicit', |
| ... | ... | @@ -407,16 +407,16 @@ exports: |
| 407 | 407 | ___atomic_fetch_or_2, ___atomic_fetch_or_4, ___atomic_fetch_or_8, |
| 408 | 408 | ___atomic_fetch_sub_1, ___atomic_fetch_sub_2, ___atomic_fetch_sub_4, |
| 409 | 409 | ___atomic_fetch_sub_8, ___atomic_fetch_xor_1, ___atomic_fetch_xor_2, |
| 410 | ___atomic_fetch_xor_4, ___atomic_fetch_xor_8, ___atomic_load, | |
| 411 | ___atomic_load_1, ___atomic_load_2, ___atomic_load_4, ___atomic_load_8, | |
| 412 | ___atomic_store, ___atomic_store_1, ___atomic_store_2, ___atomic_store_4, | |
| 413 | ___atomic_store_8, ___chkstk_darwin, ___clear_cache, ___clzti2, | |
| 414 | ___divti3, ___enable_execute_stack, ___extendhfsf2, ___fixdfti, | |
| 415 | ___fixsfti, ___fixunsdfti, ___fixunssfti, ___floattidf, ___floattisf, | |
| 416 | ___floatuntidf, ___floatuntisf, ___gcc_personality_v0, ___gnu_f2h_ieee, | |
| 417 | ___gnu_h2f_ieee, ___modti3, ___muldc3, ___mulsc3, ___powidf2, | |
| 418 | ___powisf2, ___truncdfhf2, ___truncsfhf2, ___udivmodti4, ___udivti3, | |
| 419 | ___umodti3, _atomic_flag_clear, _atomic_flag_clear_explicit, | |
| 410 | ___atomic_fetch_xor_4, ___atomic_fetch_xor_8, ___atomic_is_lock_free, | |
| 411 | ___atomic_load, ___atomic_load_1, ___atomic_load_2, ___atomic_load_4, | |
| 412 | ___atomic_load_8, ___atomic_store, ___atomic_store_1, ___atomic_store_2, | |
| 413 | ___atomic_store_4, ___atomic_store_8, ___chkstk_darwin, ___clear_cache, | |
| 414 | ___clzti2, ___divti3, ___enable_execute_stack, ___extendhfsf2, | |
| 415 | ___fixdfti, ___fixsfti, ___fixunsdfti, ___fixunssfti, ___floattidf, | |
| 416 | ___floattisf, ___floatuntidf, ___floatuntisf, ___gcc_personality_v0, | |
| 417 | ___gnu_f2h_ieee, ___gnu_h2f_ieee, ___modti3, ___muldc3, ___mulsc3, | |
| 418 | ___powidf2, ___powisf2, ___truncdfhf2, ___truncsfhf2, ___udivmodti4, | |
| 419 | ___udivti3, ___umodti3, _atomic_flag_clear, _atomic_flag_clear_explicit, | |
| 420 | 420 | _atomic_flag_test_and_set, _atomic_flag_test_and_set_explicit, |
| 421 | 421 | _atomic_signal_fence, _atomic_thread_fence ] |
| 422 | 422 | --- !tapi-tbd |
| ... | ... | @@ -425,24 +425,24 @@ targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatal |
| 425 | 425 | arm64e-macos, arm64e-maccatalyst ] |
| 426 | 426 | uuids: |
| 427 | 427 | - target: x86_64-macos |
| 428 | value: DA53E55D-FBC9-3EF8-A1B0-78CDC0457EC4 | |
| 428 | value: C5E0151C-F9E9-3851-841D-F6C2528ADB07 | |
| 429 | 429 | - target: x86_64-maccatalyst |
| 430 | value: DA53E55D-FBC9-3EF8-A1B0-78CDC0457EC4 | |
| 430 | value: C5E0151C-F9E9-3851-841D-F6C2528ADB07 | |
| 431 | 431 | - target: arm64-macos |
| 432 | 432 | value: 00000000-0000-0000-0000-000000000000 |
| 433 | 433 | - target: arm64-maccatalyst |
| 434 | 434 | value: 00000000-0000-0000-0000-000000000000 |
| 435 | 435 | - target: arm64e-macos |
| 436 | value: 6BE94DC2-F363-3D76-B056-F45D4B56E152 | |
| 436 | value: 97564E56-1B3C-3C9A-B653-AE99C54231AC | |
| 437 | 437 | - target: arm64e-maccatalyst |
| 438 | value: 6BE94DC2-F363-3D76-B056-F45D4B56E152 | |
| 438 | value: 97564E56-1B3C-3C9A-B653-AE99C54231AC | |
| 439 | 439 | install-name: '/usr/lib/system/libcopyfile.dylib' |
| 440 | 440 | parent-umbrella: |
| 441 | 441 | - targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatalyst, |
| 442 | 442 | arm64e-macos, arm64e-maccatalyst ] |
| 443 | 443 | umbrella: System |
| 444 | 444 | exports: |
| 445 | - targets: [ x86_64-macos, arm64e-macos, x86_64-maccatalyst, arm64e-maccatalyst, | |
| 445 | - targets: [ arm64e-macos, x86_64-macos, x86_64-maccatalyst, arm64e-maccatalyst, | |
| 446 | 446 | arm64-macos, arm64-maccatalyst ] |
| 447 | 447 | symbols: [ _copyfile, _copyfile_state_alloc, _copyfile_state_free, _copyfile_state_get, |
| 448 | 448 | _copyfile_state_set, _fcopyfile, _xattr_flags_from_name, _xattr_intent_with_flags, |
| ... | ... | @@ -453,19 +453,19 @@ targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatal |
| 453 | 453 | arm64e-macos, arm64e-maccatalyst ] |
| 454 | 454 | uuids: |
| 455 | 455 | - target: x86_64-macos |
| 456 | value: 1841B3FA-9360-3F14-903F-265EB054EACB | |
| 456 | value: E8AE6CBE-D5F8-32B8-A9D3-A2D8BF77F4D0 | |
| 457 | 457 | - target: x86_64-maccatalyst |
| 458 | value: 1841B3FA-9360-3F14-903F-265EB054EACB | |
| 458 | value: E8AE6CBE-D5F8-32B8-A9D3-A2D8BF77F4D0 | |
| 459 | 459 | - target: arm64-macos |
| 460 | 460 | value: 00000000-0000-0000-0000-000000000000 |
| 461 | 461 | - target: arm64-maccatalyst |
| 462 | 462 | value: 00000000-0000-0000-0000-000000000000 |
| 463 | 463 | - target: arm64e-macos |
| 464 | value: 881973B2-0426-325F-8D1A-17D60AE0CBFA | |
| 464 | value: 29B2F7FD-0F6D-3F41-B569-FB4AE94F4D6B | |
| 465 | 465 | - target: arm64e-maccatalyst |
| 466 | value: 881973B2-0426-325F-8D1A-17D60AE0CBFA | |
| 466 | value: 29B2F7FD-0F6D-3F41-B569-FB4AE94F4D6B | |
| 467 | 467 | install-name: '/usr/lib/system/libcorecrypto.dylib' |
| 468 | current-version: 1217.30.4 | |
| 468 | current-version: 1218.100.47 | |
| 469 | 469 | parent-umbrella: |
| 470 | 470 | - targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatalyst, |
| 471 | 471 | arm64e-macos, arm64e-maccatalyst ] |
| ... | ... | @@ -484,7 +484,7 @@ exports: |
| 484 | 484 | _ccaes_intel_xts_encrypt_aesni_mode, _ccaes_intel_xts_encrypt_opt_mode, |
| 485 | 485 | _ccsha1_vng_intel_SupplementalSSE3_di, _ccsha224_vng_intel_SupplementalSSE3_di, |
| 486 | 486 | _ccsha256_vng_intel_SupplementalSSE3_di ] |
| 487 | - targets: [ x86_64-macos, arm64e-macos, x86_64-maccatalyst, arm64e-maccatalyst, | |
| 487 | - targets: [ arm64e-macos, x86_64-macos, x86_64-maccatalyst, arm64e-maccatalyst, | |
| 488 | 488 | arm64-macos, arm64-maccatalyst ] |
| 489 | 489 | symbols: [ _CCEC_FAULT_CANARY, _CCRSA_PKCS1_FAULT_CANARY, _CCRSA_PSS_FAULT_CANARY, |
| 490 | 490 | _CCSS_PRIME_P192, _CCSS_PRIME_P224, _CCSS_PRIME_P256, _CCSS_PRIME_P384, |
| ... | ... | @@ -578,11 +578,12 @@ exports: |
| 578 | 578 | _ccdh_gp_rfc5114_MODP_1024_160, _ccdh_gp_rfc5114_MODP_2048_224, |
| 579 | 579 | _ccdh_gp_rfc5114_MODP_2048_256, _ccdh_gp_size, _ccdh_import_full, |
| 580 | 580 | _ccdh_import_priv, _ccdh_import_pub, _ccdh_init_gp_from_bytes, |
| 581 | _ccdigest, _ccdigest_init, _ccdigest_oid_lookup, _ccdigest_update, | |
| 582 | _ccdrbg_factory_nistctr, _ccdrbg_factory_nisthmac, _ccec_blind, | |
| 583 | _ccec_compact_export, _ccec_compact_export_pub, _ccec_compact_generate_key, | |
| 584 | _ccec_compact_import_priv, _ccec_compact_import_priv_size, | |
| 585 | _ccec_compact_import_pub, _ccec_compact_import_pub_size, _ccec_compact_transform_key, | |
| 581 | _ccdh_init_safe_gp_from_bytes, _ccdigest, _ccdigest_init, | |
| 582 | _ccdigest_oid_lookup, _ccdigest_update, _ccdrbg_factory_nistctr, | |
| 583 | _ccdrbg_factory_nisthmac, _ccec_affinify, _ccec_blind, _ccec_compact_export, | |
| 584 | _ccec_compact_export_pub, _ccec_compact_generate_key, _ccec_compact_import_priv, | |
| 585 | _ccec_compact_import_priv_size, _ccec_compact_import_pub, | |
| 586 | _ccec_compact_import_pub_size, _ccec_compact_transform_key, | |
| 586 | 587 | _ccec_compressed_x962_export_pub, _ccec_compressed_x962_export_pub_size, |
| 587 | 588 | _ccec_compressed_x962_import_pub, _ccec_compute_key, _ccec_cp_192, |
| 588 | 589 | _ccec_cp_224, _ccec_cp_256, _ccec_cp_384, _ccec_cp_521, _ccec_curve_for_length_lookup, |
| ... | ... | @@ -590,14 +591,15 @@ exports: |
| 590 | 591 | _ccec_der_export_priv, _ccec_der_export_priv_size, _ccec_der_import_diversified_pub, |
| 591 | 592 | _ccec_der_import_priv, _ccec_der_import_priv_keytype, _ccec_diversify_min_entropy_len, |
| 592 | 593 | _ccec_diversify_priv_twin, _ccec_diversify_pub, _ccec_diversify_pub_twin, |
| 593 | _ccec_export_pub, _ccec_extract_rs, _ccec_generate_blinding_keys, | |
| 594 | _ccec_export_pub, _ccec_extract_rs, _ccec_full_add, _ccec_generate_blinding_keys, | |
| 594 | 595 | _ccec_generate_key, _ccec_generate_key_deterministic, _ccec_generate_key_fips, |
| 595 | _ccec_generate_key_legacy, _ccec_get_cp, _ccec_get_fullkey_components, | |
| 596 | _ccec_get_pubkey_components, _ccec_import_pub, _ccec_keysize_is_supported, | |
| 597 | _ccec_make_priv, _ccec_make_pub, _ccec_pairwise_consistency_check, | |
| 598 | _ccec_print_full_key, _ccec_print_public_key, _ccec_raw_import_priv_only, | |
| 599 | _ccec_raw_import_pub, _ccec_rfc6637_dh_curve_p256, _ccec_rfc6637_dh_curve_p521, | |
| 600 | _ccec_rfc6637_unwrap_key, _ccec_rfc6637_unwrap_sha256_kek_aes128, | |
| 596 | _ccec_generate_key_legacy, _ccec_generate_scalar_fips_retry, | |
| 597 | _ccec_get_cp, _ccec_get_fullkey_components, _ccec_get_pubkey_components, | |
| 598 | _ccec_import_pub, _ccec_keysize_is_supported, _ccec_make_priv, | |
| 599 | _ccec_make_pub, _ccec_mult_blinded, _ccec_pairwise_consistency_check, | |
| 600 | _ccec_print_full_key, _ccec_print_public_key, _ccec_projectify, | |
| 601 | _ccec_raw_import_priv_only, _ccec_raw_import_pub, _ccec_rfc6637_dh_curve_p256, | |
| 602 | _ccec_rfc6637_dh_curve_p521, _ccec_rfc6637_unwrap_key, _ccec_rfc6637_unwrap_sha256_kek_aes128, | |
| 601 | 603 | _ccec_rfc6637_unwrap_sha512_kek_aes256, _ccec_rfc6637_wrap_key, |
| 602 | 604 | _ccec_rfc6637_wrap_key_diversified, _ccec_rfc6637_wrap_key_size, |
| 603 | 605 | _ccec_rfc6637_wrap_sha256_kek_aes128, _ccec_rfc6637_wrap_sha512_kek_aes256, |
| ... | ... | @@ -671,8 +673,7 @@ exports: |
| 671 | 673 | _ccrsa_sign_pss, _ccrsa_sign_pss_msg, _ccrsa_verify_pkcs1v15, |
| 672 | 674 | _ccrsa_verify_pkcs1v15_allowshortsigs, _ccrsa_verify_pkcs1v15_digest, |
| 673 | 675 | _ccrsa_verify_pkcs1v15_msg, _ccrsa_verify_pss_digest, _ccrsa_verify_pss_msg, |
| 674 | _ccrsabssa_blind_message, _ccrsabssa_ciphersuite_rsa2048_sha256, | |
| 675 | _ccrsabssa_ciphersuite_rsa2048_sha384, _ccrsabssa_ciphersuite_rsa3072_sha256, | |
| 676 | _ccrsabssa_blind_message, _ccrsabssa_ciphersuite_rsa2048_sha384, | |
| 676 | 677 | _ccrsabssa_ciphersuite_rsa3072_sha384, _ccrsabssa_ciphersuite_rsa4096_sha384, |
| 677 | 678 | _ccrsabssa_sign_blinded_message, _ccrsabssa_unblind_signature, |
| 678 | 679 | _ccsae_gen_kck_and_pmk, _ccsae_gen_password_value, _ccsae_generate_commitment, |
| ... | ... | @@ -728,8 +729,9 @@ exports: |
| 728 | 729 | _ccz_set, _ccz_set_bit, _ccz_seti, _ccz_size, _ccz_sub, _ccz_subi, |
| 729 | 730 | _ccz_trailing_zeros, _ccz_write_int, _ccz_write_int_size, |
| 730 | 731 | _ccz_write_radix, _ccz_write_radix_size, _ccz_write_uint, |
| 731 | _ccz_write_uint_size, _ccz_zero, _csss_shamir_share_bag_can_recover_secret, | |
| 732 | _fipspost_post, _fipspost_trace_vtable ] | |
| 732 | _ccz_write_uint_size, _ccz_zero, _cczp_add, _cczp_inv, _cczp_mod, | |
| 733 | _cczp_mul, _cczp_sub, _csss_shamir_share_bag_can_recover_secret, | |
| 734 | _fipspost_post, _fipspost_trace_vtable, _map_to_curve_sswu ] | |
| 733 | 735 | - targets: [ arm64e-macos, arm64e-maccatalyst, arm64-macos, arm64-maccatalyst ] |
| 734 | 736 | symbols: [ _ccaes_arm_cbc_decrypt_mode, _ccaes_arm_cbc_encrypt_mode, |
| 735 | 737 | _ccaes_arm_cfb_decrypt_mode, _ccaes_arm_cfb_encrypt_mode, |
| ... | ... | @@ -744,19 +746,19 @@ targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatal |
| 744 | 746 | arm64e-macos, arm64e-maccatalyst ] |
| 745 | 747 | uuids: |
| 746 | 748 | - target: x86_64-macos |
| 747 | value: D98AD4CA-5E4C-3842-AC57-2C65CDAFFAB9 | |
| 749 | value: 31D69D55-9895-326C-AD61-621C5CA87314 | |
| 748 | 750 | - target: x86_64-maccatalyst |
| 749 | value: D98AD4CA-5E4C-3842-AC57-2C65CDAFFAB9 | |
| 751 | value: 31D69D55-9895-326C-AD61-621C5CA87314 | |
| 750 | 752 | - target: arm64-macos |
| 751 | 753 | value: 00000000-0000-0000-0000-000000000000 |
| 752 | 754 | - target: arm64-maccatalyst |
| 753 | 755 | value: 00000000-0000-0000-0000-000000000000 |
| 754 | 756 | - target: arm64e-macos |
| 755 | value: 9C4116F5-B8EB-3A00-B4B5-54AF6A76F66B | |
| 757 | value: DC048E3B-E023-3D17-AFE5-4FF3DC625608 | |
| 756 | 758 | - target: arm64e-maccatalyst |
| 757 | value: 9C4116F5-B8EB-3A00-B4B5-54AF6A76F66B | |
| 759 | value: DC048E3B-E023-3D17-AFE5-4FF3DC625608 | |
| 758 | 760 | install-name: '/usr/lib/system/libdispatch.dylib' |
| 759 | current-version: 1324.30.6 | |
| 761 | current-version: 1325.100.36 | |
| 760 | 762 | parent-umbrella: |
| 761 | 763 | - targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatalyst, |
| 762 | 764 | arm64e-macos, arm64e-maccatalyst ] |
| ... | ... | @@ -799,23 +801,22 @@ exports: |
| 799 | 801 | __os_object_retain_with_resurrect, _dispatch_activate, _dispatch_after, |
| 800 | 802 | _dispatch_after_f, _dispatch_allocator_layout, _dispatch_apply, |
| 801 | 803 | _dispatch_apply_attr_destroy, _dispatch_apply_attr_init, _dispatch_apply_attr_query, |
| 802 | _dispatch_apply_attr_set_amx_parallelism, _dispatch_apply_f, | |
| 803 | _dispatch_apply_with_attr, _dispatch_apply_with_attr_f, _dispatch_assert_queue, | |
| 804 | '_dispatch_assert_queue$V2', _dispatch_assert_queue_barrier, | |
| 805 | _dispatch_assert_queue_not, '_dispatch_assert_queue_not$V2', | |
| 806 | _dispatch_async, _dispatch_async_and_wait, _dispatch_async_and_wait_f, | |
| 807 | _dispatch_async_enforce_qos_class_f, _dispatch_async_f, _dispatch_async_swift_job, | |
| 808 | _dispatch_atfork_child, _dispatch_atfork_parent, _dispatch_atfork_prepare, | |
| 809 | _dispatch_barrier_async, _dispatch_barrier_async_and_wait, | |
| 810 | _dispatch_barrier_async_and_wait_f, _dispatch_barrier_async_f, | |
| 811 | _dispatch_barrier_sync, _dispatch_barrier_sync_f, _dispatch_benchmark, | |
| 812 | _dispatch_benchmark_f, _dispatch_block_cancel, _dispatch_block_create, | |
| 813 | _dispatch_block_create_with_qos_class, _dispatch_block_create_with_voucher, | |
| 814 | _dispatch_block_create_with_voucher_and_qos_class, _dispatch_block_notify, | |
| 815 | _dispatch_block_perform, _dispatch_block_testcancel, _dispatch_block_wait, | |
| 816 | _dispatch_channel_async, _dispatch_channel_async_f, _dispatch_channel_cancel, | |
| 817 | _dispatch_channel_create, _dispatch_channel_drain, _dispatch_channel_drain_f, | |
| 818 | _dispatch_channel_enqueue, _dispatch_channel_foreach_work_item_peek, | |
| 804 | _dispatch_apply_attr_set_parallelism, _dispatch_apply_f, _dispatch_apply_with_attr, | |
| 805 | _dispatch_apply_with_attr_f, _dispatch_assert_queue, '_dispatch_assert_queue$V2', | |
| 806 | _dispatch_assert_queue_barrier, _dispatch_assert_queue_not, | |
| 807 | '_dispatch_assert_queue_not$V2', _dispatch_async, _dispatch_async_and_wait, | |
| 808 | _dispatch_async_and_wait_f, _dispatch_async_enforce_qos_class_f, | |
| 809 | _dispatch_async_f, _dispatch_async_swift_job, _dispatch_atfork_child, | |
| 810 | _dispatch_atfork_parent, _dispatch_atfork_prepare, _dispatch_barrier_async, | |
| 811 | _dispatch_barrier_async_and_wait, _dispatch_barrier_async_and_wait_f, | |
| 812 | _dispatch_barrier_async_f, _dispatch_barrier_sync, _dispatch_barrier_sync_f, | |
| 813 | _dispatch_benchmark, _dispatch_benchmark_f, _dispatch_block_cancel, | |
| 814 | _dispatch_block_create, _dispatch_block_create_with_qos_class, | |
| 815 | _dispatch_block_create_with_voucher, _dispatch_block_create_with_voucher_and_qos_class, | |
| 816 | _dispatch_block_notify, _dispatch_block_perform, _dispatch_block_testcancel, | |
| 817 | _dispatch_block_wait, _dispatch_channel_async, _dispatch_channel_async_f, | |
| 818 | _dispatch_channel_cancel, _dispatch_channel_create, _dispatch_channel_drain, | |
| 819 | _dispatch_channel_drain_f, _dispatch_channel_enqueue, _dispatch_channel_foreach_work_item_peek, | |
| 819 | 820 | _dispatch_channel_foreach_work_item_peek_f, _dispatch_channel_testcancel, |
| 820 | 821 | _dispatch_channel_wakeup, _dispatch_data_apply, _dispatch_data_apply_f, |
| 821 | 822 | _dispatch_data_copy_region, _dispatch_data_create, _dispatch_data_create_alloc, |
| ... | ... | @@ -869,8 +870,9 @@ exports: |
| 869 | 870 | _dispatch_source_set_registration_handler, _dispatch_source_set_registration_handler_f, |
| 870 | 871 | _dispatch_source_set_timer, _dispatch_source_testcancel, _dispatch_suspend, |
| 871 | 872 | _dispatch_swift_job_should_yield, _dispatch_sync, _dispatch_sync_f, |
| 872 | _dispatch_time, _dispatch_time_to_nsecs, _dispatch_tsd_indexes, | |
| 873 | _dispatch_walltime, _dispatch_workloop_copy_current, _dispatch_workloop_create, | |
| 873 | _dispatch_time, _dispatch_time_from_nsec, _dispatch_time_to_nsec, | |
| 874 | _dispatch_time_to_nsecs, _dispatch_tsd_indexes, _dispatch_walltime, | |
| 875 | _dispatch_workloop_copy_current, _dispatch_workloop_create, | |
| 874 | 876 | _dispatch_workloop_create_inactive, _dispatch_workloop_is_current, |
| 875 | 877 | _dispatch_workloop_set_autorelease_frequency, _dispatch_workloop_set_cpupercent, |
| 876 | 878 | _dispatch_workloop_set_os_workgroup, _dispatch_workloop_set_qos_class, |
| ... | ... | @@ -903,7 +905,8 @@ exports: |
| 903 | 905 | _voucher_get_activity_id, _voucher_get_activity_id_and_creator, |
| 904 | 906 | _voucher_get_current_persona, _voucher_get_current_persona_originator_info, |
| 905 | 907 | _voucher_get_current_persona_proximate_info, _voucher_kvoucher_debug, |
| 906 | _voucher_process_can_use_arbitrary_personas, _voucher_replace_default_voucher ] | |
| 908 | _voucher_process_can_use_arbitrary_personas, _voucher_release, | |
| 909 | _voucher_replace_default_voucher, _voucher_retain ] | |
| 907 | 910 | objc-classes: [ OS_dispatch_channel, OS_dispatch_data, OS_dispatch_disk, OS_dispatch_group, |
| 908 | 911 | OS_dispatch_io, OS_dispatch_mach, OS_dispatch_mach_msg, OS_dispatch_object, |
| 909 | 912 | OS_dispatch_operation, OS_dispatch_queue, OS_dispatch_queue_attr, |
| ... | ... | @@ -917,26 +920,26 @@ targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatal |
| 917 | 920 | arm64e-macos, arm64e-maccatalyst ] |
| 918 | 921 | uuids: |
| 919 | 922 | - target: x86_64-macos |
| 920 | value: D2F8B1F4-12FF-3226-9FCB-75193C2EDE2E | |
| 923 | value: 6627654A-F427-3E04-98AC-492A1CA26FCC | |
| 921 | 924 | - target: x86_64-maccatalyst |
| 922 | value: D2F8B1F4-12FF-3226-9FCB-75193C2EDE2E | |
| 925 | value: 6627654A-F427-3E04-98AC-492A1CA26FCC | |
| 923 | 926 | - target: arm64-macos |
| 924 | value: 7F570139-CD4C-32F5-B68D-AFB040F45EC4 | |
| 927 | value: 23F54944-4C0C-3479-93BE-F3A9D0B05724 | |
| 925 | 928 | - target: arm64-maccatalyst |
| 926 | value: 7F570139-CD4C-32F5-B68D-AFB040F45EC4 | |
| 929 | value: 23F54944-4C0C-3479-93BE-F3A9D0B05724 | |
| 927 | 930 | - target: arm64e-macos |
| 928 | value: 96ECED73-F10C-3941-91A7-00254B907499 | |
| 931 | value: D9C3F911-6697-3B95-A4F6-4FB979F04A6E | |
| 929 | 932 | - target: arm64e-maccatalyst |
| 930 | value: 96ECED73-F10C-3941-91A7-00254B907499 | |
| 933 | value: D9C3F911-6697-3B95-A4F6-4FB979F04A6E | |
| 931 | 934 | install-name: '/usr/lib/system/libdyld.dylib' |
| 932 | 935 | parent-umbrella: |
| 933 | 936 | - targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatalyst, |
| 934 | 937 | arm64e-macos, arm64e-maccatalyst ] |
| 935 | 938 | umbrella: System |
| 936 | 939 | exports: |
| 937 | - targets: [ arm64-macos, x86_64-macos, arm64e-macos ] | |
| 940 | - targets: [ arm64-macos, arm64e-macos, x86_64-macos ] | |
| 938 | 941 | symbols: [ _dyld_shared_cache_for_each_subcache4Rosetta, _dyld_shared_subcache_get_info4Rosetta ] |
| 939 | - targets: [ arm64-macos, x86_64-macos, arm64e-macos, x86_64-maccatalyst, | |
| 942 | - targets: [ arm64-macos, arm64e-macos, x86_64-macos, x86_64-maccatalyst, | |
| 940 | 943 | arm64-maccatalyst, arm64e-maccatalyst ] |
| 941 | 944 | symbols: [ _NSAddImage, _NSAddLibrary, _NSAddLibraryWithSearching, _NSAddressOfSymbol, |
| 942 | 945 | _NSCreateObjectFileImageFromFile, _NSCreateObjectFileImageFromMemory, |
| ... | ... | @@ -952,6 +955,7 @@ exports: |
| 952 | 955 | _NSVersionOfLinkTimeLibrary, _NSVersionOfRunTimeLibrary, _NXArgc, |
| 953 | 956 | _NXArgv, __NSGetExecutablePath, ___progname, __dyld_all_twolevel_modules_prebound, |
| 954 | 957 | __dyld_atfork_parent, __dyld_atfork_prepare, __dyld_bind_fully_image_containing_address, |
| 958 | __dyld_dlopen_atfork_child, __dyld_dlopen_atfork_parent, __dyld_dlopen_atfork_prepare, | |
| 955 | 959 | __dyld_find_foreign_type_protocol_conformance, __dyld_find_protocol_conformance, |
| 956 | 960 | __dyld_find_unwind_sections, __dyld_for_each_objc_class, __dyld_for_each_objc_protocol, |
| 957 | 961 | __dyld_fork_child, __dyld_get_image_header, __dyld_get_image_header_containing_address, |
| ... | ... | @@ -1007,17 +1011,17 @@ targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatal |
| 1007 | 1011 | arm64e-macos, arm64e-maccatalyst ] |
| 1008 | 1012 | uuids: |
| 1009 | 1013 | - target: x86_64-macos |
| 1010 | value: 8F475783-80D3-378E-9A99-82602250DA06 | |
| 1014 | value: CCF77FC2-C655-30F7-AE37-9470E1C91C88 | |
| 1011 | 1015 | - target: x86_64-maccatalyst |
| 1012 | value: 8F475783-80D3-378E-9A99-82602250DA06 | |
| 1016 | value: CCF77FC2-C655-30F7-AE37-9470E1C91C88 | |
| 1013 | 1017 | - target: arm64-macos |
| 1014 | 1018 | value: 00000000-0000-0000-0000-000000000000 |
| 1015 | 1019 | - target: arm64-maccatalyst |
| 1016 | 1020 | value: 00000000-0000-0000-0000-000000000000 |
| 1017 | 1021 | - target: arm64e-macos |
| 1018 | value: F7CDC52B-7961-3283-A30F-B06E2E6ED6AB | |
| 1022 | value: 7B91E34D-FEF4-3CAB-ABA5-B2CBCD2BCDC0 | |
| 1019 | 1023 | - target: arm64e-maccatalyst |
| 1020 | value: F7CDC52B-7961-3283-A30F-B06E2E6ED6AB | |
| 1024 | value: 7B91E34D-FEF4-3CAB-ABA5-B2CBCD2BCDC0 | |
| 1021 | 1025 | install-name: '/usr/lib/system/libkeymgr.dylib' |
| 1022 | 1026 | current-version: 31 |
| 1023 | 1027 | parent-umbrella: |
| ... | ... | @@ -1025,7 +1029,7 @@ parent-umbrella: |
| 1025 | 1029 | arm64e-macos, arm64e-maccatalyst ] |
| 1026 | 1030 | umbrella: System |
| 1027 | 1031 | exports: |
| 1028 | - targets: [ x86_64-macos, arm64e-macos, x86_64-maccatalyst, arm64e-maccatalyst, | |
| 1032 | - targets: [ arm64e-macos, x86_64-macos, x86_64-maccatalyst, arm64e-maccatalyst, | |
| 1029 | 1033 | arm64-macos, arm64-maccatalyst ] |
| 1030 | 1034 | symbols: [ ___keymgr_dwarf2_register_sections, ___keymgr_initializer, |
| 1031 | 1035 | __keymgr_get_and_lock_processwide_ptr, __keymgr_get_and_lock_processwide_ptr_2, |
| ... | ... | @@ -1037,24 +1041,24 @@ tbd-version: 4 |
| 1037 | 1041 | targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64e-macos ] |
| 1038 | 1042 | uuids: |
| 1039 | 1043 | - target: x86_64-macos |
| 1040 | value: 962FA64E-23DE-3C77-AD8B-B302B5E892FF | |
| 1044 | value: 4D6563C4-0109-33EF-9641-5762CA377023 | |
| 1041 | 1045 | - target: x86_64-maccatalyst |
| 1042 | value: 962FA64E-23DE-3C77-AD8B-B302B5E892FF | |
| 1046 | value: 4D6563C4-0109-33EF-9641-5762CA377023 | |
| 1043 | 1047 | - target: arm64-macos |
| 1044 | value: 45FA69BC-984E-3D28-9D18-B3EEBA237CBE | |
| 1048 | value: 5098ED51-AC6F-3D86-94CA-DB77E3BF43EE | |
| 1045 | 1049 | - target: arm64-maccatalyst |
| 1046 | value: 45FA69BC-984E-3D28-9D18-B3EEBA237CBE | |
| 1050 | value: 5098ED51-AC6F-3D86-94CA-DB77E3BF43EE | |
| 1047 | 1051 | - target: arm64e-macos |
| 1048 | value: 8D2BECEF-1038-3F2C-B8EF-B02C03092286 | |
| 1052 | value: A96A86CA-C4C0-3013-BB2E-5F7572B18A00 | |
| 1049 | 1053 | - target: arm64e-maccatalyst |
| 1050 | value: 8D2BECEF-1038-3F2C-B8EF-B02C03092286 | |
| 1054 | value: A96A86CA-C4C0-3013-BB2E-5F7572B18A00 | |
| 1051 | 1055 | install-name: '/usr/lib/system/libmacho.dylib' |
| 1052 | current-version: 987 | |
| 1056 | current-version: 994 | |
| 1053 | 1057 | parent-umbrella: |
| 1054 | 1058 | - targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64e-macos ] |
| 1055 | 1059 | umbrella: System |
| 1056 | 1060 | exports: |
| 1057 | - targets: [ arm64-macos, x86_64-macos, arm64e-macos, x86_64-maccatalyst ] | |
| 1061 | - targets: [ arm64-macos, arm64e-macos, x86_64-macos, x86_64-maccatalyst ] | |
| 1058 | 1062 | symbols: [ _NXCombineCpuSubtypes, _NXFindBestFatArch, _NXFindBestFatArch_64, |
| 1059 | 1063 | _NXFreeArchInfo, _NXGetAllArchInfos, _NXGetArchInfoFromCpuType, |
| 1060 | 1064 | _NXGetArchInfoFromName, _NXGetLocalArchInfo, _get_edata, _get_end, |
| ... | ... | @@ -1097,25 +1101,25 @@ targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatal |
| 1097 | 1101 | arm64e-macos, arm64e-maccatalyst ] |
| 1098 | 1102 | uuids: |
| 1099 | 1103 | - target: x86_64-macos |
| 1100 | value: C6D1E49B-561D-3F84-8548-18FE40AB02DA | |
| 1104 | value: BFB0329D-28B0-3FF8-AF71-FB8798721547 | |
| 1101 | 1105 | - target: x86_64-maccatalyst |
| 1102 | value: C6D1E49B-561D-3F84-8548-18FE40AB02DA | |
| 1106 | value: BFB0329D-28B0-3FF8-AF71-FB8798721547 | |
| 1103 | 1107 | - target: arm64-macos |
| 1104 | 1108 | value: 00000000-0000-0000-0000-000000000000 |
| 1105 | 1109 | - target: arm64-maccatalyst |
| 1106 | 1110 | value: 00000000-0000-0000-0000-000000000000 |
| 1107 | 1111 | - target: arm64e-macos |
| 1108 | value: 3D861651-91A7-3D78-B43B-ECAA41D63D9E | |
| 1112 | value: 49C11AB5-FD65-39BE-A1C7-AD885809511E | |
| 1109 | 1113 | - target: arm64e-maccatalyst |
| 1110 | value: 3D861651-91A7-3D78-B43B-ECAA41D63D9E | |
| 1114 | value: 49C11AB5-FD65-39BE-A1C7-AD885809511E | |
| 1111 | 1115 | install-name: '/usr/lib/system/libquarantine.dylib' |
| 1112 | current-version: 129.30.3 | |
| 1116 | current-version: 133.100.3 | |
| 1113 | 1117 | parent-umbrella: |
| 1114 | 1118 | - targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatalyst, |
| 1115 | 1119 | arm64e-macos, arm64e-maccatalyst ] |
| 1116 | 1120 | umbrella: System |
| 1117 | 1121 | exports: |
| 1118 | - targets: [ x86_64-macos, arm64e-macos, x86_64-maccatalyst, arm64e-maccatalyst, | |
| 1122 | - targets: [ arm64e-macos, x86_64-macos, x86_64-maccatalyst, arm64e-maccatalyst, | |
| 1119 | 1123 | arm64-macos, arm64-maccatalyst ] |
| 1120 | 1124 | symbols: [ ___esp_check, ___esp_check_ns, ___esp_enabled, ___esp_notify, |
| 1121 | 1125 | ___esp_notify_ns, __qtn_error, __qtn_file_alloc, __qtn_file_apply_to_fd, |
| ... | ... | @@ -1151,17 +1155,17 @@ targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatal |
| 1151 | 1155 | arm64e-macos, arm64e-maccatalyst ] |
| 1152 | 1156 | uuids: |
| 1153 | 1157 | - target: x86_64-macos |
| 1154 | value: A88ED990-563F-3230-9C80-703A3134AEE4 | |
| 1158 | value: 06A5E617-FB01-3F34-9A4C-CA3894CE0438 | |
| 1155 | 1159 | - target: x86_64-maccatalyst |
| 1156 | value: A88ED990-563F-3230-9C80-703A3134AEE4 | |
| 1160 | value: 06A5E617-FB01-3F34-9A4C-CA3894CE0438 | |
| 1157 | 1161 | - target: arm64-macos |
| 1158 | 1162 | value: 00000000-0000-0000-0000-000000000000 |
| 1159 | 1163 | - target: arm64-maccatalyst |
| 1160 | 1164 | value: 00000000-0000-0000-0000-000000000000 |
| 1161 | 1165 | - target: arm64e-macos |
| 1162 | value: FA2D8F89-D9C4-316F-9FDC-BFF1A791BD4E | |
| 1166 | value: 4880993D-A23B-3DCE-942A-4201CE7E5461 | |
| 1163 | 1167 | - target: arm64e-maccatalyst |
| 1164 | value: FA2D8F89-D9C4-316F-9FDC-BFF1A791BD4E | |
| 1168 | value: 4880993D-A23B-3DCE-942A-4201CE7E5461 | |
| 1165 | 1169 | install-name: '/usr/lib/system/libremovefile.dylib' |
| 1166 | 1170 | current-version: 60 |
| 1167 | 1171 | parent-umbrella: |
| ... | ... | @@ -1169,7 +1173,7 @@ parent-umbrella: |
| 1169 | 1173 | arm64e-macos, arm64e-maccatalyst ] |
| 1170 | 1174 | umbrella: System |
| 1171 | 1175 | exports: |
| 1172 | - targets: [ x86_64-macos, arm64e-macos, x86_64-maccatalyst, arm64e-maccatalyst, | |
| 1176 | - targets: [ arm64e-macos, x86_64-macos, x86_64-maccatalyst, arm64e-maccatalyst, | |
| 1173 | 1177 | arm64-macos, arm64-maccatalyst ] |
| 1174 | 1178 | symbols: [ ___removefile_init_random, ___removefile_random_char, ___removefile_randomize_buffer, |
| 1175 | 1179 | ___removefile_rename_unlink, ___removefile_sunlink, ___removefile_tree_walker, |
| ... | ... | @@ -1182,19 +1186,19 @@ targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatal |
| 1182 | 1186 | arm64e-macos, arm64e-maccatalyst ] |
| 1183 | 1187 | uuids: |
| 1184 | 1188 | - target: x86_64-macos |
| 1185 | value: 7A040D61-D8FB-3F40-99B7-0C84BA2574DC | |
| 1189 | value: DAA735E5-A64F-3443-8B24-8C5A77A25EFD | |
| 1186 | 1190 | - target: x86_64-maccatalyst |
| 1187 | value: 7A040D61-D8FB-3F40-99B7-0C84BA2574DC | |
| 1191 | value: DAA735E5-A64F-3443-8B24-8C5A77A25EFD | |
| 1188 | 1192 | - target: arm64-macos |
| 1189 | 1193 | value: 00000000-0000-0000-0000-000000000000 |
| 1190 | 1194 | - target: arm64-maccatalyst |
| 1191 | 1195 | value: 00000000-0000-0000-0000-000000000000 |
| 1192 | 1196 | - target: arm64e-macos |
| 1193 | value: 61963381-E322-3D0F-855D-CE1EA31FA4E1 | |
| 1197 | value: 6B2F4A2F-2C36-3D5D-87F0-9B6BBAE5560C | |
| 1194 | 1198 | - target: arm64e-maccatalyst |
| 1195 | value: 61963381-E322-3D0F-855D-CE1EA31FA4E1 | |
| 1199 | value: 6B2F4A2F-2C36-3D5D-87F0-9B6BBAE5560C | |
| 1196 | 1200 | install-name: '/usr/lib/system/libsystem_asl.dylib' |
| 1197 | current-version: 390 | |
| 1201 | current-version: 392.100.2 | |
| 1198 | 1202 | parent-umbrella: |
| 1199 | 1203 | - targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatalyst, |
| 1200 | 1204 | arm64e-macos, arm64e-maccatalyst ] |
| ... | ... | @@ -1276,25 +1280,25 @@ targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatal |
| 1276 | 1280 | arm64e-macos, arm64e-maccatalyst ] |
| 1277 | 1281 | uuids: |
| 1278 | 1282 | - target: x86_64-macos |
| 1279 | value: 247F70CA-E83C-346B-8556-B3DACE78ED36 | |
| 1283 | value: CCC417A8-9265-3B0C-AF95-98B57ABE5E43 | |
| 1280 | 1284 | - target: x86_64-maccatalyst |
| 1281 | value: 247F70CA-E83C-346B-8556-B3DACE78ED36 | |
| 1285 | value: CCC417A8-9265-3B0C-AF95-98B57ABE5E43 | |
| 1282 | 1286 | - target: arm64-macos |
| 1283 | 1287 | value: 00000000-0000-0000-0000-000000000000 |
| 1284 | 1288 | - target: arm64-maccatalyst |
| 1285 | 1289 | value: 00000000-0000-0000-0000-000000000000 |
| 1286 | 1290 | - target: arm64e-macos |
| 1287 | value: 770FEB1F-FE27-3670-810F-A063D281CC8D | |
| 1291 | value: DF7F3CF2-FF71-3E86-AA3A-46465B8B8DEC | |
| 1288 | 1292 | - target: arm64e-maccatalyst |
| 1289 | value: 770FEB1F-FE27-3670-810F-A063D281CC8D | |
| 1293 | value: DF7F3CF2-FF71-3E86-AA3A-46465B8B8DEC | |
| 1290 | 1294 | install-name: '/usr/lib/system/libsystem_blocks.dylib' |
| 1291 | current-version: 79 | |
| 1295 | current-version: 79.1 | |
| 1292 | 1296 | parent-umbrella: |
| 1293 | 1297 | - targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatalyst, |
| 1294 | 1298 | arm64e-macos, arm64e-maccatalyst ] |
| 1295 | 1299 | umbrella: System |
| 1296 | 1300 | exports: |
| 1297 | - targets: [ x86_64-macos, arm64e-macos, x86_64-maccatalyst, arm64e-maccatalyst, | |
| 1301 | - targets: [ arm64e-macos, x86_64-macos, x86_64-maccatalyst, arm64e-maccatalyst, | |
| 1298 | 1302 | arm64-macos, arm64-maccatalyst ] |
| 1299 | 1303 | symbols: [ _Block_size, __Block_copy, __Block_extended_layout, __Block_has_signature, |
| 1300 | 1304 | __Block_isDeallocating, __Block_layout, __Block_object_assign, |
| ... | ... | @@ -1308,19 +1312,19 @@ targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatal |
| 1308 | 1312 | arm64e-macos, arm64e-maccatalyst ] |
| 1309 | 1313 | uuids: |
| 1310 | 1314 | - target: x86_64-macos |
| 1311 | value: DE0BB5F4-D3EC-36EB-8B7F-58964E2AAC7C | |
| 1315 | value: 8E54ECA2-9BD8-3482-9589-B9574434D1AA | |
| 1312 | 1316 | - target: x86_64-maccatalyst |
| 1313 | value: DE0BB5F4-D3EC-36EB-8B7F-58964E2AAC7C | |
| 1317 | value: 8E54ECA2-9BD8-3482-9589-B9574434D1AA | |
| 1314 | 1318 | - target: arm64-macos |
| 1315 | 1319 | value: 00000000-0000-0000-0000-000000000000 |
| 1316 | 1320 | - target: arm64-maccatalyst |
| 1317 | 1321 | value: 00000000-0000-0000-0000-000000000000 |
| 1318 | 1322 | - target: arm64e-macos |
| 1319 | value: 660D7866-E2A2-3651-A0A5-806E9217736B | |
| 1323 | value: FD566A15-42D8-314A-A99A-B59237DDF5BC | |
| 1320 | 1324 | - target: arm64e-maccatalyst |
| 1321 | value: 660D7866-E2A2-3651-A0A5-806E9217736B | |
| 1325 | value: FD566A15-42D8-314A-A99A-B59237DDF5BC | |
| 1322 | 1326 | install-name: '/usr/lib/system/libsystem_c.dylib' |
| 1323 | current-version: 1506.30.3 | |
| 1327 | current-version: 1507.100.9 | |
| 1324 | 1328 | parent-umbrella: |
| 1325 | 1329 | - targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatalyst, |
| 1326 | 1330 | arm64e-macos, arm64e-maccatalyst ] |
| ... | ... | @@ -1440,13 +1444,13 @@ exports: |
| 1440 | 1444 | _dbopen, _devname, _devname_r, _difftime, _digittoint, _digittoint_l, |
| 1441 | 1445 | _dirfd, _dirname, _dirname_r, _div, _dprintf, _dprintf_l, |
| 1442 | 1446 | _drand48, _duplocale, _dxprintf, _dxprintf_exec, _ecvt, _encrypt, |
| 1443 | _endttyent, _endusershell, _endutxent, _endutxent_wtmp, _erand48, | |
| 1444 | _err, _err_set_exit, _err_set_exit_b, _err_set_file, _errc, | |
| 1445 | _errx, _execl, _execle, _execlp, _execv, _execvP, _execvp, | |
| 1446 | _exit, _f_prealloc, _fchmodx_np, _fclose, _fcvt, _fdopen, | |
| 1447 | '_fdopen$DARWIN_EXTSN', _fdopendir, _feof, _feof_unlocked, | |
| 1448 | _ferror, _ferror_unlocked, _fflagstostr, _fflush, _fgetc, | |
| 1449 | _fgetln, _fgetpos, _fgetrune, _fgets, _fgetwc, _fgetwc_l, | |
| 1447 | _endttyent, _endusershell, _endutxent, _endutxent_wtmp, _environ_lock_np, | |
| 1448 | _environ_unlock_np, _erand48, _err, _err_set_exit, _err_set_exit_b, | |
| 1449 | _err_set_file, _errc, _errx, _execl, _execle, _execlp, _execv, | |
| 1450 | _execvP, _execvp, _exit, _f_prealloc, _fchmodx_np, _fclose, | |
| 1451 | _fcvt, _fdopen, '_fdopen$DARWIN_EXTSN', _fdopendir, _feof, | |
| 1452 | _feof_unlocked, _ferror, _ferror_unlocked, _fflagstostr, _fflush, | |
| 1453 | _fgetc, _fgetln, _fgetpos, _fgetrune, _fgets, _fgetwc, _fgetwc_l, | |
| 1450 | 1454 | _fgetwln, _fgetwln_l, _fgetws, _fgetws_l, _fileno, _fileno_unlocked, |
| 1451 | 1455 | _filesec_dup, _filesec_free, _filesec_get_property, _filesec_init, |
| 1452 | 1456 | _filesec_query_property, _filesec_set_property, _filesec_unset_property, |
| ... | ... | @@ -1615,25 +1619,25 @@ targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatal |
| 1615 | 1619 | arm64e-macos, arm64e-maccatalyst ] |
| 1616 | 1620 | uuids: |
| 1617 | 1621 | - target: x86_64-macos |
| 1618 | value: 238A47F2-BED4-36B9-8080-E88095B11F5A | |
| 1622 | value: BDBBFF38-0DB7-3B60-BB26-1E7E36715C85 | |
| 1619 | 1623 | - target: x86_64-maccatalyst |
| 1620 | value: 238A47F2-BED4-36B9-8080-E88095B11F5A | |
| 1624 | value: BDBBFF38-0DB7-3B60-BB26-1E7E36715C85 | |
| 1621 | 1625 | - target: arm64-macos |
| 1622 | 1626 | value: 00000000-0000-0000-0000-000000000000 |
| 1623 | 1627 | - target: arm64-maccatalyst |
| 1624 | 1628 | value: 00000000-0000-0000-0000-000000000000 |
| 1625 | 1629 | - target: arm64e-macos |
| 1626 | value: 1F580793-A1C3-30C6-A9BC-7789C14677AE | |
| 1630 | value: B7FB982C-29CC-383B-9C25-60D660BB1433 | |
| 1627 | 1631 | - target: arm64e-maccatalyst |
| 1628 | value: 1F580793-A1C3-30C6-A9BC-7789C14677AE | |
| 1632 | value: B7FB982C-29CC-383B-9C25-60D660BB1433 | |
| 1629 | 1633 | install-name: '/usr/lib/system/libsystem_collections.dylib' |
| 1630 | current-version: 1506.30.3 | |
| 1634 | current-version: 1507.100.9 | |
| 1631 | 1635 | parent-umbrella: |
| 1632 | 1636 | - targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatalyst, |
| 1633 | 1637 | arm64e-macos, arm64e-maccatalyst ] |
| 1634 | 1638 | umbrella: System |
| 1635 | 1639 | exports: |
| 1636 | - targets: [ x86_64-macos, arm64e-macos, x86_64-maccatalyst, arm64e-maccatalyst, | |
| 1640 | - targets: [ arm64e-macos, x86_64-macos, x86_64-maccatalyst, arm64e-maccatalyst, | |
| 1637 | 1641 | arm64-macos, arm64-maccatalyst ] |
| 1638 | 1642 | symbols: [ _os_map_128_clear, _os_map_128_count, _os_map_128_delete, |
| 1639 | 1643 | _os_map_128_destroy, _os_map_128_find, _os_map_128_foreach, |
| ... | ... | @@ -1658,19 +1662,19 @@ targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatal |
| 1658 | 1662 | arm64e-macos, arm64e-maccatalyst ] |
| 1659 | 1663 | uuids: |
| 1660 | 1664 | - target: x86_64-macos |
| 1661 | value: C13509A3-AE4E-3232-A5CD-4C055C585565 | |
| 1665 | value: 254B479C-BCCB-3A80-A6D8-246FE621D182 | |
| 1662 | 1666 | - target: x86_64-maccatalyst |
| 1663 | value: C13509A3-AE4E-3232-A5CD-4C055C585565 | |
| 1667 | value: 254B479C-BCCB-3A80-A6D8-246FE621D182 | |
| 1664 | 1668 | - target: arm64-macos |
| 1665 | 1669 | value: 00000000-0000-0000-0000-000000000000 |
| 1666 | 1670 | - target: arm64-maccatalyst |
| 1667 | 1671 | value: 00000000-0000-0000-0000-000000000000 |
| 1668 | 1672 | - target: arm64e-macos |
| 1669 | value: 8370E8A5-EADF-3A2C-9D5B-CA148723A5CA | |
| 1673 | value: F241F139-76C4-38FC-A44C-5D695A58592D | |
| 1670 | 1674 | - target: arm64e-maccatalyst |
| 1671 | value: 8370E8A5-EADF-3A2C-9D5B-CA148723A5CA | |
| 1675 | value: F241F139-76C4-38FC-A44C-5D695A58592D | |
| 1672 | 1676 | install-name: '/usr/lib/system/libsystem_configuration.dylib' |
| 1673 | current-version: 1163.30.6 | |
| 1677 | current-version: 1163.100.19 | |
| 1674 | 1678 | parent-umbrella: |
| 1675 | 1679 | - targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatalyst, |
| 1676 | 1680 | arm64e-macos, arm64e-maccatalyst ] |
| ... | ... | @@ -1698,17 +1702,17 @@ targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatal |
| 1698 | 1702 | arm64e-macos, arm64e-maccatalyst ] |
| 1699 | 1703 | uuids: |
| 1700 | 1704 | - target: x86_64-macos |
| 1701 | value: EBCDED71-A48E-3FC6-A05D-81EA84A901AD | |
| 1705 | value: 03AC1106-F611-3CCA-98AE-8C5FA6ED5C94 | |
| 1702 | 1706 | - target: x86_64-maccatalyst |
| 1703 | value: EBCDED71-A48E-3FC6-A05D-81EA84A901AD | |
| 1707 | value: 03AC1106-F611-3CCA-98AE-8C5FA6ED5C94 | |
| 1704 | 1708 | - target: arm64-macos |
| 1705 | 1709 | value: 00000000-0000-0000-0000-000000000000 |
| 1706 | 1710 | - target: arm64-maccatalyst |
| 1707 | 1711 | value: 00000000-0000-0000-0000-000000000000 |
| 1708 | 1712 | - target: arm64e-macos |
| 1709 | value: 30C492F6-C9E6-3C1D-BE52-CA4F4FC824D6 | |
| 1713 | value: ECF472AD-D73F-3C98-B186-2AD4EE20F4D5 | |
| 1710 | 1714 | - target: arm64e-maccatalyst |
| 1711 | value: 30C492F6-C9E6-3C1D-BE52-CA4F4FC824D6 | |
| 1715 | value: ECF472AD-D73F-3C98-B186-2AD4EE20F4D5 | |
| 1712 | 1716 | install-name: '/usr/lib/system/libsystem_containermanager.dylib' |
| 1713 | 1717 | parent-umbrella: |
| 1714 | 1718 | - targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatalyst, |
| ... | ... | @@ -1788,17 +1792,17 @@ targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatal |
| 1788 | 1792 | arm64e-macos, arm64e-maccatalyst ] |
| 1789 | 1793 | uuids: |
| 1790 | 1794 | - target: x86_64-macos |
| 1791 | value: 4B990266-91BF-3E2F-97C0-3B214B3052DC | |
| 1795 | value: 5E34B58A-2BEE-3AA4-AB65-C32D4619AC2B | |
| 1792 | 1796 | - target: x86_64-maccatalyst |
| 1793 | value: 4B990266-91BF-3E2F-97C0-3B214B3052DC | |
| 1797 | value: 5E34B58A-2BEE-3AA4-AB65-C32D4619AC2B | |
| 1794 | 1798 | - target: arm64-macos |
| 1795 | 1799 | value: 00000000-0000-0000-0000-000000000000 |
| 1796 | 1800 | - target: arm64-maccatalyst |
| 1797 | 1801 | value: 00000000-0000-0000-0000-000000000000 |
| 1798 | 1802 | - target: arm64e-macos |
| 1799 | value: F2A34B01-C264-3B7E-B3C9-1671E9E3C185 | |
| 1803 | value: 92325446-C184-3BDF-B839-CFC2A7C558EC | |
| 1800 | 1804 | - target: arm64e-maccatalyst |
| 1801 | value: F2A34B01-C264-3B7E-B3C9-1671E9E3C185 | |
| 1805 | value: 92325446-C184-3BDF-B839-CFC2A7C558EC | |
| 1802 | 1806 | install-name: '/usr/lib/system/libsystem_coreservices.dylib' |
| 1803 | 1807 | current-version: 133 |
| 1804 | 1808 | parent-umbrella: |
| ... | ... | @@ -1806,7 +1810,7 @@ parent-umbrella: |
| 1806 | 1810 | arm64e-macos, arm64e-maccatalyst ] |
| 1807 | 1811 | umbrella: System |
| 1808 | 1812 | exports: |
| 1809 | - targets: [ x86_64-macos, arm64e-macos, x86_64-maccatalyst, arm64e-maccatalyst, | |
| 1813 | - targets: [ arm64e-macos, x86_64-macos, x86_64-maccatalyst, arm64e-maccatalyst, | |
| 1810 | 1814 | arm64-macos, arm64-maccatalyst ] |
| 1811 | 1815 | symbols: [ _NSGetNextSearchPathEnumeration, _NSStartSearchPathEnumeration, |
| 1812 | 1816 | _NSStartSearchPathEnumerationPrivate, ___user_local_dirname, |
| ... | ... | @@ -1814,7 +1818,7 @@ exports: |
| 1814 | 1818 | __dirhelper, __dirhelper_relative, __get_user_dir_suffix, |
| 1815 | 1819 | __libcoreservices_fork_child, __set_user_dir_suffix, _sysdir_get_next_search_path_enumeration, |
| 1816 | 1820 | _sysdir_start_search_path_enumeration, _sysdir_start_search_path_enumeration_private ] |
| 1817 | - targets: [ x86_64-macos, arm64e-macos, arm64-macos ] | |
| 1821 | - targets: [ arm64e-macos, x86_64-macos, arm64-macos ] | |
| 1818 | 1822 | symbols: [ __idle_exit ] |
| 1819 | 1823 | --- !tapi-tbd |
| 1820 | 1824 | tbd-version: 4 |
| ... | ... | @@ -1822,24 +1826,24 @@ targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatal |
| 1822 | 1826 | arm64e-macos, arm64e-maccatalyst ] |
| 1823 | 1827 | uuids: |
| 1824 | 1828 | - target: x86_64-macos |
| 1825 | value: 735E8A58-EA5A-3989-946E-D19037A7A9AD | |
| 1829 | value: A1C57F3C-0B85-367D-AFD8-CE4B01B638C6 | |
| 1826 | 1830 | - target: x86_64-maccatalyst |
| 1827 | value: 735E8A58-EA5A-3989-946E-D19037A7A9AD | |
| 1831 | value: A1C57F3C-0B85-367D-AFD8-CE4B01B638C6 | |
| 1828 | 1832 | - target: arm64-macos |
| 1829 | 1833 | value: 00000000-0000-0000-0000-000000000000 |
| 1830 | 1834 | - target: arm64-maccatalyst |
| 1831 | 1835 | value: 00000000-0000-0000-0000-000000000000 |
| 1832 | 1836 | - target: arm64e-macos |
| 1833 | value: 01C0D793-E5FB-3141-95D6-32A973F9FFF8 | |
| 1837 | value: D07777F4-2044-30E7-82FB-8F239F71A802 | |
| 1834 | 1838 | - target: arm64e-maccatalyst |
| 1835 | value: 01C0D793-E5FB-3141-95D6-32A973F9FFF8 | |
| 1839 | value: D07777F4-2044-30E7-82FB-8F239F71A802 | |
| 1836 | 1840 | install-name: '/usr/lib/system/libsystem_darwin.dylib' |
| 1837 | 1841 | parent-umbrella: |
| 1838 | 1842 | - targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatalyst, |
| 1839 | 1843 | arm64e-macos, arm64e-maccatalyst ] |
| 1840 | 1844 | umbrella: System |
| 1841 | 1845 | exports: |
| 1842 | - targets: [ x86_64-macos, arm64e-macos, x86_64-maccatalyst, arm64e-maccatalyst, | |
| 1846 | - targets: [ arm64e-macos, x86_64-macos, x86_64-maccatalyst, arm64e-maccatalyst, | |
| 1843 | 1847 | arm64-macos, arm64-maccatalyst ] |
| 1844 | 1848 | symbols: [ ___libdarwin_init, ___os_temporary_resource_shortage, _claimfd_np, |
| 1845 | 1849 | _close_drop_np, _close_drop_optional_np, _crfprintf_np, _dirstat_np, |
| ... | ... | @@ -1873,25 +1877,25 @@ targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatal |
| 1873 | 1877 | arm64e-macos, arm64e-maccatalyst ] |
| 1874 | 1878 | uuids: |
| 1875 | 1879 | - target: x86_64-macos |
| 1876 | value: C2A4351C-A3A5-3B23-AC6E-33E2EC933845 | |
| 1880 | value: 5E0FC1CB-9A90-3163-8BBF-19076AC6D14C | |
| 1877 | 1881 | - target: x86_64-maccatalyst |
| 1878 | value: C2A4351C-A3A5-3B23-AC6E-33E2EC933845 | |
| 1882 | value: 5E0FC1CB-9A90-3163-8BBF-19076AC6D14C | |
| 1879 | 1883 | - target: arm64-macos |
| 1880 | 1884 | value: 00000000-0000-0000-0000-000000000000 |
| 1881 | 1885 | - target: arm64-maccatalyst |
| 1882 | 1886 | value: 00000000-0000-0000-0000-000000000000 |
| 1883 | 1887 | - target: arm64e-macos |
| 1884 | value: AED9DAFC-7AB1-31CF-96A1-14C87B614DD3 | |
| 1888 | value: BCF907AB-64F2-3E2C-A203-9FCA6584C584 | |
| 1885 | 1889 | - target: arm64e-maccatalyst |
| 1886 | value: AED9DAFC-7AB1-31CF-96A1-14C87B614DD3 | |
| 1890 | value: BCF907AB-64F2-3E2C-A203-9FCA6584C584 | |
| 1887 | 1891 | install-name: '/usr/lib/system/libsystem_dnssd.dylib' |
| 1888 | current-version: 1556.30.12 | |
| 1892 | current-version: 1557.101.2 | |
| 1889 | 1893 | parent-umbrella: |
| 1890 | 1894 | - targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatalyst, |
| 1891 | 1895 | arm64e-macos, arm64e-maccatalyst ] |
| 1892 | 1896 | umbrella: System |
| 1893 | 1897 | exports: |
| 1894 | - targets: [ x86_64-macos, arm64e-macos, x86_64-maccatalyst, arm64e-maccatalyst, | |
| 1898 | - targets: [ arm64e-macos, x86_64-macos, x86_64-maccatalyst, arm64e-maccatalyst, | |
| 1895 | 1899 | arm64-macos, arm64-maccatalyst ] |
| 1896 | 1900 | symbols: [ _DNSServiceAddRecord, _DNSServiceBrowse, _DNSServiceConstructFullName, |
| 1897 | 1901 | _DNSServiceCreateConnection, _DNSServiceCreateDelegateConnection, |
| ... | ... | @@ -1916,25 +1920,25 @@ targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatal |
| 1916 | 1920 | arm64e-macos, arm64e-maccatalyst ] |
| 1917 | 1921 | uuids: |
| 1918 | 1922 | - target: x86_64-macos |
| 1919 | value: C922FEBB-3F3D-3009-885D-386706502278 | |
| 1923 | value: 1D848276-387D-39BE-BDCC-6491A766B421 | |
| 1920 | 1924 | - target: x86_64-maccatalyst |
| 1921 | value: C922FEBB-3F3D-3009-885D-386706502278 | |
| 1925 | value: 1D848276-387D-39BE-BDCC-6491A766B421 | |
| 1922 | 1926 | - target: arm64-macos |
| 1923 | 1927 | value: 00000000-0000-0000-0000-000000000000 |
| 1924 | 1928 | - target: arm64-maccatalyst |
| 1925 | 1929 | value: 00000000-0000-0000-0000-000000000000 |
| 1926 | 1930 | - target: arm64e-macos |
| 1927 | value: F0456F65-B4DF-3E14-91DC-C0C2A7954233 | |
| 1931 | value: 8BCCBE77-3AEB-3BDA-A6B6-4D1D0B7FFBCF | |
| 1928 | 1932 | - target: arm64e-maccatalyst |
| 1929 | value: F0456F65-B4DF-3E14-91DC-C0C2A7954233 | |
| 1933 | value: 8BCCBE77-3AEB-3BDA-A6B6-4D1D0B7FFBCF | |
| 1930 | 1934 | install-name: '/usr/lib/system/libsystem_featureflags.dylib' |
| 1931 | current-version: 54.30.2 | |
| 1935 | current-version: 56 | |
| 1932 | 1936 | parent-umbrella: |
| 1933 | 1937 | - targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatalyst, |
| 1934 | 1938 | arm64e-macos, arm64e-maccatalyst ] |
| 1935 | 1939 | umbrella: System |
| 1936 | 1940 | exports: |
| 1937 | - targets: [ x86_64-macos, arm64e-macos, x86_64-maccatalyst, arm64e-maccatalyst, | |
| 1941 | - targets: [ arm64e-macos, x86_64-macos, x86_64-maccatalyst, arm64e-maccatalyst, | |
| 1938 | 1942 | arm64-macos, arm64-maccatalyst ] |
| 1939 | 1943 | symbols: [ __os_feature_enabled_impl, __os_feature_enabled_simple_impl ] |
| 1940 | 1944 | --- !tapi-tbd |
| ... | ... | @@ -1943,24 +1947,24 @@ targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatal |
| 1943 | 1947 | arm64e-macos, arm64e-maccatalyst ] |
| 1944 | 1948 | uuids: |
| 1945 | 1949 | - target: x86_64-macos |
| 1946 | value: EC332A01-B383-3BBE-BD01-C732C1A9BF68 | |
| 1950 | value: 46CC22E7-C847-3A30-8B81-2E6CEF535451 | |
| 1947 | 1951 | - target: x86_64-maccatalyst |
| 1948 | value: EC332A01-B383-3BBE-BD01-C732C1A9BF68 | |
| 1952 | value: 46CC22E7-C847-3A30-8B81-2E6CEF535451 | |
| 1949 | 1953 | - target: arm64-macos |
| 1950 | 1954 | value: 00000000-0000-0000-0000-000000000000 |
| 1951 | 1955 | - target: arm64-maccatalyst |
| 1952 | 1956 | value: 00000000-0000-0000-0000-000000000000 |
| 1953 | 1957 | - target: arm64e-macos |
| 1954 | value: 5E36F087-5EF7-33B7-ACDA-CAE1C4A97621 | |
| 1958 | value: 2CE857CF-271D-3196-9087-0875C4D153BD | |
| 1955 | 1959 | - target: arm64e-maccatalyst |
| 1956 | value: 5E36F087-5EF7-33B7-ACDA-CAE1C4A97621 | |
| 1960 | value: 2CE857CF-271D-3196-9087-0875C4D153BD | |
| 1957 | 1961 | install-name: '/usr/lib/system/libsystem_info.dylib' |
| 1958 | 1962 | parent-umbrella: |
| 1959 | 1963 | - targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatalyst, |
| 1960 | 1964 | arm64e-macos, arm64e-maccatalyst ] |
| 1961 | 1965 | umbrella: System |
| 1962 | 1966 | exports: |
| 1963 | - targets: [ x86_64-macos, arm64e-macos, x86_64-maccatalyst, arm64e-maccatalyst, | |
| 1967 | - targets: [ arm64e-macos, x86_64-macos, x86_64-maccatalyst, arm64e-maccatalyst, | |
| 1964 | 1968 | arm64-macos, arm64-maccatalyst ] |
| 1965 | 1969 | symbols: [ _LI_get_thread_item, _LI_get_thread_list, _LI_ils_create, |
| 1966 | 1970 | _LI_set_thread_item, _LI_set_thread_list, ___dn_skipname, |
| ... | ... | @@ -2080,19 +2084,19 @@ targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatal |
| 2080 | 2084 | arm64e-macos, arm64e-maccatalyst ] |
| 2081 | 2085 | uuids: |
| 2082 | 2086 | - target: x86_64-macos |
| 2083 | value: A047541D-D968-3125-A5B1-B5A183385249 | |
| 2087 | value: 26A59789-B846-3ED4-96DC-8DBEF3C0C8E7 | |
| 2084 | 2088 | - target: x86_64-maccatalyst |
| 2085 | value: A047541D-D968-3125-A5B1-B5A183385249 | |
| 2089 | value: 26A59789-B846-3ED4-96DC-8DBEF3C0C8E7 | |
| 2086 | 2090 | - target: arm64-macos |
| 2087 | value: 2C89227C-13E1-3A3F-8417-67B7C86B441B | |
| 2091 | value: 8678B4ED-EC14-3851-8DA2-AE9902BBD5FC | |
| 2088 | 2092 | - target: arm64-maccatalyst |
| 2089 | value: 2C89227C-13E1-3A3F-8417-67B7C86B441B | |
| 2093 | value: 8678B4ED-EC14-3851-8DA2-AE9902BBD5FC | |
| 2090 | 2094 | - target: arm64e-macos |
| 2091 | value: 17550B77-D255-389A-B779-906AF75314B6 | |
| 2095 | value: 1D7B3B8E-75A1-34EA-AA52-9F7C23155C55 | |
| 2092 | 2096 | - target: arm64e-maccatalyst |
| 2093 | value: 17550B77-D255-389A-B779-906AF75314B6 | |
| 2097 | value: 1D7B3B8E-75A1-34EA-AA52-9F7C23155C55 | |
| 2094 | 2098 | install-name: '/usr/lib/system/libsystem_kernel.dylib' |
| 2095 | current-version: 8019.30.61 | |
| 2099 | current-version: 8020.101.4 | |
| 2096 | 2100 | parent-umbrella: |
| 2097 | 2101 | - targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatalyst, |
| 2098 | 2102 | arm64e-macos, arm64e-maccatalyst ] |
| ... | ... | @@ -2236,14 +2240,14 @@ exports: |
| 2236 | 2240 | _fchdir, _fchflags, _fchmod, _fchmodat, _fchown, _fchownat, |
| 2237 | 2241 | _fclonefileat, _fcntl, '_fcntl$NOCANCEL', _fdatasync, _ffsctl, |
| 2238 | 2242 | _fgetattrlist, _fgetxattr, _fhopen, _fileport_makefd, _fileport_makeport, |
| 2239 | _flistxattr, _flock, _fmount, _fpathconf, _fremovexattr, _fs_snapshot_create, | |
| 2240 | _fs_snapshot_delete, _fs_snapshot_list, _fs_snapshot_mount, | |
| 2241 | _fs_snapshot_rename, _fs_snapshot_revert, _fs_snapshot_root, | |
| 2242 | _fsctl, _fsetattrlist, _fsetxattr, _fsgetpath, _fsgetpath_ext, | |
| 2243 | _fstat, _fstat64, _fstatat, _fstatat64, _fstatfs, _fstatfs64, | |
| 2244 | _fsync, '_fsync$NOCANCEL', _ftruncate, _futimens, _futimes, | |
| 2245 | _getattrlist, _getattrlistat, _getattrlistbulk, _getaudit, | |
| 2246 | _getaudit_addr, _getauid, _getdirentries, _getdirentriesattr, | |
| 2243 | _flistxattr, _flock, _fmount, _fpathconf, _freadlink, _fremovexattr, | |
| 2244 | _fs_snapshot_create, _fs_snapshot_delete, _fs_snapshot_list, | |
| 2245 | _fs_snapshot_mount, _fs_snapshot_rename, _fs_snapshot_revert, | |
| 2246 | _fs_snapshot_root, _fsctl, _fsetattrlist, _fsetxattr, _fsgetpath, | |
| 2247 | _fsgetpath_ext, _fstat, _fstat64, _fstatat, _fstatat64, _fstatfs, | |
| 2248 | _fstatfs64, _fsync, '_fsync$NOCANCEL', _ftruncate, _futimens, | |
| 2249 | _futimes, _getattrlist, _getattrlistat, _getattrlistbulk, | |
| 2250 | _getaudit, _getaudit_addr, _getauid, _getdirentries, _getdirentriesattr, | |
| 2247 | 2251 | _getdtablesize, _getegid, _getentropy, _geteuid, _getfh, _getfsstat, |
| 2248 | 2252 | _getfsstat64, _getgid, _getgroups, _gethostuuid, _getiopolicy_np, |
| 2249 | 2253 | _getitimer, _getpeername, _getpgid, _getpgrp, _getpid, _getppid, |
| ... | ... | @@ -2435,42 +2439,42 @@ exports: |
| 2435 | 2439 | _posix_spawnattr_setpcontrol_np, _posix_spawnattr_setpgroup, |
| 2436 | 2440 | _posix_spawnattr_setprocesstype_np, _posix_spawnattr_setsigdefault, |
| 2437 | 2441 | _posix_spawnattr_setsigmask, _posix_spawnattr_setspecialport_np, |
| 2438 | _posix_spawnattr_setsuidcredport_np, _pread, '_pread$NOCANCEL', | |
| 2439 | _preadv, '_preadv$NOCANCEL', _proc_clear_cpulimits, _proc_clear_delayidlesleep, | |
| 2440 | _proc_clear_dirty, _proc_clear_vmpressure, _proc_current_thread_schedinfo, | |
| 2441 | _proc_denap_assertion_begin_with_msg, _proc_denap_assertion_complete, | |
| 2442 | _proc_disable_apptype, _proc_disable_cpumon, _proc_disable_wakemon, | |
| 2443 | _proc_donate_importance_boost, _proc_enable_apptype, _proc_get_cpumon_params, | |
| 2444 | _proc_get_dirty, _proc_get_wakemon_params, _proc_importance_assertion_begin_with_msg, | |
| 2445 | _proc_importance_assertion_complete, _proc_kmsgbuf, _proc_libversion, | |
| 2446 | _proc_list_dynkqueueids, _proc_list_uptrs, _proc_listallpids, | |
| 2447 | _proc_listchildpids, _proc_listcoalitions, _proc_listpgrppids, | |
| 2448 | _proc_listpids, _proc_listpidspath, _proc_name, _proc_pid_rusage, | |
| 2449 | _proc_piddynkqueueinfo, _proc_pidfdinfo, _proc_pidfileportinfo, | |
| 2450 | _proc_pidinfo, _proc_pidoriginatorinfo, _proc_pidpath, _proc_pidpath_audittoken, | |
| 2451 | _proc_regionfilename, _proc_reset_footprint_interval, _proc_resume_cpumon, | |
| 2452 | _proc_rlimit_control, _proc_set_cpumon_defaults, _proc_set_cpumon_params, | |
| 2453 | _proc_set_cpumon_params_fatal, _proc_set_csm, _proc_set_delayidlesleep, | |
| 2454 | _proc_set_dirty, _proc_set_no_smt, _proc_set_owner_vmpressure, | |
| 2455 | _proc_set_wakemon_defaults, _proc_set_wakemon_params, _proc_setcpu_percentage, | |
| 2456 | _proc_setpcontrol, _proc_setthread_cpupercent, _proc_setthread_csm, | |
| 2457 | _proc_setthread_no_smt, _proc_suppress, _proc_terminate, _proc_trace_log, | |
| 2458 | _proc_track_dirty, _proc_udata_info, _proc_uuid_policy, _processor_assign, | |
| 2459 | _processor_control, _processor_exit, _processor_get_assignment, | |
| 2460 | _processor_info, _processor_set_create, _processor_set_default, | |
| 2461 | _processor_set_destroy, _processor_set_info, _processor_set_max_priority, | |
| 2462 | _processor_set_policy_control, _processor_set_policy_disable, | |
| 2463 | _processor_set_policy_enable, _processor_set_stack_usage, | |
| 2464 | _processor_set_statistics, _processor_set_tasks, _processor_set_tasks_with_flavor, | |
| 2465 | _processor_set_threads, _processor_start, _pselect, '_pselect$DARWIN_EXTSN', | |
| 2466 | '_pselect$DARWIN_EXTSN$NOCANCEL', '_pselect$NOCANCEL', _pthread_getugid_np, | |
| 2467 | _pthread_setugid_np, _ptrace, _pwrite, '_pwrite$NOCANCEL', | |
| 2468 | _pwritev, '_pwritev$NOCANCEL', _quota, _quotactl, _read, '_read$NOCANCEL', | |
| 2469 | _readlink, _readlinkat, _readv, '_readv$NOCANCEL', _reboot, | |
| 2470 | _reboot_np, _recvfrom, '_recvfrom$NOCANCEL', _recvmsg, '_recvmsg$NOCANCEL', | |
| 2471 | _recvmsg_x, _register_uexc_handler, _removexattr, _rename, | |
| 2472 | _rename_ext, _renameat, _renameatx_np, _renamex_np, _revoke, | |
| 2473 | _rmdir, _searchfs, _select, '_select$DARWIN_EXTSN', '_select$DARWIN_EXTSN$NOCANCEL', | |
| 2442 | _pread, '_pread$NOCANCEL', _preadv, '_preadv$NOCANCEL', _proc_clear_cpulimits, | |
| 2443 | _proc_clear_delayidlesleep, _proc_clear_dirty, _proc_clear_vmpressure, | |
| 2444 | _proc_current_thread_schedinfo, _proc_denap_assertion_begin_with_msg, | |
| 2445 | _proc_denap_assertion_complete, _proc_disable_apptype, _proc_disable_cpumon, | |
| 2446 | _proc_disable_wakemon, _proc_donate_importance_boost, _proc_enable_apptype, | |
| 2447 | _proc_get_cpumon_params, _proc_get_dirty, _proc_get_wakemon_params, | |
| 2448 | _proc_importance_assertion_begin_with_msg, _proc_importance_assertion_complete, | |
| 2449 | _proc_kmsgbuf, _proc_libversion, _proc_list_dynkqueueids, | |
| 2450 | _proc_list_uptrs, _proc_listallpids, _proc_listchildpids, | |
| 2451 | _proc_listcoalitions, _proc_listpgrppids, _proc_listpids, | |
| 2452 | _proc_listpidspath, _proc_name, _proc_pid_rusage, _proc_piddynkqueueinfo, | |
| 2453 | _proc_pidfdinfo, _proc_pidfileportinfo, _proc_pidinfo, _proc_pidoriginatorinfo, | |
| 2454 | _proc_pidpath, _proc_pidpath_audittoken, _proc_regionfilename, | |
| 2455 | _proc_reset_footprint_interval, _proc_resume_cpumon, _proc_rlimit_control, | |
| 2456 | _proc_set_cpumon_defaults, _proc_set_cpumon_params, _proc_set_cpumon_params_fatal, | |
| 2457 | _proc_set_csm, _proc_set_delayidlesleep, _proc_set_dirty, | |
| 2458 | _proc_set_no_smt, _proc_set_owner_vmpressure, _proc_set_wakemon_defaults, | |
| 2459 | _proc_set_wakemon_params, _proc_setcpu_percentage, _proc_setpcontrol, | |
| 2460 | _proc_setthread_cpupercent, _proc_setthread_csm, _proc_setthread_no_smt, | |
| 2461 | _proc_suppress, _proc_terminate, _proc_trace_log, _proc_track_dirty, | |
| 2462 | _proc_udata_info, _proc_uuid_policy, _processor_assign, _processor_control, | |
| 2463 | _processor_exit, _processor_get_assignment, _processor_info, | |
| 2464 | _processor_set_create, _processor_set_default, _processor_set_destroy, | |
| 2465 | _processor_set_info, _processor_set_max_priority, _processor_set_policy_control, | |
| 2466 | _processor_set_policy_disable, _processor_set_policy_enable, | |
| 2467 | _processor_set_stack_usage, _processor_set_statistics, _processor_set_tasks, | |
| 2468 | _processor_set_tasks_with_flavor, _processor_set_threads, | |
| 2469 | _processor_start, _pselect, '_pselect$DARWIN_EXTSN', '_pselect$DARWIN_EXTSN$NOCANCEL', | |
| 2470 | '_pselect$NOCANCEL', _pthread_getugid_np, _pthread_setugid_np, | |
| 2471 | _ptrace, _pwrite, '_pwrite$NOCANCEL', _pwritev, '_pwritev$NOCANCEL', | |
| 2472 | _quota, _quotactl, _read, '_read$NOCANCEL', _readlink, _readlinkat, | |
| 2473 | _readv, '_readv$NOCANCEL', _reboot, _reboot_np, _recvfrom, | |
| 2474 | '_recvfrom$NOCANCEL', _recvmsg, '_recvmsg$NOCANCEL', _recvmsg_x, | |
| 2475 | _register_uexc_handler, _removexattr, _rename, _rename_ext, | |
| 2476 | _renameat, _renameatx_np, _renamex_np, _revoke, _rmdir, _searchfs, | |
| 2477 | _select, '_select$DARWIN_EXTSN', '_select$DARWIN_EXTSN$NOCANCEL', | |
| 2474 | 2478 | '_select$NOCANCEL', _sem_close, _sem_destroy, _sem_getvalue, |
| 2475 | 2479 | _sem_init, _sem_open, _sem_post, _sem_trywait, _sem_unlink, |
| 2476 | 2480 | _sem_wait, '_sem_wait$NOCANCEL', _semaphore_create, _semaphore_destroy, |
| ... | ... | @@ -2499,11 +2503,10 @@ exports: |
| 2499 | 2503 | _sync, _syscall, _syscall_thread_switch, _system_get_sfi_window, |
| 2500 | 2504 | _system_override, _system_set_sfi_window, _system_version_compat_mode, |
| 2501 | 2505 | _task_assign, _task_assign_default, _task_create, _task_create_identity_token, |
| 2502 | _task_create_suid_cred, _task_dyld_process_info_notify_deregister, | |
| 2503 | _task_dyld_process_info_notify_get, _task_dyld_process_info_notify_register, | |
| 2504 | _task_for_pid, _task_generate_corpse, _task_get_assignment, | |
| 2505 | _task_get_dyld_image_infos, _task_get_emulation_vector, _task_get_exc_guard_behavior, | |
| 2506 | _task_get_exception_ports, _task_get_exception_ports_info, | |
| 2506 | _task_dyld_process_info_notify_deregister, _task_dyld_process_info_notify_get, | |
| 2507 | _task_dyld_process_info_notify_register, _task_for_pid, _task_generate_corpse, | |
| 2508 | _task_get_assignment, _task_get_dyld_image_infos, _task_get_emulation_vector, | |
| 2509 | _task_get_exc_guard_behavior, _task_get_exception_ports, _task_get_exception_ports_info, | |
| 2507 | 2510 | _task_get_mach_voucher, _task_get_special_port, _task_get_state, |
| 2508 | 2511 | _task_identity_token_get_task_port, _task_info, _task_inspect, |
| 2509 | 2512 | _task_inspect_for_pid, _task_map_corpse_info, _task_map_corpse_info_64, |
| ... | ... | @@ -2518,10 +2521,10 @@ exports: |
| 2518 | 2521 | _task_set_phys_footprint_limit, _task_set_policy, _task_set_port_space, |
| 2519 | 2522 | _task_set_ras_pc, _task_set_special_port, _task_set_state, |
| 2520 | 2523 | _task_suspend, _task_suspend2, _task_swap_exception_ports, |
| 2521 | _task_swap_mach_voucher, _task_terminate, _task_test_sync_upcall, | |
| 2522 | _task_threads, _task_unregister_dyld_image_infos, _task_zone_info, | |
| 2523 | _terminate_with_payload, _terminate_with_reason, _thread_abort, | |
| 2524 | _thread_abort_safely, _thread_assign, _thread_assign_default, | |
| 2524 | _task_swap_mach_voucher, _task_terminate, _task_test_async_upcall_propagation, | |
| 2525 | _task_test_sync_upcall, _task_threads, _task_unregister_dyld_image_infos, | |
| 2526 | _task_zone_info, _terminate_with_payload, _terminate_with_reason, | |
| 2527 | _thread_abort, _thread_abort_safely, _thread_assign, _thread_assign_default, | |
| 2525 | 2528 | _thread_convert_thread_state, _thread_create, _thread_create_running, |
| 2526 | 2529 | _thread_depress_abort, _thread_destruct_special_reply_port, |
| 2527 | 2530 | _thread_get_assignment, _thread_get_exception_ports, _thread_get_exception_ports_info, |
| ... | ... | @@ -2565,23 +2568,23 @@ targets: [ x86_64-macos, x86_64-maccatalyst, x86_64h-macos, x86_64h-macc |
| 2565 | 2568 | arm64-macos, arm64-maccatalyst, arm64e-macos, arm64e-maccatalyst ] |
| 2566 | 2569 | uuids: |
| 2567 | 2570 | - target: x86_64-macos |
| 2568 | value: 661AE5A6-34E0-3786-BAAA-0EA7C1B5436E | |
| 2571 | value: ED42C002-0A3D-3CFC-A5B4-007E9F8450FD | |
| 2569 | 2572 | - target: x86_64-maccatalyst |
| 2570 | value: 661AE5A6-34E0-3786-BAAA-0EA7C1B5436E | |
| 2573 | value: ED42C002-0A3D-3CFC-A5B4-007E9F8450FD | |
| 2571 | 2574 | - target: x86_64h-macos |
| 2572 | value: 4CE470DB-BC4F-3CC6-863B-DF899045C30C | |
| 2575 | value: 5063016F-C5E4-3455-A057-CB3C3EEED7E8 | |
| 2573 | 2576 | - target: x86_64h-maccatalyst |
| 2574 | value: 4CE470DB-BC4F-3CC6-863B-DF899045C30C | |
| 2577 | value: 5063016F-C5E4-3455-A057-CB3C3EEED7E8 | |
| 2575 | 2578 | - target: arm64-macos |
| 2576 | 2579 | value: 00000000-0000-0000-0000-000000000000 |
| 2577 | 2580 | - target: arm64-maccatalyst |
| 2578 | 2581 | value: 00000000-0000-0000-0000-000000000000 |
| 2579 | 2582 | - target: arm64e-macos |
| 2580 | value: 6AB180A4-1D1E-3FA1-88B7-A7866EFACFC8 | |
| 2583 | value: E02AEB06-0AB6-3743-BF8C-02CEFA571365 | |
| 2581 | 2584 | - target: arm64e-maccatalyst |
| 2582 | value: 6AB180A4-1D1E-3FA1-88B7-A7866EFACFC8 | |
| 2585 | value: E02AEB06-0AB6-3743-BF8C-02CEFA571365 | |
| 2583 | 2586 | install-name: '/usr/lib/system/libsystem_m.dylib' |
| 2584 | current-version: 3204 | |
| 2587 | current-version: 3204.80.2 | |
| 2585 | 2588 | parent-umbrella: |
| 2586 | 2589 | - targets: [ x86_64-macos, x86_64-maccatalyst, x86_64h-macos, x86_64h-maccatalyst, |
| 2587 | 2590 | arm64-macos, arm64-maccatalyst, arm64e-macos, arm64e-maccatalyst ] |
| ... | ... | @@ -2710,7 +2713,7 @@ exports: |
| 2710 | 2713 | '_tanhl$fenv_access_off', '_tanl$fenv_access_off', '_tgamma$fenv_access_off', |
| 2711 | 2714 | '_tgammaf$fenv_access_off', '_tgammal$fenv_access_off', '_trunc$fenv_access_off', |
| 2712 | 2715 | '_truncf$fenv_access_off', '_truncl$fenv_access_off' ] |
| 2713 | - targets: [ x86_64-macos, arm64e-macos, x86_64h-macos, x86_64-maccatalyst, | |
| 2716 | - targets: [ arm64e-macos, x86_64-macos, x86_64h-macos, x86_64-maccatalyst, | |
| 2714 | 2717 | x86_64h-maccatalyst, arm64e-maccatalyst, arm64-macos, arm64-maccatalyst ] |
| 2715 | 2718 | symbols: [ __FE_DFL_ENV, ___Libm_version, ___cos_d2, ___cos_f4, ___cospi, |
| 2716 | 2719 | ___cospif, ___exp10, ___exp10f, ___fegetfltrounds, ___fpclassifyd, |
| ... | ... | @@ -2795,25 +2798,25 @@ targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatal |
| 2795 | 2798 | arm64e-macos, arm64e-maccatalyst ] |
| 2796 | 2799 | uuids: |
| 2797 | 2800 | - target: x86_64-macos |
| 2798 | value: BA9DF725-FC7D-3856-90F7-0100C841DBFE | |
| 2801 | value: CD1AD5BA-470D-33FF-A864-5FC3A18AB7C3 | |
| 2799 | 2802 | - target: x86_64-maccatalyst |
| 2800 | value: BA9DF725-FC7D-3856-90F7-0100C841DBFE | |
| 2803 | value: CD1AD5BA-470D-33FF-A864-5FC3A18AB7C3 | |
| 2801 | 2804 | - target: arm64-macos |
| 2802 | 2805 | value: 00000000-0000-0000-0000-000000000000 |
| 2803 | 2806 | - target: arm64-maccatalyst |
| 2804 | 2807 | value: 00000000-0000-0000-0000-000000000000 |
| 2805 | 2808 | - target: arm64e-macos |
| 2806 | value: 7C9F7726-62C1-3B03-8130-03E8A2A68DDF | |
| 2809 | value: 3A021C33-DD59-37F7-9A86-5CEED68FF9BA | |
| 2807 | 2810 | - target: arm64e-maccatalyst |
| 2808 | value: 7C9F7726-62C1-3B03-8130-03E8A2A68DDF | |
| 2811 | value: 3A021C33-DD59-37F7-9A86-5CEED68FF9BA | |
| 2809 | 2812 | install-name: '/usr/lib/system/libsystem_malloc.dylib' |
| 2810 | current-version: 372.30.4 | |
| 2813 | current-version: 374.100.5 | |
| 2811 | 2814 | parent-umbrella: |
| 2812 | 2815 | - targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatalyst, |
| 2813 | 2816 | arm64e-macos, arm64e-maccatalyst ] |
| 2814 | 2817 | umbrella: System |
| 2815 | 2818 | exports: |
| 2816 | - targets: [ x86_64-macos, arm64e-macos, x86_64-maccatalyst, arm64e-maccatalyst, | |
| 2819 | - targets: [ arm64e-macos, x86_64-macos, x86_64-maccatalyst, arm64e-maccatalyst, | |
| 2817 | 2820 | arm64-macos, arm64-maccatalyst ] |
| 2818 | 2821 | symbols: [ ___mach_stack_logging_copy_uniquing_table, ___mach_stack_logging_enumerate_records, |
| 2819 | 2822 | ___mach_stack_logging_frames_for_uniqued_stack, ___mach_stack_logging_get_frames, |
| ... | ... | @@ -2858,24 +2861,24 @@ targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatal |
| 2858 | 2861 | arm64e-macos, arm64e-maccatalyst ] |
| 2859 | 2862 | uuids: |
| 2860 | 2863 | - target: x86_64-macos |
| 2861 | value: ACE11FA2-1955-3276-9343-D49A2B2059C5 | |
| 2864 | value: 9394E64A-D1D5-362C-98DB-760C7C15B9BE | |
| 2862 | 2865 | - target: x86_64-maccatalyst |
| 2863 | value: ACE11FA2-1955-3276-9343-D49A2B2059C5 | |
| 2866 | value: 9394E64A-D1D5-362C-98DB-760C7C15B9BE | |
| 2864 | 2867 | - target: arm64-macos |
| 2865 | 2868 | value: 00000000-0000-0000-0000-000000000000 |
| 2866 | 2869 | - target: arm64-maccatalyst |
| 2867 | 2870 | value: 00000000-0000-0000-0000-000000000000 |
| 2868 | 2871 | - target: arm64e-macos |
| 2869 | value: 2F331637-80F6-3208-816F-618DA9081899 | |
| 2872 | value: 8D842641-0F27-34B1-AEFC-C95B178E5433 | |
| 2870 | 2873 | - target: arm64e-maccatalyst |
| 2871 | value: 2F331637-80F6-3208-816F-618DA9081899 | |
| 2874 | value: 8D842641-0F27-34B1-AEFC-C95B178E5433 | |
| 2872 | 2875 | install-name: '/usr/lib/system/libsystem_networkextension.dylib' |
| 2873 | 2876 | parent-umbrella: |
| 2874 | 2877 | - targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatalyst, |
| 2875 | 2878 | arm64e-macos, arm64e-maccatalyst ] |
| 2876 | 2879 | umbrella: System |
| 2877 | 2880 | exports: |
| 2878 | - targets: [ x86_64-macos, arm64e-macos, x86_64-maccatalyst, arm64e-maccatalyst, | |
| 2881 | - targets: [ arm64e-macos, x86_64-macos, x86_64-maccatalyst, arm64e-maccatalyst, | |
| 2879 | 2882 | arm64-macos, arm64-maccatalyst ] |
| 2880 | 2883 | symbols: [ _NEHelperCacheAddRedirectedAddress, _NEHelperCacheClearRedirectedAddresses, |
| 2881 | 2884 | _NEHelperCacheClearUUIDs, _NEHelperCacheCopyAppUUIDMapping, |
| ... | ... | @@ -2883,18 +2886,19 @@ exports: |
| 2883 | 2886 | _NEHelperCacheCopySigningIdentifierMapping, _NEHelperCacheSetDomainDictionaries, |
| 2884 | 2887 | _NEHelperCacheSetRoutes, _NEHelperCopyAggregatePathRules, |
| 2885 | 2888 | _NEHelperCopyAppInfo, _NEHelperCopyCurrentNetworkAsync, _NEHelperCopyCurrentNetworkInfo, |
| 2886 | _NEHelperCopyPerAppDomains, _NEHelperCopyPreferredBundleID, | |
| 2887 | _NEHelperCopyResponse, _NEHelperGetIKESocket, _NEHelperGetIKESocketWithResult, | |
| 2888 | _NEHelperGetKernelControlSocket, _NEHelperGetKernelControlSocketExtended, | |
| 2889 | _NEHelperGetNECPSessionFD, _NEHelperGetPFKeySocket, _NEHelperHandleConfigurationsChangedBySC, | |
| 2889 | _NEHelperCopyPerAppDomains, _NEHelperCopyResponse, _NEHelperGetIKESocket, | |
| 2890 | _NEHelperGetIKESocketWithResult, _NEHelperGetKernelControlSocket, | |
| 2891 | _NEHelperGetKernelControlSocketExtended, _NEHelperGetNECPSessionFD, | |
| 2892 | _NEHelperGetPFKeySocket, _NEHelperHandleConfigurationsChangedBySC, | |
| 2890 | 2893 | _NEHelperInit, _NEHelperInterfaceRemoveAddress, _NEHelperInterfaceSetAddress, |
| 2891 | _NEHelperInterfaceSetMTU, _NEHelperInterfaceSetOption, _NEHelperSendRequest, | |
| 2892 | _NEHelperSettingsSetArray, _NEHelperSettingsSetBool, _NEHelperSettingsSetNumber, | |
| 2893 | _NEHelperVPNConfigurationExists, _NEHelperVPNSetEnabled, _g_ne_read_uuid_cache, | |
| 2894 | _g_ne_uuid_cache_hit, _ne_copy_cached_bundle_identifier_for_uuid, | |
| 2895 | _ne_copy_cached_preferred_bundle_for_bundle_identifier, _ne_copy_cached_uuids_for_bundle_identifier, | |
| 2896 | _ne_copy_signature_info_for_pid, _ne_copy_signing_identifier_for_pid, | |
| 2897 | _ne_copy_uuid_cache, _ne_force_reset_uuid_cache, _ne_get_configuration_generation, | |
| 2894 | _NEHelperInterfaceSetAddressWithLifetime, _NEHelperInterfaceSetMTU, | |
| 2895 | _NEHelperInterfaceSetOption, _NEHelperSendRequest, _NEHelperSettingsSetArray, | |
| 2896 | _NEHelperSettingsSetBool, _NEHelperSettingsSetNumber, _NEHelperVPNConfigurationExists, | |
| 2897 | _NEHelperVPNSetEnabled, _g_ne_read_uuid_cache, _g_ne_uuid_cache_hit, | |
| 2898 | _ne_copy_cached_bundle_identifier_for_uuid, _ne_copy_cached_preferred_bundle_for_bundle_identifier, | |
| 2899 | _ne_copy_cached_uuids_for_bundle_identifier, _ne_copy_signature_info_for_pid, | |
| 2900 | _ne_copy_signing_identifier_for_pid, _ne_copy_uuid_cache, | |
| 2901 | _ne_force_reset_uuid_cache, _ne_get_configuration_generation, | |
| 2898 | 2902 | _ne_is_sockaddr_valid, _ne_log_large_obj, _ne_log_obj, _ne_print_backtrace, |
| 2899 | 2903 | _ne_privacy_dns_netagent_id, _ne_privacy_proxy_netagent_id, |
| 2900 | 2904 | _ne_session_add_necp_drop_dest_from_dest_list, _ne_session_add_necp_drop_dest_from_path, |
| ... | ... | @@ -2931,10 +2935,11 @@ exports: |
| 2931 | 2935 | _ne_session_start_with_options, _ne_session_status_to_string, |
| 2932 | 2936 | _ne_session_stop, _ne_session_stop_all_with_plugin_type, _ne_session_stop_reason_to_string, |
| 2933 | 2937 | _ne_session_type_to_string, _ne_session_use_as_system_vpn, |
| 2934 | _ne_session_vpn_include_all_networks_configs_present, _ne_socket_set_attribution, | |
| 2935 | _ne_socket_set_domains, _ne_socket_set_is_app_initiated, _ne_socket_set_website_attribution, | |
| 2936 | _ne_tracker_build_cache, _ne_tracker_build_trie, _ne_tracker_check_info_changed, | |
| 2937 | _ne_tracker_clear_cache, _ne_tracker_context_get_domain, _ne_tracker_context_get_domain_owner, | |
| 2938 | _ne_session_vod_evaluate_connection_present, _ne_session_vpn_include_all_networks_configs_present, | |
| 2939 | _ne_socket_set_attribution, _ne_socket_set_domains, _ne_socket_set_is_app_initiated, | |
| 2940 | _ne_socket_set_website_attribution, _ne_tracker_build_cache, | |
| 2941 | _ne_tracker_build_trie, _ne_tracker_check_info_changed, _ne_tracker_clear_cache, | |
| 2942 | _ne_tracker_context_get_domain, _ne_tracker_context_get_domain_owner, | |
| 2938 | 2943 | _ne_tracker_context_is_from_app_list, _ne_tracker_context_is_from_web_list, |
| 2939 | 2944 | _ne_tracker_get_ddg_dictionary, _ne_tracker_lookup_app_domains, |
| 2940 | 2945 | _ne_tracker_set_test_domains, _ne_tracker_validate_domain, |
| ... | ... | @@ -2949,17 +2954,17 @@ targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatal |
| 2949 | 2954 | arm64e-macos, arm64e-maccatalyst ] |
| 2950 | 2955 | uuids: |
| 2951 | 2956 | - target: x86_64-macos |
| 2952 | value: 6C34EA32-0C1D-35E9-BB3B-32D8185F3C4E | |
| 2957 | value: 90E8AC4C-D13B-3E0C-82CA-4179D34F4EC6 | |
| 2953 | 2958 | - target: x86_64-maccatalyst |
| 2954 | value: 6C34EA32-0C1D-35E9-BB3B-32D8185F3C4E | |
| 2959 | value: 90E8AC4C-D13B-3E0C-82CA-4179D34F4EC6 | |
| 2955 | 2960 | - target: arm64-macos |
| 2956 | 2961 | value: 00000000-0000-0000-0000-000000000000 |
| 2957 | 2962 | - target: arm64-maccatalyst |
| 2958 | 2963 | value: 00000000-0000-0000-0000-000000000000 |
| 2959 | 2964 | - target: arm64e-macos |
| 2960 | value: 3701D756-7023-30C0-9A36-852971092AA9 | |
| 2965 | value: 5FF2DA89-8A88-34BB-AA68-BA9C5D24E639 | |
| 2961 | 2966 | - target: arm64e-maccatalyst |
| 2962 | value: 3701D756-7023-30C0-9A36-852971092AA9 | |
| 2967 | value: 5FF2DA89-8A88-34BB-AA68-BA9C5D24E639 | |
| 2963 | 2968 | install-name: '/usr/lib/system/libsystem_notify.dylib' |
| 2964 | 2969 | current-version: 301 |
| 2965 | 2970 | parent-umbrella: |
| ... | ... | @@ -2967,7 +2972,7 @@ parent-umbrella: |
| 2967 | 2972 | arm64e-macos, arm64e-maccatalyst ] |
| 2968 | 2973 | umbrella: System |
| 2969 | 2974 | exports: |
| 2970 | - targets: [ x86_64-macos, arm64e-macos, x86_64-maccatalyst, arm64e-maccatalyst, | |
| 2975 | - targets: [ arm64e-macos, x86_64-macos, x86_64-maccatalyst, arm64e-maccatalyst, | |
| 2971 | 2976 | arm64-macos, arm64-maccatalyst ] |
| 2972 | 2977 | symbols: [ __notify_fork_child, _notify_cancel, _notify_check, _notify_dump_status, |
| 2973 | 2978 | _notify_get_event, _notify_get_state, _notify_is_valid_token, |
| ... | ... | @@ -2982,19 +2987,19 @@ targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatal |
| 2982 | 2987 | arm64e-macos, arm64e-maccatalyst ] |
| 2983 | 2988 | uuids: |
| 2984 | 2989 | - target: x86_64-macos |
| 2985 | value: 4665F1E0-723C-3A58-81D6-220988B34F30 | |
| 2990 | value: A9552F53-A0CD-3E43-9930-80E582ED51FF | |
| 2986 | 2991 | - target: x86_64-maccatalyst |
| 2987 | value: 4665F1E0-723C-3A58-81D6-220988B34F30 | |
| 2992 | value: A9552F53-A0CD-3E43-9930-80E582ED51FF | |
| 2988 | 2993 | - target: arm64-macos |
| 2989 | value: DB2D2703-9015-37B8-A9CA-59F9672D5BC6 | |
| 2994 | value: A8C155A3-9295-340C-94A2-80B29BBA7A10 | |
| 2990 | 2995 | - target: arm64-maccatalyst |
| 2991 | value: DB2D2703-9015-37B8-A9CA-59F9672D5BC6 | |
| 2996 | value: A8C155A3-9295-340C-94A2-80B29BBA7A10 | |
| 2992 | 2997 | - target: arm64e-macos |
| 2993 | value: 8B28F7A3-6681-3D34-92AE-3688A74F50E6 | |
| 2998 | value: 84FA5DD0-806C-310E-B047-479924CD688C | |
| 2994 | 2999 | - target: arm64e-maccatalyst |
| 2995 | value: 8B28F7A3-6681-3D34-92AE-3688A74F50E6 | |
| 3000 | value: 84FA5DD0-806C-310E-B047-479924CD688C | |
| 2996 | 3001 | install-name: '/usr/lib/system/libsystem_platform.dylib' |
| 2997 | current-version: 272 | |
| 3002 | current-version: 273.100.5 | |
| 2998 | 3003 | parent-umbrella: |
| 2999 | 3004 | - targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatalyst, |
| 3000 | 3005 | arm64e-macos, arm64e-maccatalyst ] |
| ... | ... | @@ -3074,17 +3079,17 @@ targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatal |
| 3074 | 3079 | arm64e-macos, arm64e-maccatalyst ] |
| 3075 | 3080 | uuids: |
| 3076 | 3081 | - target: x86_64-macos |
| 3077 | value: D0578DF0-DD14-3D5D-AD59-248764AC666E | |
| 3082 | value: CC59553D-E561-3196-9A5C-4DBA8C385275 | |
| 3078 | 3083 | - target: x86_64-maccatalyst |
| 3079 | value: D0578DF0-DD14-3D5D-AD59-248764AC666E | |
| 3084 | value: CC59553D-E561-3196-9A5C-4DBA8C385275 | |
| 3080 | 3085 | - target: arm64-macos |
| 3081 | 3086 | value: 00000000-0000-0000-0000-000000000000 |
| 3082 | 3087 | - target: arm64-maccatalyst |
| 3083 | 3088 | value: 00000000-0000-0000-0000-000000000000 |
| 3084 | 3089 | - target: arm64e-macos |
| 3085 | value: 4234FAEC-7D18-30E7-AEAD-E9FB6922AFE9 | |
| 3090 | value: 21E3CB05-5B01-3BAA-8F17-84E8181778C0 | |
| 3086 | 3091 | - target: arm64e-maccatalyst |
| 3087 | value: 4234FAEC-7D18-30E7-AEAD-E9FB6922AFE9 | |
| 3092 | value: 21E3CB05-5B01-3BAA-8F17-84E8181778C0 | |
| 3088 | 3093 | install-name: '/usr/lib/system/libsystem_product_info_filter.dylib' |
| 3089 | 3094 | current-version: 10 |
| 3090 | 3095 | parent-umbrella: |
| ... | ... | @@ -3097,19 +3102,19 @@ targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatal |
| 3097 | 3102 | arm64e-macos, arm64e-maccatalyst ] |
| 3098 | 3103 | uuids: |
| 3099 | 3104 | - target: x86_64-macos |
| 3100 | value: 9D8930B0-D6B4-31B4-B7A5-DEBB4C606EF4 | |
| 3105 | value: 2F6C275D-7E14-3D31-A924-E1BB41D2415F | |
| 3101 | 3106 | - target: x86_64-maccatalyst |
| 3102 | value: 9D8930B0-D6B4-31B4-B7A5-DEBB4C606EF4 | |
| 3107 | value: 2F6C275D-7E14-3D31-A924-E1BB41D2415F | |
| 3103 | 3108 | - target: arm64-macos |
| 3104 | value: 0BFB3F12-FA30-3002-AF01-0B0D19DEC76B | |
| 3109 | value: 9507407A-B251-3158-BC81-8CABBEBE34DE | |
| 3105 | 3110 | - target: arm64-maccatalyst |
| 3106 | value: 0BFB3F12-FA30-3002-AF01-0B0D19DEC76B | |
| 3111 | value: 9507407A-B251-3158-BC81-8CABBEBE34DE | |
| 3107 | 3112 | - target: arm64e-macos |
| 3108 | value: AA39FF66-B3F0-3777-99BC-F4A4C5CBD566 | |
| 3113 | value: CEE8BC77-6923-34D9-89A3-6F8F7279605E | |
| 3109 | 3114 | - target: arm64e-maccatalyst |
| 3110 | value: AA39FF66-B3F0-3777-99BC-F4A4C5CBD566 | |
| 3115 | value: CEE8BC77-6923-34D9-89A3-6F8F7279605E | |
| 3111 | 3116 | install-name: '/usr/lib/system/libsystem_pthread.dylib' |
| 3112 | current-version: 485.30.3 | |
| 3117 | current-version: 486.100.11 | |
| 3113 | 3118 | parent-umbrella: |
| 3114 | 3119 | - targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatalyst, |
| 3115 | 3120 | arm64e-macos, arm64e-maccatalyst ] |
| ... | ... | @@ -3117,8 +3122,8 @@ parent-umbrella: |
| 3117 | 3122 | exports: |
| 3118 | 3123 | - targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatalyst, |
| 3119 | 3124 | arm64e-macos, arm64e-maccatalyst ] |
| 3120 | symbols: [ __pthread_is_threaded, _cthread_yield ] | |
| 3121 | - targets: [ arm64e-macos, x86_64-macos, arm64-macos, x86_64-maccatalyst, | |
| 3125 | symbols: [ __pthread_is_threaded, _cthread_yield, _pthread_prefer_alternate_amx_self ] | |
| 3126 | - targets: [ arm64-macos, arm64e-macos, x86_64-macos, x86_64-maccatalyst, | |
| 3122 | 3127 | arm64-maccatalyst, arm64e-maccatalyst ] |
| 3123 | 3128 | symbols: [ ____chkstk_darwin, ___is_threaded, ___pthread_init, ___pthread_late_init, |
| 3124 | 3129 | ___pthread_workqueue_setkill, ___unix_conforming, __pthread_atfork_child, |
| ... | ... | @@ -3168,21 +3173,21 @@ exports: |
| 3168 | 3173 | _pthread_getspecific, _pthread_install_workgroup_functions_np, |
| 3169 | 3174 | _pthread_introspection_getspecific_np, _pthread_introspection_hook_install, |
| 3170 | 3175 | _pthread_introspection_setspecific_np, _pthread_is_threaded_np, |
| 3171 | _pthread_jit_write_protect_np, _pthread_jit_write_protect_supported_np, | |
| 3172 | _pthread_jit_write_with_callback_np, _pthread_join, '_pthread_join$NOCANCEL', | |
| 3173 | _pthread_key_create, _pthread_key_delete, _pthread_key_init_np, | |
| 3174 | _pthread_kill, _pthread_layout_offsets, _pthread_mach_thread_np, | |
| 3175 | _pthread_main_np, _pthread_main_thread_np, _pthread_mutex_destroy, | |
| 3176 | _pthread_mutex_getprioceiling, _pthread_mutex_init, _pthread_mutex_lock, | |
| 3177 | _pthread_mutex_setprioceiling, _pthread_mutex_trylock, _pthread_mutex_unlock, | |
| 3178 | _pthread_mutexattr_destroy, _pthread_mutexattr_getpolicy_np, | |
| 3179 | _pthread_mutexattr_getprioceiling, _pthread_mutexattr_getprotocol, | |
| 3180 | _pthread_mutexattr_getpshared, _pthread_mutexattr_gettype, | |
| 3181 | _pthread_mutexattr_init, _pthread_mutexattr_setpolicy_np, | |
| 3176 | _pthread_jit_write_freeze_callbacks_np, _pthread_jit_write_protect_np, | |
| 3177 | _pthread_jit_write_protect_supported_np, _pthread_jit_write_with_callback_np, | |
| 3178 | _pthread_join, '_pthread_join$NOCANCEL', _pthread_key_create, | |
| 3179 | _pthread_key_delete, _pthread_key_init_np, _pthread_kill, | |
| 3180 | _pthread_layout_offsets, _pthread_mach_thread_np, _pthread_main_np, | |
| 3181 | _pthread_main_thread_np, _pthread_mutex_destroy, _pthread_mutex_getprioceiling, | |
| 3182 | _pthread_mutex_init, _pthread_mutex_lock, _pthread_mutex_setprioceiling, | |
| 3183 | _pthread_mutex_trylock, _pthread_mutex_unlock, _pthread_mutexattr_destroy, | |
| 3184 | _pthread_mutexattr_getpolicy_np, _pthread_mutexattr_getprioceiling, | |
| 3185 | _pthread_mutexattr_getprotocol, _pthread_mutexattr_getpshared, | |
| 3186 | _pthread_mutexattr_gettype, _pthread_mutexattr_init, _pthread_mutexattr_setpolicy_np, | |
| 3182 | 3187 | _pthread_mutexattr_setprioceiling, _pthread_mutexattr_setprotocol, |
| 3183 | 3188 | _pthread_mutexattr_setpshared, _pthread_mutexattr_settype, |
| 3184 | 3189 | _pthread_once, _pthread_override_qos_class_end_np, _pthread_override_qos_class_start_np, |
| 3185 | _pthread_prefer_alternate_amx_self, _pthread_qos_max_parallelism, | |
| 3190 | _pthread_prefer_alternate_cluster_self, _pthread_qos_max_parallelism, | |
| 3186 | 3191 | _pthread_rwlock_destroy, _pthread_rwlock_init, _pthread_rwlock_rdlock, |
| 3187 | 3192 | _pthread_rwlock_tryrdlock, _pthread_rwlock_trywrlock, _pthread_rwlock_unlock, |
| 3188 | 3193 | _pthread_rwlock_wrlock, _pthread_rwlockattr_destroy, _pthread_rwlockattr_getpshared, |
| ... | ... | @@ -3204,25 +3209,25 @@ targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatal |
| 3204 | 3209 | arm64e-macos, arm64e-maccatalyst ] |
| 3205 | 3210 | uuids: |
| 3206 | 3211 | - target: x86_64-macos |
| 3207 | value: 878A6693-2E70-3697-A941-8745C00A47D7 | |
| 3212 | value: F7BD34BF-4F11-3C48-BD8B-BFC81C09CF2A | |
| 3208 | 3213 | - target: x86_64-maccatalyst |
| 3209 | value: 878A6693-2E70-3697-A941-8745C00A47D7 | |
| 3214 | value: F7BD34BF-4F11-3C48-BD8B-BFC81C09CF2A | |
| 3210 | 3215 | - target: arm64-macos |
| 3211 | 3216 | value: 00000000-0000-0000-0000-000000000000 |
| 3212 | 3217 | - target: arm64-maccatalyst |
| 3213 | 3218 | value: 00000000-0000-0000-0000-000000000000 |
| 3214 | 3219 | - target: arm64e-macos |
| 3215 | value: 1214F568-24BF-379F-8A86-FF947EE5F18A | |
| 3220 | value: 9180A377-715B-3790-81DB-AB51A9F0C3C0 | |
| 3216 | 3221 | - target: arm64e-maccatalyst |
| 3217 | value: 1214F568-24BF-379F-8A86-FF947EE5F18A | |
| 3222 | value: 9180A377-715B-3790-81DB-AB51A9F0C3C0 | |
| 3218 | 3223 | install-name: '/usr/lib/system/libsystem_sandbox.dylib' |
| 3219 | current-version: 1656.30.23 | |
| 3224 | current-version: 1657.101.2 | |
| 3220 | 3225 | parent-umbrella: |
| 3221 | 3226 | - targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatalyst, |
| 3222 | 3227 | arm64e-macos, arm64e-maccatalyst ] |
| 3223 | 3228 | umbrella: System |
| 3224 | 3229 | exports: |
| 3225 | - targets: [ x86_64-macos, arm64e-macos, x86_64-maccatalyst, arm64e-maccatalyst, | |
| 3230 | - targets: [ arm64e-macos, x86_64-macos, x86_64-maccatalyst, arm64e-maccatalyst, | |
| 3226 | 3231 | arm64-macos, arm64-maccatalyst ] |
| 3227 | 3232 | symbols: [ _APP_SANDBOX_IOKIT_CLIENT, _APP_SANDBOX_MACH, _APP_SANDBOX_READ, |
| 3228 | 3233 | _APP_SANDBOX_READ_WRITE, _IOS_SANDBOX_APPLICATION_GROUP, _IOS_SANDBOX_CONTAINER, |
| ... | ... | @@ -3251,12 +3256,12 @@ exports: |
| 3251 | 3256 | _sandbox_check_message_filter_string, _sandbox_consume_extension, |
| 3252 | 3257 | _sandbox_consume_fs_extension, _sandbox_consume_mach_extension, |
| 3253 | 3258 | _sandbox_container_path_for_audit_token, _sandbox_container_path_for_pid, |
| 3254 | _sandbox_enable_root_translation, _sandbox_extension_consume, | |
| 3255 | _sandbox_extension_issue_file, _sandbox_extension_issue_file_to_process, | |
| 3256 | _sandbox_extension_issue_file_to_process_by_pid, _sandbox_extension_issue_file_to_self, | |
| 3257 | _sandbox_extension_issue_generic, _sandbox_extension_issue_generic_to_process, | |
| 3258 | _sandbox_extension_issue_generic_to_process_by_pid, _sandbox_extension_issue_iokit_registry_entry_class, | |
| 3259 | _sandbox_extension_issue_iokit_registry_entry_class_to_process, | |
| 3259 | _sandbox_enable_root_translation, _sandbox_enable_state_flag, | |
| 3260 | _sandbox_extension_consume, _sandbox_extension_issue_file, | |
| 3261 | _sandbox_extension_issue_file_to_process, _sandbox_extension_issue_file_to_process_by_pid, | |
| 3262 | _sandbox_extension_issue_file_to_self, _sandbox_extension_issue_generic, | |
| 3263 | _sandbox_extension_issue_generic_to_process, _sandbox_extension_issue_generic_to_process_by_pid, | |
| 3264 | _sandbox_extension_issue_iokit_registry_entry_class, _sandbox_extension_issue_iokit_registry_entry_class_to_process, | |
| 3260 | 3265 | _sandbox_extension_issue_iokit_registry_entry_class_to_process_by_pid, |
| 3261 | 3266 | _sandbox_extension_issue_iokit_user_client_class, _sandbox_extension_issue_mach, |
| 3262 | 3267 | _sandbox_extension_issue_mach_to_process, _sandbox_extension_issue_mach_to_process_by_pid, |
| ... | ... | @@ -3266,41 +3271,43 @@ exports: |
| 3266 | 3271 | _sandbox_init_from_pid, _sandbox_init_with_extensions, _sandbox_init_with_parameters, |
| 3267 | 3272 | _sandbox_issue_extension, _sandbox_issue_fs_extension, _sandbox_issue_fs_rw_extension, |
| 3268 | 3273 | _sandbox_issue_mach_extension, _sandbox_message_filter_query, |
| 3269 | _sandbox_message_filter_release, _sandbox_note, _sandbox_passthrough_access, | |
| 3270 | _sandbox_proc_getcontainer, _sandbox_proc_getprofilename, | |
| 3271 | _sandbox_query_approval_policy_for_path, _sandbox_query_user_intent_for_process_with_audit_token, | |
| 3272 | _sandbox_reference_release, _sandbox_reference_retain_by_audit_token, | |
| 3274 | _sandbox_message_filter_release, _sandbox_message_filter_retain, | |
| 3275 | _sandbox_note, _sandbox_passthrough_access, _sandbox_proc_getcontainer, | |
| 3276 | _sandbox_proc_getprofilename, _sandbox_query_approval_policy_for_path, | |
| 3277 | _sandbox_query_user_intent_for_process_with_audit_token, _sandbox_reference_release, | |
| 3278 | _sandbox_reference_retain_by_audit_token, _sandbox_register_app_bundle, | |
| 3273 | 3279 | _sandbox_release_fs_extension, _sandbox_requests_integrity_protection_for_preference_domain, |
| 3274 | 3280 | _sandbox_set_container_path_for_application_group, _sandbox_set_container_path_for_application_group_with_persona, |
| 3275 | 3281 | _sandbox_set_container_path_for_signing_id, _sandbox_set_container_path_for_signing_id_with_persona, |
| 3276 | 3282 | _sandbox_spawnattrs_getcontainer, _sandbox_spawnattrs_getprofilename, |
| 3277 | 3283 | _sandbox_spawnattrs_init, _sandbox_spawnattrs_setcontainer, |
| 3278 | _sandbox_spawnattrs_setprofilename, _sandbox_suspend, _sandbox_unsuspend ] | |
| 3284 | _sandbox_spawnattrs_setprofilename, _sandbox_suspend, _sandbox_unregister_app_bundle, | |
| 3285 | _sandbox_unsuspend ] | |
| 3279 | 3286 | --- !tapi-tbd |
| 3280 | 3287 | tbd-version: 4 |
| 3281 | 3288 | targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatalyst, |
| 3282 | 3289 | arm64e-macos, arm64e-maccatalyst ] |
| 3283 | 3290 | uuids: |
| 3284 | 3291 | - target: x86_64-macos |
| 3285 | value: 2A532806-2750-369B-90AB-CD9BDB0ABFB2 | |
| 3292 | value: 6B34D783-AAA5-3401-8CAD-B0BC5F639834 | |
| 3286 | 3293 | - target: x86_64-maccatalyst |
| 3287 | value: 2A532806-2750-369B-90AB-CD9BDB0ABFB2 | |
| 3294 | value: 6B34D783-AAA5-3401-8CAD-B0BC5F639834 | |
| 3288 | 3295 | - target: arm64-macos |
| 3289 | 3296 | value: 00000000-0000-0000-0000-000000000000 |
| 3290 | 3297 | - target: arm64-maccatalyst |
| 3291 | 3298 | value: 00000000-0000-0000-0000-000000000000 |
| 3292 | 3299 | - target: arm64e-macos |
| 3293 | value: 49553CC1-66C3-32B1-91C6-4415DE230F58 | |
| 3300 | value: A61664A2-D010-3674-95D9-1D06571F9F5A | |
| 3294 | 3301 | - target: arm64e-maccatalyst |
| 3295 | value: 49553CC1-66C3-32B1-91C6-4415DE230F58 | |
| 3302 | value: A61664A2-D010-3674-95D9-1D06571F9F5A | |
| 3296 | 3303 | install-name: '/usr/lib/system/libsystem_secinit.dylib' |
| 3297 | current-version: 106.30.2 | |
| 3304 | current-version: 107.100.5 | |
| 3298 | 3305 | parent-umbrella: |
| 3299 | 3306 | - targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatalyst, |
| 3300 | 3307 | arm64e-macos, arm64e-maccatalyst ] |
| 3301 | 3308 | umbrella: System |
| 3302 | 3309 | exports: |
| 3303 | - targets: [ x86_64-macos, arm64e-macos, x86_64-maccatalyst, arm64e-maccatalyst, | |
| 3310 | - targets: [ arm64e-macos, x86_64-macos, x86_64-maccatalyst, arm64e-maccatalyst, | |
| 3304 | 3311 | arm64-macos, arm64-maccatalyst ] |
| 3305 | 3312 | symbols: [ __libsecinit_initializer, _libsecinit_delete_all_data_container_content_for_current_user, |
| 3306 | 3313 | _libsecinit_fileoperation_save, _libsecinit_fileoperation_set_attributes, |
| ... | ... | @@ -3311,24 +3318,24 @@ targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatal |
| 3311 | 3318 | arm64e-macos, arm64e-maccatalyst ] |
| 3312 | 3319 | uuids: |
| 3313 | 3320 | - target: x86_64-macos |
| 3314 | value: B08955D2-F6C0-3630-AF94-BE2A61E78516 | |
| 3321 | value: 8C17C62F-C82C-3A4C-A832-70EBEED5B0CA | |
| 3315 | 3322 | - target: x86_64-maccatalyst |
| 3316 | value: B08955D2-F6C0-3630-AF94-BE2A61E78516 | |
| 3323 | value: 8C17C62F-C82C-3A4C-A832-70EBEED5B0CA | |
| 3317 | 3324 | - target: arm64-macos |
| 3318 | 3325 | value: 00000000-0000-0000-0000-000000000000 |
| 3319 | 3326 | - target: arm64-maccatalyst |
| 3320 | 3327 | value: 00000000-0000-0000-0000-000000000000 |
| 3321 | 3328 | - target: arm64e-macos |
| 3322 | value: 73885FA5-76B6-3AA3-8D91-60B2E0078F99 | |
| 3329 | value: 753D2289-1662-3922-8A94-FAC9DED81CD5 | |
| 3323 | 3330 | - target: arm64e-maccatalyst |
| 3324 | value: 73885FA5-76B6-3AA3-8D91-60B2E0078F99 | |
| 3331 | value: 753D2289-1662-3922-8A94-FAC9DED81CD5 | |
| 3325 | 3332 | install-name: '/usr/lib/system/libsystem_symptoms.dylib' |
| 3326 | 3333 | parent-umbrella: |
| 3327 | 3334 | - targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatalyst, |
| 3328 | 3335 | arm64e-macos, arm64e-maccatalyst ] |
| 3329 | 3336 | umbrella: System |
| 3330 | 3337 | exports: |
| 3331 | - targets: [ x86_64-macos, arm64e-macos, x86_64-maccatalyst, arm64e-maccatalyst, | |
| 3338 | - targets: [ arm64e-macos, x86_64-macos, x86_64-maccatalyst, arm64e-maccatalyst, | |
| 3332 | 3339 | arm64-macos, arm64-maccatalyst ] |
| 3333 | 3340 | symbols: [ __symptoms_daemon_fallback_initial_disposition, __symptoms_daemon_fallback_subseq_disposition, |
| 3334 | 3341 | __symptoms_is_daemon_fallback_blacklisted, _symptom_framework_init, |
| ... | ... | @@ -3341,19 +3348,19 @@ targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatal |
| 3341 | 3348 | arm64e-macos, arm64e-maccatalyst ] |
| 3342 | 3349 | uuids: |
| 3343 | 3350 | - target: x86_64-macos |
| 3344 | value: 19A279BD-191D-3114-808B-09A74E978A6B | |
| 3351 | value: 5437B3FC-51DA-3F66-8C5C-31F7D5704C73 | |
| 3345 | 3352 | - target: x86_64-maccatalyst |
| 3346 | value: 19A279BD-191D-3114-808B-09A74E978A6B | |
| 3353 | value: 5437B3FC-51DA-3F66-8C5C-31F7D5704C73 | |
| 3347 | 3354 | - target: arm64-macos |
| 3348 | 3355 | value: 00000000-0000-0000-0000-000000000000 |
| 3349 | 3356 | - target: arm64-maccatalyst |
| 3350 | 3357 | value: 00000000-0000-0000-0000-000000000000 |
| 3351 | 3358 | - target: arm64e-macos |
| 3352 | value: 362E885B-20EA-395B-BB01-6E46B864294D | |
| 3359 | value: AAD0C6C8-F622-3FAC-AF4F-A2A021F9AE17 | |
| 3353 | 3360 | - target: arm64e-maccatalyst |
| 3354 | value: 362E885B-20EA-395B-BB01-6E46B864294D | |
| 3361 | value: AAD0C6C8-F622-3FAC-AF4F-A2A021F9AE17 | |
| 3355 | 3362 | install-name: '/usr/lib/system/libsystem_trace.dylib' |
| 3356 | current-version: 1372.30.3 | |
| 3363 | current-version: 1375.100.9 | |
| 3357 | 3364 | parent-umbrella: |
| 3358 | 3365 | - targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatalyst, |
| 3359 | 3366 | arm64e-macos, arm64e-maccatalyst ] |
| ... | ... | @@ -3417,19 +3424,19 @@ targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatal |
| 3417 | 3424 | arm64e-macos, arm64e-maccatalyst ] |
| 3418 | 3425 | uuids: |
| 3419 | 3426 | - target: x86_64-macos |
| 3420 | value: 3723C625-FBC2-31A2-A4CB-081FD4B807A4 | |
| 3427 | value: BAF19DAC-B9ED-3544-97E9-E277BA113717 | |
| 3421 | 3428 | - target: x86_64-maccatalyst |
| 3422 | value: 3723C625-FBC2-31A2-A4CB-081FD4B807A4 | |
| 3429 | value: BAF19DAC-B9ED-3544-97E9-E277BA113717 | |
| 3423 | 3430 | - target: arm64-macos |
| 3424 | 3431 | value: 00000000-0000-0000-0000-000000000000 |
| 3425 | 3432 | - target: arm64-maccatalyst |
| 3426 | 3433 | value: 00000000-0000-0000-0000-000000000000 |
| 3427 | 3434 | - target: arm64e-macos |
| 3428 | value: D0A538E3-7A75-395A-993C-A3EA7947F55A | |
| 3435 | value: 687985E7-0BD0-3898-9FCA-F8BCAAE282AE | |
| 3429 | 3436 | - target: arm64e-maccatalyst |
| 3430 | value: D0A538E3-7A75-395A-993C-A3EA7947F55A | |
| 3437 | value: 687985E7-0BD0-3898-9FCA-F8BCAAE282AE | |
| 3431 | 3438 | install-name: '/usr/lib/system/libunwind.dylib' |
| 3432 | current-version: 201 | |
| 3439 | current-version: 202.2 | |
| 3433 | 3440 | parent-umbrella: |
| 3434 | 3441 | - targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatalyst, |
| 3435 | 3442 | arm64e-macos, arm64e-maccatalyst ] |
| ... | ... | @@ -3490,19 +3497,19 @@ targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatal |
| 3490 | 3497 | arm64e-macos, arm64e-maccatalyst ] |
| 3491 | 3498 | uuids: |
| 3492 | 3499 | - target: x86_64-macos |
| 3493 | value: A9A403F2-4D7D-3760-B4A7-4A9721A2A9B9 | |
| 3500 | value: FBB81F7D-564A-3971-A28E-6AA174470B4C | |
| 3494 | 3501 | - target: x86_64-maccatalyst |
| 3495 | value: A9A403F2-4D7D-3760-B4A7-4A9721A2A9B9 | |
| 3502 | value: FBB81F7D-564A-3971-A28E-6AA174470B4C | |
| 3496 | 3503 | - target: arm64-macos |
| 3497 | 3504 | value: 00000000-0000-0000-0000-000000000000 |
| 3498 | 3505 | - target: arm64-maccatalyst |
| 3499 | 3506 | value: 00000000-0000-0000-0000-000000000000 |
| 3500 | 3507 | - target: arm64e-macos |
| 3501 | value: A77B4CE2-0855-3C19-B4A6-47B094CF0DDA | |
| 3508 | value: 4C6EB90B-BD32-3CAD-9F25-C9F234775EFB | |
| 3502 | 3509 | - target: arm64e-maccatalyst |
| 3503 | value: A77B4CE2-0855-3C19-B4A6-47B094CF0DDA | |
| 3510 | value: 4C6EB90B-BD32-3CAD-9F25-C9F234775EFB | |
| 3504 | 3511 | install-name: '/usr/lib/system/libxpc.dylib' |
| 3505 | current-version: 2235.30.5 | |
| 3512 | current-version: 2236.100.61 | |
| 3506 | 3513 | parent-umbrella: |
| 3507 | 3514 | - targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatalyst, |
| 3508 | 3515 | arm64e-macos, arm64e-maccatalyst ] |
| ... | ... | @@ -3510,10 +3517,12 @@ parent-umbrella: |
| 3510 | 3517 | exports: |
| 3511 | 3518 | - targets: [ x86_64-maccatalyst, x86_64-macos, arm64e-maccatalyst, arm64e-macos, |
| 3512 | 3519 | arm64-macos, arm64-maccatalyst ] |
| 3513 | symbols: [ _XPC_ACTIVITY_ALLOW_BATTERY, _XPC_ACTIVITY_APP_REFRESH, _XPC_ACTIVITY_CHECK_IN, | |
| 3514 | _XPC_ACTIVITY_COMMUNICATES_WITH_PAIRED_DEVICE, _XPC_ACTIVITY_CPU_INTENSIVE, | |
| 3515 | _XPC_ACTIVITY_DELAY, _XPC_ACTIVITY_DESIRED_MOTION_STATE, _XPC_ACTIVITY_DISK_INTENSIVE, | |
| 3516 | _XPC_ACTIVITY_DO_IT_LATER, _XPC_ACTIVITY_DUET_ACTIVITY_SCHEDULER_DATA, | |
| 3520 | symbols: [ _CEAcquireManagedContext, _CEAcquireUnmanagedContext, _CEBuffer_cmp, | |
| 3521 | _CEConjureContextFromDER, _CEContextQuery, _CEGetErrorString, | |
| 3522 | _CEPrepareQuery, _CEReleaseManagedContext, _CEValidate, _XPC_ACTIVITY_ALLOW_BATTERY, | |
| 3523 | _XPC_ACTIVITY_APP_REFRESH, _XPC_ACTIVITY_CHECK_IN, _XPC_ACTIVITY_COMMUNICATES_WITH_PAIRED_DEVICE, | |
| 3524 | _XPC_ACTIVITY_CPU_INTENSIVE, _XPC_ACTIVITY_DELAY, _XPC_ACTIVITY_DESIRED_MOTION_STATE, | |
| 3525 | _XPC_ACTIVITY_DISK_INTENSIVE, _XPC_ACTIVITY_DO_IT_LATER, _XPC_ACTIVITY_DUET_ACTIVITY_SCHEDULER_DATA, | |
| 3517 | 3526 | _XPC_ACTIVITY_DUET_ATTRIBUTE_COST, _XPC_ACTIVITY_DUET_ATTRIBUTE_NAME, |
| 3518 | 3527 | _XPC_ACTIVITY_DUET_ATTRIBUTE_VALUE, _XPC_ACTIVITY_DUET_RELATED_APPLICATIONS, |
| 3519 | 3528 | _XPC_ACTIVITY_EXCLUSIVE, _XPC_ACTIVITY_EXPECTED_DURATION, |
| ... | ... | @@ -3595,8 +3604,53 @@ exports: |
| 3595 | 3604 | _bootstrap_look_up3, _bootstrap_look_up_per_user, _bootstrap_lookup_children, |
| 3596 | 3605 | _bootstrap_parent, _bootstrap_register, _bootstrap_register2, |
| 3597 | 3606 | _bootstrap_status, _bootstrap_strerror, _bootstrap_subset, |
| 3598 | _bootstrap_unprivileged, _create_and_switch_to_per_session_launchd, | |
| 3599 | _launch_activate_socket, _launch_active_user_switch, _launch_add_external_service, | |
| 3607 | _bootstrap_unprivileged, _cc_clear, _ccder_blob_decode_bitstring, | |
| 3608 | _ccder_blob_decode_eckey, _ccder_blob_decode_len, _ccder_blob_decode_len_strict, | |
| 3609 | _ccder_blob_decode_oid, _ccder_blob_decode_range, _ccder_blob_decode_range_strict, | |
| 3610 | _ccder_blob_decode_seqii, _ccder_blob_decode_seqii_strict, | |
| 3611 | _ccder_blob_decode_sequence_tl, _ccder_blob_decode_sequence_tl_strict, | |
| 3612 | _ccder_blob_decode_tag, _ccder_blob_decode_tl, _ccder_blob_decode_tl_internal, | |
| 3613 | _ccder_blob_decode_tl_strict, _ccder_blob_decode_uint, _ccder_blob_decode_uint64, | |
| 3614 | _ccder_blob_decode_uint_n, _ccder_blob_decode_uint_strict, | |
| 3615 | _ccder_blob_encode_body, _ccder_blob_encode_body_tl, _ccder_blob_encode_eckey, | |
| 3616 | _ccder_blob_encode_implicit_integer, _ccder_blob_encode_implicit_octet_string, | |
| 3617 | _ccder_blob_encode_implicit_raw_octet_string, _ccder_blob_encode_implicit_uint64, | |
| 3618 | _ccder_blob_encode_integer, _ccder_blob_encode_len, _ccder_blob_encode_octet_string, | |
| 3619 | _ccder_blob_encode_oid, _ccder_blob_encode_raw_octet_string, | |
| 3620 | _ccder_blob_encode_tag, _ccder_blob_encode_tl, _ccder_blob_encode_uint64, | |
| 3621 | _ccder_blob_reserve, _ccder_blob_reserve_tl, _ccder_decode_bitstring, | |
| 3622 | _ccder_decode_constructed_tl, _ccder_decode_constructed_tl_strict, | |
| 3623 | _ccder_decode_eckey, _ccder_decode_len, _ccder_decode_len_strict, | |
| 3624 | _ccder_decode_oid, _ccder_decode_seqii, _ccder_decode_seqii_strict, | |
| 3625 | _ccder_decode_sequence_tl, _ccder_decode_sequence_tl_strict, | |
| 3626 | _ccder_decode_tag, _ccder_decode_tl, _ccder_decode_tl_strict, | |
| 3627 | _ccder_decode_uint, _ccder_decode_uint64, _ccder_decode_uint_n, | |
| 3628 | _ccder_decode_uint_strict, _ccder_encode_body, _ccder_encode_body_nocopy, | |
| 3629 | _ccder_encode_constructed_tl, _ccder_encode_eckey, _ccder_encode_eckey_size, | |
| 3630 | _ccder_encode_implicit_integer, _ccder_encode_implicit_octet_string, | |
| 3631 | _ccder_encode_implicit_raw_octet_string, _ccder_encode_implicit_uint64, | |
| 3632 | _ccder_encode_integer, _ccder_encode_len, _ccder_encode_octet_string, | |
| 3633 | _ccder_encode_oid, _ccder_encode_raw_octet_string, _ccder_encode_tag, | |
| 3634 | _ccder_encode_tl, _ccder_encode_uint64, _ccder_sizeof, _ccder_sizeof_eckey, | |
| 3635 | _ccder_sizeof_implicit_integer, _ccder_sizeof_implicit_uint64, | |
| 3636 | _ccder_sizeof_len, _ccder_sizeof_oid, _ccder_sizeof_tag, _ccder_sizeof_uint64, | |
| 3637 | _ccn_bitlen, _ccn_read_uint, _ccn_write_int, _ccn_write_int_size, | |
| 3638 | _ccn_write_uint, _ccn_write_uint_padded_ct, _ccn_write_uint_size, | |
| 3639 | _create_and_switch_to_per_session_launchd, _der_decode_boolean, | |
| 3640 | _der_decode_key_value, _der_decode_number, _der_decode_string, | |
| 3641 | _der_encode_number_body, _der_size_array, _der_size_dictionary, | |
| 3642 | _der_size_element, _der_size_number, _der_vm_CEType_from_context, | |
| 3643 | _der_vm_bool_from_context, _der_vm_buffer_from_context, _der_vm_context_create, | |
| 3644 | _der_vm_context_is_valid, _der_vm_execute, _der_vm_execute_match_bool, | |
| 3645 | _der_vm_execute_match_integer, _der_vm_execute_match_string, | |
| 3646 | _der_vm_execute_match_string_prefix, _der_vm_execute_nocopy, | |
| 3647 | _der_vm_execute_select_index, _der_vm_execute_select_key, | |
| 3648 | _der_vm_execute_select_longest_matching_key, _der_vm_execute_string_prefix_value_allowed, | |
| 3649 | _der_vm_execute_string_value_allowed, _der_vm_integer_from_context, | |
| 3650 | _der_vm_iterate, _der_vm_string_from_context, _kCEAPIMisuse, | |
| 3651 | _kCEAllocationFailed, _kCEInvalidArgument, _kCEMalformedEntitlements, | |
| 3652 | _kCENoError, _kCEQueryCannotBeSatisfied, _launch_activate_socket, | |
| 3653 | _launch_active_user_switch, _launch_add_external_service, | |
| 3600 | 3654 | _launch_bootout_user_service_4coresim, _launch_copy_busy_extension_instances, |
| 3601 | 3655 | _launch_copy_endpoints_properties_for_pid, _launch_copy_extension_properties, |
| 3602 | 3656 | _launch_copy_extension_properties_for_pid, _launch_copy_properties_for_pid_4assertiond, |
| ... | ... | @@ -3635,10 +3689,10 @@ exports: |
| 3635 | 3689 | _os_transaction_copy_description, _os_transaction_create, |
| 3636 | 3690 | _os_transaction_get_description, _os_transaction_get_timestamp, |
| 3637 | 3691 | _os_transaction_needs_more_time, _place_hold_on_real_loginwindow, |
| 3638 | _reboot2, _reboot3, _vproc_release, _vproc_retain, _vproc_standby_begin, | |
| 3639 | _vproc_standby_end, _vproc_swap_complex, _vproc_swap_integer, | |
| 3640 | _vproc_swap_string, _vproc_transaction_begin, _vproc_transaction_end, | |
| 3641 | _vprocmgr_lookup_vproc, _xpc_activity_add_eligibility_changed_handler, | |
| 3692 | _reboot2, _reboot3, _recursivelyValidateEntitlements, _vproc_release, | |
| 3693 | _vproc_retain, _vproc_standby_begin, _vproc_standby_end, _vproc_swap_complex, | |
| 3694 | _vproc_swap_integer, _vproc_swap_string, _vproc_transaction_begin, | |
| 3695 | _vproc_transaction_end, _vprocmgr_lookup_vproc, _xpc_activity_add_eligibility_changed_handler, | |
| 3642 | 3696 | _xpc_activity_copy_criteria, _xpc_activity_copy_dispatch_queue, |
| 3643 | 3697 | _xpc_activity_copy_identifier, _xpc_activity_debug, _xpc_activity_defer_until_network_change, |
| 3644 | 3698 | _xpc_activity_defer_until_percentage, _xpc_activity_get_percentage, |
| ... | ... | @@ -3698,6 +3752,7 @@ exports: |
| 3698 | 3752 | _xpc_copy_entitlement_for_token, _xpc_copy_entitlements_data_for_token, |
| 3699 | 3753 | _xpc_copy_entitlements_for_pid, _xpc_copy_entitlements_for_self, |
| 3700 | 3754 | _xpc_copy_event, _xpc_copy_event_entitlements, _xpc_copy_short_description, |
| 3755 | _xpc_create_from_ce_der, _xpc_create_from_ce_der_with_key, | |
| 3701 | 3756 | _xpc_create_from_plist, _xpc_create_from_plist_descriptor, |
| 3702 | 3757 | _xpc_create_from_serialization, _xpc_create_from_serialization_with_ool, |
| 3703 | 3758 | _xpc_create_reply_with_format, _xpc_create_reply_with_format_and_arguments, |
| ... | ... | @@ -3778,4 +3833,6 @@ exports: |
| 3778 | 3833 | _xpc_type_get_name, _xpc_uint64_create, _xpc_uint64_get_value, |
| 3779 | 3834 | _xpc_uuid_create, _xpc_uuid_get_bytes ] |
| 3780 | 3835 | objc-classes: [ OS_xpc_object ] |
| 3836 | - targets: [ arm64e-maccatalyst, arm64e-macos, arm64-macos, arm64-maccatalyst ] | |
| 3837 | symbols: [ _cc_abort, _cc_disable_dit, _cc_try_abort, _cc_try_abort_if ] | |
| 3781 | 3838 | ... |
lib/libc/darwin/libSystem.13.tbd+209-207| ... | ... | @@ -4,17 +4,17 @@ targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatal |
| 4 | 4 | arm64e-macos, arm64e-maccatalyst ] |
| 5 | 5 | uuids: |
| 6 | 6 | - target: x86_64-macos |
| 7 | value: 1C88C6B7-F992-3275-9EF4-4D2CB1CEFAC3 | |
| 7 | value: 085E3D5D-7871-3E9E-A097-AAD940171411 | |
| 8 | 8 | - target: x86_64-maccatalyst |
| 9 | value: 1C88C6B7-F992-3275-9EF4-4D2CB1CEFAC3 | |
| 9 | value: 085E3D5D-7871-3E9E-A097-AAD940171411 | |
| 10 | 10 | - target: arm64-macos |
| 11 | 11 | value: 00000000-0000-0000-0000-000000000000 |
| 12 | 12 | - target: arm64-maccatalyst |
| 13 | 13 | value: 00000000-0000-0000-0000-000000000000 |
| 14 | 14 | - target: arm64e-macos |
| 15 | value: 4396C12B-BA04-34F0-B859-7FC1914064A3 | |
| 15 | value: B54723A8-A25C-3D6C-A51B-2B8BBA733DD3 | |
| 16 | 16 | - target: arm64e-maccatalyst |
| 17 | value: 4396C12B-BA04-34F0-B859-7FC1914064A3 | |
| 17 | value: B54723A8-A25C-3D6C-A51B-2B8BBA733DD3 | |
| 18 | 18 | install-name: '/usr/lib/libSystem.B.dylib' |
| 19 | 19 | current-version: 1319 |
| 20 | 20 | reexported-libraries: |
| ... | ... | @@ -59,17 +59,17 @@ targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatal |
| 59 | 59 | arm64e-macos, arm64e-maccatalyst ] |
| 60 | 60 | uuids: |
| 61 | 61 | - target: x86_64-macos |
| 62 | value: 0D42BFC6-F62E-342B-BDB1-E75B48AF5081 | |
| 62 | value: A7D96CB6-7562-3C14-8B54-ED5E484B54E2 | |
| 63 | 63 | - target: x86_64-maccatalyst |
| 64 | value: 0D42BFC6-F62E-342B-BDB1-E75B48AF5081 | |
| 64 | value: A7D96CB6-7562-3C14-8B54-ED5E484B54E2 | |
| 65 | 65 | - target: arm64-macos |
| 66 | 66 | value: 00000000-0000-0000-0000-000000000000 |
| 67 | 67 | - target: arm64-maccatalyst |
| 68 | 68 | value: 00000000-0000-0000-0000-000000000000 |
| 69 | 69 | - target: arm64e-macos |
| 70 | value: 9953AE27-E8CB-32B2-98AF-9E871BCDD5D3 | |
| 70 | value: 7A88909B-ED36-360D-ACE9-81107AF0FE14 | |
| 71 | 71 | - target: arm64e-maccatalyst |
| 72 | value: 9953AE27-E8CB-32B2-98AF-9E871BCDD5D3 | |
| 72 | value: 7A88909B-ED36-360D-ACE9-81107AF0FE14 | |
| 73 | 73 | install-name: '/usr/lib/system/libcache.dylib' |
| 74 | 74 | current-version: 90 |
| 75 | 75 | parent-umbrella: |
| ... | ... | @@ -97,19 +97,19 @@ targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatal |
| 97 | 97 | arm64e-macos, arm64e-maccatalyst ] |
| 98 | 98 | uuids: |
| 99 | 99 | - target: x86_64-macos |
| 100 | value: DD06A475-50C9-3264-BAD5-479DA5E8B327 | |
| 100 | value: 6E120635-E858-30FE-95F6-64D90E33095D | |
| 101 | 101 | - target: x86_64-maccatalyst |
| 102 | value: DD06A475-50C9-3264-BAD5-479DA5E8B327 | |
| 102 | value: 6E120635-E858-30FE-95F6-64D90E33095D | |
| 103 | 103 | - target: arm64-macos |
| 104 | 104 | value: 00000000-0000-0000-0000-000000000000 |
| 105 | 105 | - target: arm64-maccatalyst |
| 106 | 106 | value: 00000000-0000-0000-0000-000000000000 |
| 107 | 107 | - target: arm64e-macos |
| 108 | value: 7510671C-686A-339D-8F50-B95BFA5D8F10 | |
| 108 | value: 452A7C15-97FA-32A0-B514-744E117E2B39 | |
| 109 | 109 | - target: arm64e-maccatalyst |
| 110 | value: 7510671C-686A-339D-8F50-B95BFA5D8F10 | |
| 110 | value: 452A7C15-97FA-32A0-B514-744E117E2B39 | |
| 111 | 111 | install-name: '/usr/lib/system/libcommonCrypto.dylib' |
| 112 | current-version: 60198.40.3 | |
| 112 | current-version: 60198.60.2 | |
| 113 | 113 | parent-umbrella: |
| 114 | 114 | - targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatalyst, |
| 115 | 115 | arm64e-macos, arm64e-maccatalyst ] |
| ... | ... | @@ -191,11 +191,11 @@ tbd-version: 4 |
| 191 | 191 | targets: [ x86_64-macos, arm64-macos, arm64e-macos ] |
| 192 | 192 | uuids: |
| 193 | 193 | - target: x86_64-macos |
| 194 | value: 9053D30C-239D-30B4-B36D-4E3490F72FE4 | |
| 194 | value: E9412018-811C-36B7-9F58-6471398EE465 | |
| 195 | 195 | - target: arm64-macos |
| 196 | value: A7F13C10-9CEA-3A4E-86AB-F65E292E7804 | |
| 196 | value: 954CFCC0-97A8-329B-B5AA-FF9046F3E94F | |
| 197 | 197 | - target: arm64e-macos |
| 198 | value: 824DFF0F-A337-32EB-B5DF-3FDD0BBFF9ED | |
| 198 | value: 9F57BC0A-3F18-3F00-B772-40B6A8616E26 | |
| 199 | 199 | install-name: '/usr/lib/system/libcompiler_rt.dylib' |
| 200 | 200 | current-version: 103.1 |
| 201 | 201 | parent-umbrella: |
| ... | ... | @@ -426,17 +426,17 @@ targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatal |
| 426 | 426 | arm64e-macos, arm64e-maccatalyst ] |
| 427 | 427 | uuids: |
| 428 | 428 | - target: x86_64-macos |
| 429 | value: 0CD59665-DEA3-3995-84BC-485D4EA42680 | |
| 429 | value: F92F30BA-35BE-3ED9-B562-FBEC1B7089B5 | |
| 430 | 430 | - target: x86_64-maccatalyst |
| 431 | value: 0CD59665-DEA3-3995-84BC-485D4EA42680 | |
| 431 | value: F92F30BA-35BE-3ED9-B562-FBEC1B7089B5 | |
| 432 | 432 | - target: arm64-macos |
| 433 | 433 | value: 00000000-0000-0000-0000-000000000000 |
| 434 | 434 | - target: arm64-maccatalyst |
| 435 | 435 | value: 00000000-0000-0000-0000-000000000000 |
| 436 | 436 | - target: arm64e-macos |
| 437 | value: 79AD0FC1-4F88-3589-A602-45F2AA482B59 | |
| 437 | value: 3689048E-9EC2-32D9-B833-B5EDE2839092 | |
| 438 | 438 | - target: arm64e-maccatalyst |
| 439 | value: 79AD0FC1-4F88-3589-A602-45F2AA482B59 | |
| 439 | value: 3689048E-9EC2-32D9-B833-B5EDE2839092 | |
| 440 | 440 | install-name: '/usr/lib/system/libcopyfile.dylib' |
| 441 | 441 | parent-umbrella: |
| 442 | 442 | - targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatalyst, |
| ... | ... | @@ -454,19 +454,19 @@ targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatal |
| 454 | 454 | arm64e-macos, arm64e-maccatalyst ] |
| 455 | 455 | uuids: |
| 456 | 456 | - target: x86_64-macos |
| 457 | value: D198406D-6F0D-3857-9CB3-9BA231DFEE00 | |
| 457 | value: 1A8A8D34-268F-3D42-936A-8A0029817E22 | |
| 458 | 458 | - target: x86_64-maccatalyst |
| 459 | value: D198406D-6F0D-3857-9CB3-9BA231DFEE00 | |
| 459 | value: 1A8A8D34-268F-3D42-936A-8A0029817E22 | |
| 460 | 460 | - target: arm64-macos |
| 461 | 461 | value: 00000000-0000-0000-0000-000000000000 |
| 462 | 462 | - target: arm64-maccatalyst |
| 463 | 463 | value: 00000000-0000-0000-0000-000000000000 |
| 464 | 464 | - target: arm64e-macos |
| 465 | value: 6A5FFEB0-E606-324E-B687-DA95C362CE05 | |
| 465 | value: E32C0A9B-EDD0-376D-A504-A06C215E89FE | |
| 466 | 466 | - target: arm64e-maccatalyst |
| 467 | value: 6A5FFEB0-E606-324E-B687-DA95C362CE05 | |
| 467 | value: E32C0A9B-EDD0-376D-A504-A06C215E89FE | |
| 468 | 468 | install-name: '/usr/lib/system/libcorecrypto.dylib' |
| 469 | current-version: 1386.40.5 | |
| 469 | current-version: 1386.60.8 | |
| 470 | 470 | parent-umbrella: |
| 471 | 471 | - targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatalyst, |
| 472 | 472 | arm64e-macos, arm64e-maccatalyst ] |
| ... | ... | @@ -565,8 +565,9 @@ exports: |
| 565 | 565 | _ccder_encode_tag, _ccder_encode_tl, _ccder_encode_uint64, |
| 566 | 566 | _ccder_sizeof, _ccder_sizeof_eckey, _ccder_sizeof_implicit_integer, |
| 567 | 567 | _ccder_sizeof_implicit_octet_string, _ccder_sizeof_implicit_raw_octet_string, |
| 568 | _ccder_sizeof_implicit_uint64, _ccder_sizeof_integer, _ccder_sizeof_len, | |
| 569 | _ccder_sizeof_octet_string, _ccder_sizeof_oid, _ccder_sizeof_raw_octet_string, | |
| 568 | _ccder_sizeof_implicit_raw_octet_string_overflow, _ccder_sizeof_implicit_uint64, | |
| 569 | _ccder_sizeof_integer, _ccder_sizeof_len, _ccder_sizeof_octet_string, | |
| 570 | _ccder_sizeof_oid, _ccder_sizeof_overflow, _ccder_sizeof_raw_octet_string, | |
| 570 | 571 | _ccder_sizeof_tag, _ccder_sizeof_uint64, _ccdes3_cbc_decrypt_mode, |
| 571 | 572 | _ccdes3_cbc_encrypt_mode, _ccdes3_cfb8_decrypt_mode, _ccdes3_cfb8_encrypt_mode, |
| 572 | 573 | _ccdes3_cfb_decrypt_mode, _ccdes3_cfb_encrypt_mode, _ccdes3_ctr_crypt_mode, |
| ... | ... | @@ -767,17 +768,17 @@ targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatal |
| 767 | 768 | arm64e-macos, arm64e-maccatalyst ] |
| 768 | 769 | uuids: |
| 769 | 770 | - target: x86_64-macos |
| 770 | value: 817339A1-D03E-3E54-9C47-ACACF69F6193 | |
| 771 | value: 6282E528-6A67-334B-ACCF-1F8FD89369BD | |
| 771 | 772 | - target: x86_64-maccatalyst |
| 772 | value: 817339A1-D03E-3E54-9C47-ACACF69F6193 | |
| 773 | value: 6282E528-6A67-334B-ACCF-1F8FD89369BD | |
| 773 | 774 | - target: arm64-macos |
| 774 | 775 | value: 00000000-0000-0000-0000-000000000000 |
| 775 | 776 | - target: arm64-maccatalyst |
| 776 | 777 | value: 00000000-0000-0000-0000-000000000000 |
| 777 | 778 | - target: arm64e-macos |
| 778 | value: 40C9C98C-00D6-3E8E-9AD3-2ED6CF0D0CFE | |
| 779 | value: 191028D2-0477-3EBC-9EEF-A85ACAFC7193 | |
| 779 | 780 | - target: arm64e-maccatalyst |
| 780 | value: 40C9C98C-00D6-3E8E-9AD3-2ED6CF0D0CFE | |
| 781 | value: 191028D2-0477-3EBC-9EEF-A85ACAFC7193 | |
| 781 | 782 | install-name: '/usr/lib/system/libdispatch.dylib' |
| 782 | 783 | current-version: 1412 |
| 783 | 784 | parent-umbrella: |
| ... | ... | @@ -943,17 +944,17 @@ targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatal |
| 943 | 944 | arm64e-macos, arm64e-maccatalyst ] |
| 944 | 945 | uuids: |
| 945 | 946 | - target: x86_64-macos |
| 946 | value: 6C8B449A-78F4-3127-BC23-910719DE96AB | |
| 947 | value: 6F97B8FD-BA81-3779-ADB2-5ECD91F42B75 | |
| 947 | 948 | - target: x86_64-maccatalyst |
| 948 | value: 6C8B449A-78F4-3127-BC23-910719DE96AB | |
| 949 | value: 6F97B8FD-BA81-3779-ADB2-5ECD91F42B75 | |
| 949 | 950 | - target: arm64-macos |
| 950 | value: C52D0F3B-0BAE-376B-A851-943F95388DD7 | |
| 951 | value: 427D321B-B30E-367F-8E2C-1DA6FD2D0962 | |
| 951 | 952 | - target: arm64-maccatalyst |
| 952 | value: C52D0F3B-0BAE-376B-A851-943F95388DD7 | |
| 953 | value: 427D321B-B30E-367F-8E2C-1DA6FD2D0962 | |
| 953 | 954 | - target: arm64e-macos |
| 954 | value: 668F3379-151D-3ED4-859C-8F56E7941CDE | |
| 955 | value: C1700833-CCA0-3BA5-8614-C149347F5503 | |
| 955 | 956 | - target: arm64e-maccatalyst |
| 956 | value: 668F3379-151D-3ED4-859C-8F56E7941CDE | |
| 957 | value: C1700833-CCA0-3BA5-8614-C149347F5503 | |
| 957 | 958 | install-name: '/usr/lib/system/libdyld.dylib' |
| 958 | 959 | parent-umbrella: |
| 959 | 960 | - targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatalyst, |
| ... | ... | @@ -1041,17 +1042,17 @@ targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatal |
| 1041 | 1042 | arm64e-macos, arm64e-maccatalyst ] |
| 1042 | 1043 | uuids: |
| 1043 | 1044 | - target: x86_64-macos |
| 1044 | value: 564464C5-4B61-34E4-A937-2BDB5399DFCB | |
| 1045 | value: 4C623CBE-6FF4-3731-A647-6EEF7A6F51C7 | |
| 1045 | 1046 | - target: x86_64-maccatalyst |
| 1046 | value: 564464C5-4B61-34E4-A937-2BDB5399DFCB | |
| 1047 | value: 4C623CBE-6FF4-3731-A647-6EEF7A6F51C7 | |
| 1047 | 1048 | - target: arm64-macos |
| 1048 | 1049 | value: 00000000-0000-0000-0000-000000000000 |
| 1049 | 1050 | - target: arm64-maccatalyst |
| 1050 | 1051 | value: 00000000-0000-0000-0000-000000000000 |
| 1051 | 1052 | - target: arm64e-macos |
| 1052 | value: 50343076-2AC5-36B5-8B00-C7182678C6AC | |
| 1053 | value: B63E11DD-4648-3355-A51C-C1B650654C0F | |
| 1053 | 1054 | - target: arm64e-maccatalyst |
| 1054 | value: 50343076-2AC5-36B5-8B00-C7182678C6AC | |
| 1055 | value: B63E11DD-4648-3355-A51C-C1B650654C0F | |
| 1055 | 1056 | install-name: '/usr/lib/system/libkeymgr.dylib' |
| 1056 | 1057 | current-version: 31 |
| 1057 | 1058 | parent-umbrella: |
| ... | ... | @@ -1071,17 +1072,17 @@ tbd-version: 4 |
| 1071 | 1072 | targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64e-macos ] |
| 1072 | 1073 | uuids: |
| 1073 | 1074 | - target: x86_64-macos |
| 1074 | value: 4573BDD5-4817-3D26-B6A7-38AAE653FCBC | |
| 1075 | value: 632C478C-AAF6-3330-AA8E-0D0FCA4C6237 | |
| 1075 | 1076 | - target: x86_64-maccatalyst |
| 1076 | value: 4573BDD5-4817-3D26-B6A7-38AAE653FCBC | |
| 1077 | value: 632C478C-AAF6-3330-AA8E-0D0FCA4C6237 | |
| 1077 | 1078 | - target: arm64-macos |
| 1078 | value: B695C46E-649C-3047-AF7D-ED475E37DE56 | |
| 1079 | value: F71DA09E-609F-3C9A-95BF-22B22CFAD5A5 | |
| 1079 | 1080 | - target: arm64-maccatalyst |
| 1080 | value: B695C46E-649C-3047-AF7D-ED475E37DE56 | |
| 1081 | value: F71DA09E-609F-3C9A-95BF-22B22CFAD5A5 | |
| 1081 | 1082 | - target: arm64e-macos |
| 1082 | value: B4352C72-0618-3135-B375-BFF70DB8C3F2 | |
| 1083 | value: 471DA066-B65F-36B1-93B7-243C71F8838B | |
| 1083 | 1084 | - target: arm64e-maccatalyst |
| 1084 | value: B4352C72-0618-3135-B375-BFF70DB8C3F2 | |
| 1085 | value: 471DA066-B65F-36B1-93B7-243C71F8838B | |
| 1085 | 1086 | install-name: '/usr/lib/system/libmacho.dylib' |
| 1086 | 1087 | current-version: 1001.2 |
| 1087 | 1088 | parent-umbrella: |
| ... | ... | @@ -1131,19 +1132,19 @@ targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatal |
| 1131 | 1132 | arm64e-macos, arm64e-maccatalyst ] |
| 1132 | 1133 | uuids: |
| 1133 | 1134 | - target: x86_64-macos |
| 1134 | value: 928130DD-5A8D-3546-BA85-242E4051CEF2 | |
| 1135 | value: 9C3DCECF-ED9C-3F0F-9E9C-28DC842D4D65 | |
| 1135 | 1136 | - target: x86_64-maccatalyst |
| 1136 | value: 928130DD-5A8D-3546-BA85-242E4051CEF2 | |
| 1137 | value: 9C3DCECF-ED9C-3F0F-9E9C-28DC842D4D65 | |
| 1137 | 1138 | - target: arm64-macos |
| 1138 | 1139 | value: 00000000-0000-0000-0000-000000000000 |
| 1139 | 1140 | - target: arm64-maccatalyst |
| 1140 | 1141 | value: 00000000-0000-0000-0000-000000000000 |
| 1141 | 1142 | - target: arm64e-macos |
| 1142 | value: 2009EBC7-36D7-32AA-AD6A-25CE4128B3C0 | |
| 1143 | value: A052DB52-9ECA-39EC-8DD4-05A0856579B7 | |
| 1143 | 1144 | - target: arm64e-maccatalyst |
| 1144 | value: 2009EBC7-36D7-32AA-AD6A-25CE4128B3C0 | |
| 1145 | value: A052DB52-9ECA-39EC-8DD4-05A0856579B7 | |
| 1145 | 1146 | install-name: '/usr/lib/system/libquarantine.dylib' |
| 1146 | current-version: 146.40.2 | |
| 1147 | current-version: 146.60.2 | |
| 1147 | 1148 | parent-umbrella: |
| 1148 | 1149 | - targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatalyst, |
| 1149 | 1150 | arm64e-macos, arm64e-maccatalyst ] |
| ... | ... | @@ -1189,17 +1190,17 @@ targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatal |
| 1189 | 1190 | arm64e-macos, arm64e-maccatalyst ] |
| 1190 | 1191 | uuids: |
| 1191 | 1192 | - target: x86_64-macos |
| 1192 | value: E922FC3F-83F1-3C07-AD9A-13ABE2883681 | |
| 1193 | value: A7C519E4-A2A5-33E1-B9D6-52951921392F | |
| 1193 | 1194 | - target: x86_64-maccatalyst |
| 1194 | value: E922FC3F-83F1-3C07-AD9A-13ABE2883681 | |
| 1195 | value: A7C519E4-A2A5-33E1-B9D6-52951921392F | |
| 1195 | 1196 | - target: arm64-macos |
| 1196 | 1197 | value: 00000000-0000-0000-0000-000000000000 |
| 1197 | 1198 | - target: arm64-maccatalyst |
| 1198 | 1199 | value: 00000000-0000-0000-0000-000000000000 |
| 1199 | 1200 | - target: arm64e-macos |
| 1200 | value: 51CF7D0E-014B-3E65-BDF3-A2DF337113BA | |
| 1201 | value: E785FBDF-82C9-3642-A38D-EDB07D118303 | |
| 1201 | 1202 | - target: arm64e-maccatalyst |
| 1202 | value: 51CF7D0E-014B-3E65-BDF3-A2DF337113BA | |
| 1203 | value: E785FBDF-82C9-3642-A38D-EDB07D118303 | |
| 1203 | 1204 | install-name: '/usr/lib/system/libremovefile.dylib' |
| 1204 | 1205 | current-version: 63 |
| 1205 | 1206 | parent-umbrella: |
| ... | ... | @@ -1220,17 +1221,17 @@ targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatal |
| 1220 | 1221 | arm64e-macos, arm64e-maccatalyst ] |
| 1221 | 1222 | uuids: |
| 1222 | 1223 | - target: x86_64-macos |
| 1223 | value: 136EA7B6-9D44-3363-8949-AF5D21C6D116 | |
| 1224 | value: D32DFE04-D5D4-3BD7-B9B5-9ED721B993EE | |
| 1224 | 1225 | - target: x86_64-maccatalyst |
| 1225 | value: 136EA7B6-9D44-3363-8949-AF5D21C6D116 | |
| 1226 | value: D32DFE04-D5D4-3BD7-B9B5-9ED721B993EE | |
| 1226 | 1227 | - target: arm64-macos |
| 1227 | 1228 | value: 00000000-0000-0000-0000-000000000000 |
| 1228 | 1229 | - target: arm64-maccatalyst |
| 1229 | 1230 | value: 00000000-0000-0000-0000-000000000000 |
| 1230 | 1231 | - target: arm64e-macos |
| 1231 | value: 60ADB251-3204-34C0-B826-260AEF261E02 | |
| 1232 | value: 1E8F925A-501E-32BD-9BE3-2EE5FDEA8818 | |
| 1232 | 1233 | - target: arm64e-maccatalyst |
| 1233 | value: 60ADB251-3204-34C0-B826-260AEF261E02 | |
| 1234 | value: 1E8F925A-501E-32BD-9BE3-2EE5FDEA8818 | |
| 1234 | 1235 | install-name: '/usr/lib/system/libsystem_asl.dylib' |
| 1235 | 1236 | current-version: 395 |
| 1236 | 1237 | parent-umbrella: |
| ... | ... | @@ -1314,17 +1315,17 @@ targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatal |
| 1314 | 1315 | arm64e-macos, arm64e-maccatalyst ] |
| 1315 | 1316 | uuids: |
| 1316 | 1317 | - target: x86_64-macos |
| 1317 | value: 8AE2D1DF-B8E1-3564-810B-65C611BA237B | |
| 1318 | value: 942C1938-B1BC-3B74-912C-D7E7E2B6DC72 | |
| 1318 | 1319 | - target: x86_64-maccatalyst |
| 1319 | value: 8AE2D1DF-B8E1-3564-810B-65C611BA237B | |
| 1320 | value: 942C1938-B1BC-3B74-912C-D7E7E2B6DC72 | |
| 1320 | 1321 | - target: arm64-macos |
| 1321 | 1322 | value: 00000000-0000-0000-0000-000000000000 |
| 1322 | 1323 | - target: arm64-maccatalyst |
| 1323 | 1324 | value: 00000000-0000-0000-0000-000000000000 |
| 1324 | 1325 | - target: arm64e-macos |
| 1325 | value: 2E8EE0E2-160C-3418-AFC4-3FD86B4E7A6E | |
| 1326 | value: B126606C-8D07-3F9D-AD5E-9864CF11D901 | |
| 1326 | 1327 | - target: arm64e-maccatalyst |
| 1327 | value: 2E8EE0E2-160C-3418-AFC4-3FD86B4E7A6E | |
| 1328 | value: B126606C-8D07-3F9D-AD5E-9864CF11D901 | |
| 1328 | 1329 | install-name: '/usr/lib/system/libsystem_blocks.dylib' |
| 1329 | 1330 | current-version: 84 |
| 1330 | 1331 | parent-umbrella: |
| ... | ... | @@ -1346,17 +1347,17 @@ targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatal |
| 1346 | 1347 | arm64e-macos, arm64e-maccatalyst ] |
| 1347 | 1348 | uuids: |
| 1348 | 1349 | - target: x86_64-macos |
| 1349 | value: 5EFAF10B-2EC1-32ED-B077-80125E552C8D | |
| 1350 | value: 376F7CB7-6DD2-3E00-976F-77DD755BDB0D | |
| 1350 | 1351 | - target: x86_64-maccatalyst |
| 1351 | value: 5EFAF10B-2EC1-32ED-B077-80125E552C8D | |
| 1352 | value: 376F7CB7-6DD2-3E00-976F-77DD755BDB0D | |
| 1352 | 1353 | - target: arm64-macos |
| 1353 | 1354 | value: 00000000-0000-0000-0000-000000000000 |
| 1354 | 1355 | - target: arm64-maccatalyst |
| 1355 | 1356 | value: 00000000-0000-0000-0000-000000000000 |
| 1356 | 1357 | - target: arm64e-macos |
| 1357 | value: A3869999-0792-3E09-B3FB-5E87AE4639BE | |
| 1358 | value: 756CD0D2-3241-3A74-8C59-02632DCEE221 | |
| 1358 | 1359 | - target: arm64e-maccatalyst |
| 1359 | value: A3869999-0792-3E09-B3FB-5E87AE4639BE | |
| 1360 | value: 756CD0D2-3241-3A74-8C59-02632DCEE221 | |
| 1360 | 1361 | install-name: '/usr/lib/system/libsystem_c.dylib' |
| 1361 | 1362 | current-version: 1534.40.2 |
| 1362 | 1363 | parent-umbrella: |
| ... | ... | @@ -1653,17 +1654,17 @@ targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatal |
| 1653 | 1654 | arm64e-macos, arm64e-maccatalyst ] |
| 1654 | 1655 | uuids: |
| 1655 | 1656 | - target: x86_64-macos |
| 1656 | value: 308C9B23-5690-30DE-8008-0C50E7C725C5 | |
| 1657 | value: 2053883C-79F4-3AF8-A37C-DE204E208C60 | |
| 1657 | 1658 | - target: x86_64-maccatalyst |
| 1658 | value: 308C9B23-5690-30DE-8008-0C50E7C725C5 | |
| 1659 | value: 2053883C-79F4-3AF8-A37C-DE204E208C60 | |
| 1659 | 1660 | - target: arm64-macos |
| 1660 | 1661 | value: 00000000-0000-0000-0000-000000000000 |
| 1661 | 1662 | - target: arm64-maccatalyst |
| 1662 | 1663 | value: 00000000-0000-0000-0000-000000000000 |
| 1663 | 1664 | - target: arm64e-macos |
| 1664 | value: 89E9EF9E-ED46-307F-B973-6B5C3FB67388 | |
| 1665 | value: CB445464-28B4-353C-976E-59DA0E229FED | |
| 1665 | 1666 | - target: arm64e-maccatalyst |
| 1666 | value: 89E9EF9E-ED46-307F-B973-6B5C3FB67388 | |
| 1667 | value: CB445464-28B4-353C-976E-59DA0E229FED | |
| 1667 | 1668 | install-name: '/usr/lib/system/libsystem_collections.dylib' |
| 1668 | 1669 | current-version: 1534.40.2 |
| 1669 | 1670 | parent-umbrella: |
| ... | ... | @@ -1696,19 +1697,19 @@ targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatal |
| 1696 | 1697 | arm64e-macos, arm64e-maccatalyst ] |
| 1697 | 1698 | uuids: |
| 1698 | 1699 | - target: x86_64-macos |
| 1699 | value: 1CCF39AE-1799-327F-BFA5-5CBBC9511318 | |
| 1700 | value: E7F80C5C-E18C-3201-ACB6-9A4C46B6574B | |
| 1700 | 1701 | - target: x86_64-maccatalyst |
| 1701 | value: 1CCF39AE-1799-327F-BFA5-5CBBC9511318 | |
| 1702 | value: E7F80C5C-E18C-3201-ACB6-9A4C46B6574B | |
| 1702 | 1703 | - target: arm64-macos |
| 1703 | 1704 | value: 00000000-0000-0000-0000-000000000000 |
| 1704 | 1705 | - target: arm64-maccatalyst |
| 1705 | 1706 | value: 00000000-0000-0000-0000-000000000000 |
| 1706 | 1707 | - target: arm64e-macos |
| 1707 | value: 3C081A70-EBBF-3746-A83F-FC93891BAA71 | |
| 1708 | value: 113A1DDB-1B61-3C33-9FD5-B39A2A29D779 | |
| 1708 | 1709 | - target: arm64e-maccatalyst |
| 1709 | value: 3C081A70-EBBF-3746-A83F-FC93891BAA71 | |
| 1710 | value: 113A1DDB-1B61-3C33-9FD5-B39A2A29D779 | |
| 1710 | 1711 | install-name: '/usr/lib/system/libsystem_configuration.dylib' |
| 1711 | current-version: 1241.40.2 | |
| 1712 | current-version: 1241.60.3 | |
| 1712 | 1713 | parent-umbrella: |
| 1713 | 1714 | - targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatalyst, |
| 1714 | 1715 | arm64e-macos, arm64e-maccatalyst ] |
| ... | ... | @@ -1736,17 +1737,17 @@ targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatal |
| 1736 | 1737 | arm64e-macos, arm64e-maccatalyst ] |
| 1737 | 1738 | uuids: |
| 1738 | 1739 | - target: x86_64-macos |
| 1739 | value: B94F5292-7CDC-368F-8D91-0CD73AE80924 | |
| 1740 | value: D44E0845-001C-3C46-B3A7-E4926DAEF6B3 | |
| 1740 | 1741 | - target: x86_64-maccatalyst |
| 1741 | value: B94F5292-7CDC-368F-8D91-0CD73AE80924 | |
| 1742 | value: D44E0845-001C-3C46-B3A7-E4926DAEF6B3 | |
| 1742 | 1743 | - target: arm64-macos |
| 1743 | 1744 | value: 00000000-0000-0000-0000-000000000000 |
| 1744 | 1745 | - target: arm64-maccatalyst |
| 1745 | 1746 | value: 00000000-0000-0000-0000-000000000000 |
| 1746 | 1747 | - target: arm64e-macos |
| 1747 | value: D48AD081-4875-3F66-ABE1-9B646DD03B9C | |
| 1748 | value: 2694748C-A452-3438-BB47-161D7B220AE2 | |
| 1748 | 1749 | - target: arm64e-maccatalyst |
| 1749 | value: D48AD081-4875-3F66-ABE1-9B646DD03B9C | |
| 1750 | value: 2694748C-A452-3438-BB47-161D7B220AE2 | |
| 1750 | 1751 | install-name: '/usr/lib/system/libsystem_containermanager.dylib' |
| 1751 | 1752 | parent-umbrella: |
| 1752 | 1753 | - targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatalyst, |
| ... | ... | @@ -1911,17 +1912,17 @@ targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatal |
| 1911 | 1912 | arm64e-macos, arm64e-maccatalyst ] |
| 1912 | 1913 | uuids: |
| 1913 | 1914 | - target: x86_64-macos |
| 1914 | value: 47275741-03DA-37A9-85B9-541F4DCB1163 | |
| 1915 | value: D86D13CC-2AF9-3A17-BCF3-0D16703F99A7 | |
| 1915 | 1916 | - target: x86_64-maccatalyst |
| 1916 | value: 47275741-03DA-37A9-85B9-541F4DCB1163 | |
| 1917 | value: D86D13CC-2AF9-3A17-BCF3-0D16703F99A7 | |
| 1917 | 1918 | - target: arm64-macos |
| 1918 | 1919 | value: 00000000-0000-0000-0000-000000000000 |
| 1919 | 1920 | - target: arm64-maccatalyst |
| 1920 | 1921 | value: 00000000-0000-0000-0000-000000000000 |
| 1921 | 1922 | - target: arm64e-macos |
| 1922 | value: 9F1BA0E0-8227-364B-8CF4-86D6870D6937 | |
| 1923 | value: 6E9DED8E-2A44-33E3-909F-74B4786482A2 | |
| 1923 | 1924 | - target: arm64e-maccatalyst |
| 1924 | value: 9F1BA0E0-8227-364B-8CF4-86D6870D6937 | |
| 1925 | value: 6E9DED8E-2A44-33E3-909F-74B4786482A2 | |
| 1925 | 1926 | install-name: '/usr/lib/system/libsystem_coreservices.dylib' |
| 1926 | 1927 | current-version: 129 |
| 1927 | 1928 | parent-umbrella: |
| ... | ... | @@ -1945,17 +1946,17 @@ targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatal |
| 1945 | 1946 | arm64e-macos, arm64e-maccatalyst ] |
| 1946 | 1947 | uuids: |
| 1947 | 1948 | - target: x86_64-macos |
| 1948 | value: 4B2F10CE-2D99-3B79-A05A-87DD03065ACB | |
| 1949 | value: E272E2C2-8511-3C94-8C39-F5319F2812BB | |
| 1949 | 1950 | - target: x86_64-maccatalyst |
| 1950 | value: 4B2F10CE-2D99-3B79-A05A-87DD03065ACB | |
| 1951 | value: E272E2C2-8511-3C94-8C39-F5319F2812BB | |
| 1951 | 1952 | - target: arm64-macos |
| 1952 | 1953 | value: 00000000-0000-0000-0000-000000000000 |
| 1953 | 1954 | - target: arm64-maccatalyst |
| 1954 | 1955 | value: 00000000-0000-0000-0000-000000000000 |
| 1955 | 1956 | - target: arm64e-macos |
| 1956 | value: 859E9F1E-85E4-3469-9733-5846C98B155D | |
| 1957 | value: 74F6C923-5FF6-39D0-90DE-8FB4812EA263 | |
| 1957 | 1958 | - target: arm64e-maccatalyst |
| 1958 | value: 859E9F1E-85E4-3469-9733-5846C98B155D | |
| 1959 | value: 74F6C923-5FF6-39D0-90DE-8FB4812EA263 | |
| 1959 | 1960 | install-name: '/usr/lib/system/libsystem_darwin.dylib' |
| 1960 | 1961 | parent-umbrella: |
| 1961 | 1962 | - targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatalyst, |
| ... | ... | @@ -1996,19 +1997,19 @@ targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatal |
| 1996 | 1997 | arm64e-macos, arm64e-maccatalyst ] |
| 1997 | 1998 | uuids: |
| 1998 | 1999 | - target: x86_64-macos |
| 1999 | value: C352C6E4-8236-3B91-8ECA-4692191DD227 | |
| 2000 | value: 77610ACE-81D4-33E5-A343-5FDA27F53E10 | |
| 2000 | 2001 | - target: x86_64-maccatalyst |
| 2001 | value: C352C6E4-8236-3B91-8ECA-4692191DD227 | |
| 2002 | value: 77610ACE-81D4-33E5-A343-5FDA27F53E10 | |
| 2002 | 2003 | - target: arm64-macos |
| 2003 | 2004 | value: 00000000-0000-0000-0000-000000000000 |
| 2004 | 2005 | - target: arm64-maccatalyst |
| 2005 | 2006 | value: 00000000-0000-0000-0000-000000000000 |
| 2006 | 2007 | - target: arm64e-macos |
| 2007 | value: 1122C71F-CFA3-38EB-A329-C647E500C9B1 | |
| 2008 | value: F87EFC17-B673-3488-B503-C67E2FFDE6A0 | |
| 2008 | 2009 | - target: arm64e-maccatalyst |
| 2009 | value: 1122C71F-CFA3-38EB-A329-C647E500C9B1 | |
| 2010 | value: F87EFC17-B673-3488-B503-C67E2FFDE6A0 | |
| 2010 | 2011 | install-name: '/usr/lib/system/libsystem_dnssd.dylib' |
| 2011 | current-version: 1790.40.31 | |
| 2012 | current-version: 1790.60.25 | |
| 2012 | 2013 | parent-umbrella: |
| 2013 | 2014 | - targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatalyst, |
| 2014 | 2015 | arm64e-macos, arm64e-maccatalyst ] |
| ... | ... | @@ -2046,17 +2047,17 @@ targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatal |
| 2046 | 2047 | arm64e-macos, arm64e-maccatalyst ] |
| 2047 | 2048 | uuids: |
| 2048 | 2049 | - target: x86_64-macos |
| 2049 | value: 2AF1974D-3A00-3461-9FDB-AF641DE4253E | |
| 2050 | value: 223BBDCF-6D59-3770-9E6A-38B762676030 | |
| 2050 | 2051 | - target: x86_64-maccatalyst |
| 2051 | value: 2AF1974D-3A00-3461-9FDB-AF641DE4253E | |
| 2052 | value: 223BBDCF-6D59-3770-9E6A-38B762676030 | |
| 2052 | 2053 | - target: arm64-macos |
| 2053 | 2054 | value: 00000000-0000-0000-0000-000000000000 |
| 2054 | 2055 | - target: arm64-maccatalyst |
| 2055 | 2056 | value: 00000000-0000-0000-0000-000000000000 |
| 2056 | 2057 | - target: arm64e-macos |
| 2057 | value: C50ECE78-12CE-377F-93BA-B0D8B0D93CE7 | |
| 2058 | value: EE355E15-A47F-3BED-A955-1041497449AE | |
| 2058 | 2059 | - target: arm64e-maccatalyst |
| 2059 | value: C50ECE78-12CE-377F-93BA-B0D8B0D93CE7 | |
| 2060 | value: EE355E15-A47F-3BED-A955-1041497449AE | |
| 2060 | 2061 | install-name: '/usr/lib/system/libsystem_featureflags.dylib' |
| 2061 | 2062 | current-version: 71 |
| 2062 | 2063 | parent-umbrella: |
| ... | ... | @@ -2073,17 +2074,17 @@ targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatal |
| 2073 | 2074 | arm64e-macos, arm64e-maccatalyst ] |
| 2074 | 2075 | uuids: |
| 2075 | 2076 | - target: x86_64-macos |
| 2076 | value: 37924254-46CA-3531-9BE4-E9782F4DA626 | |
| 2077 | value: 7B76D94D-56F7-3B8A-B63D-ED567EFA12F6 | |
| 2077 | 2078 | - target: x86_64-maccatalyst |
| 2078 | value: 37924254-46CA-3531-9BE4-E9782F4DA626 | |
| 2079 | value: 7B76D94D-56F7-3B8A-B63D-ED567EFA12F6 | |
| 2079 | 2080 | - target: arm64-macos |
| 2080 | 2081 | value: 00000000-0000-0000-0000-000000000000 |
| 2081 | 2082 | - target: arm64-maccatalyst |
| 2082 | 2083 | value: 00000000-0000-0000-0000-000000000000 |
| 2083 | 2084 | - target: arm64e-macos |
| 2084 | value: 177AEA65-CA0C-38EB-8891-7726D30EC0AB | |
| 2085 | value: 67168754-ABAC-33C6-AFF7-FF53F1A8745C | |
| 2085 | 2086 | - target: arm64e-maccatalyst |
| 2086 | value: 177AEA65-CA0C-38EB-8891-7726D30EC0AB | |
| 2087 | value: 67168754-ABAC-33C6-AFF7-FF53F1A8745C | |
| 2087 | 2088 | install-name: '/usr/lib/system/libsystem_info.dylib' |
| 2088 | 2089 | parent-umbrella: |
| 2089 | 2090 | - targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatalyst, |
| ... | ... | @@ -2210,19 +2211,19 @@ targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatal |
| 2210 | 2211 | arm64e-macos, arm64e-maccatalyst ] |
| 2211 | 2212 | uuids: |
| 2212 | 2213 | - target: x86_64-macos |
| 2213 | value: 6D1DB971-27A7-3DBC-A7FF-1D25A88E5282 | |
| 2214 | value: 7C3DCC95-9F42-3C7C-8796-476FF67B9CF7 | |
| 2214 | 2215 | - target: x86_64-maccatalyst |
| 2215 | value: 6D1DB971-27A7-3DBC-A7FF-1D25A88E5282 | |
| 2216 | value: 7C3DCC95-9F42-3C7C-8796-476FF67B9CF7 | |
| 2216 | 2217 | - target: arm64-macos |
| 2217 | value: B529197C-5FB5-3ABB-915F-9EB576658F0F | |
| 2218 | value: EB0327EE-CB9C-37ED-AB6A-E9AF74E814F0 | |
| 2218 | 2219 | - target: arm64-maccatalyst |
| 2219 | value: B529197C-5FB5-3ABB-915F-9EB576658F0F | |
| 2220 | value: EB0327EE-CB9C-37ED-AB6A-E9AF74E814F0 | |
| 2220 | 2221 | - target: arm64e-macos |
| 2221 | value: 66D9DC04-E3C0-329C-B4CA-8C6E2CCA7FD3 | |
| 2222 | value: AEBF397E-E2EF-3A49-BE58-23D4558511F6 | |
| 2222 | 2223 | - target: arm64e-maccatalyst |
| 2223 | value: 66D9DC04-E3C0-329C-B4CA-8C6E2CCA7FD3 | |
| 2224 | value: AEBF397E-E2EF-3A49-BE58-23D4558511F6 | |
| 2224 | 2225 | install-name: '/usr/lib/system/libsystem_kernel.dylib' |
| 2225 | current-version: 8792.41.7 | |
| 2226 | current-version: 8792.61.2 | |
| 2226 | 2227 | parent-umbrella: |
| 2227 | 2228 | - targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatalyst, |
| 2228 | 2229 | arm64e-macos, arm64e-maccatalyst ] |
| ... | ... | @@ -2531,7 +2532,7 @@ exports: |
| 2531 | 2532 | _os_packet_set_expire_time, _os_packet_set_expiry_action, |
| 2532 | 2533 | _os_packet_set_flow_uuid, _os_packet_set_group_end, _os_packet_set_group_start, |
| 2533 | 2534 | _os_packet_set_headroom, _os_packet_set_inet_checksum, _os_packet_set_keep_alive, |
| 2534 | _os_packet_set_link_broadcast, _os_packet_set_link_ethfcs, | |
| 2535 | _os_packet_set_l4s_flag, _os_packet_set_link_broadcast, _os_packet_set_link_ethfcs, | |
| 2535 | 2536 | _os_packet_set_link_header_length, _os_packet_set_link_multicast, |
| 2536 | 2537 | _os_packet_set_packetid, _os_packet_set_protocol_segment_size, |
| 2537 | 2538 | _os_packet_set_service_class, _os_packet_set_token, _os_packet_set_trace_id, |
| ... | ... | @@ -2557,45 +2558,46 @@ exports: |
| 2557 | 2558 | _posix_spawnattr_getprocesstype_np, _posix_spawnattr_getsigdefault, |
| 2558 | 2559 | _posix_spawnattr_getsigmask, _posix_spawnattr_init, _posix_spawnattr_set_alt_rosetta_np, |
| 2559 | 2560 | _posix_spawnattr_set_crash_behavior_deadline_np, _posix_spawnattr_set_crash_behavior_np, |
| 2560 | _posix_spawnattr_set_csm_np, _posix_spawnattr_set_darwin_role_np, | |
| 2561 | _posix_spawnattr_set_filedesclimit_ext, _posix_spawnattr_set_gid_np, | |
| 2562 | _posix_spawnattr_set_groups_np, _posix_spawnattr_set_importancewatch_port_np, | |
| 2563 | _posix_spawnattr_set_jetsam_ttr_np, _posix_spawnattr_set_launch_type_np, | |
| 2564 | _posix_spawnattr_set_login_np, _posix_spawnattr_set_max_addr_np, | |
| 2565 | _posix_spawnattr_set_persona_gid_np, _posix_spawnattr_set_persona_groups_np, | |
| 2566 | _posix_spawnattr_set_persona_np, _posix_spawnattr_set_persona_uid_np, | |
| 2567 | _posix_spawnattr_set_platform_np, _posix_spawnattr_set_portlimits_ext, | |
| 2568 | _posix_spawnattr_set_ptrauth_task_port_np, _posix_spawnattr_set_qos_clamp_np, | |
| 2569 | _posix_spawnattr_set_registered_ports_np, _posix_spawnattr_set_subsystem_root_path_np, | |
| 2570 | _posix_spawnattr_set_threadlimit_ext, _posix_spawnattr_set_uid_np, | |
| 2571 | _posix_spawnattr_setarchpref_np, _posix_spawnattr_setauditsessionport_np, | |
| 2572 | _posix_spawnattr_setbinpref_np, _posix_spawnattr_setcoalition_np, | |
| 2573 | _posix_spawnattr_setcpumonitor, _posix_spawnattr_setcpumonitor_default, | |
| 2574 | _posix_spawnattr_setexceptionports_np, _posix_spawnattr_setflags, | |
| 2575 | _posix_spawnattr_setjetsam_ext, _posix_spawnattr_setmacpolicyinfo_np, | |
| 2576 | _posix_spawnattr_setnosmt_np, _posix_spawnattr_setpcontrol_np, | |
| 2577 | _posix_spawnattr_setpgroup, _posix_spawnattr_setprocesstype_np, | |
| 2578 | _posix_spawnattr_setsigdefault, _posix_spawnattr_setsigmask, | |
| 2579 | _posix_spawnattr_setspecialport_np, _pread, '_pread$NOCANCEL', | |
| 2580 | _preadv, '_preadv$NOCANCEL', _proc_clear_cpulimits, _proc_clear_delayidlesleep, | |
| 2581 | _proc_clear_dirty, _proc_clear_vmpressure, _proc_current_thread_schedinfo, | |
| 2582 | _proc_denap_assertion_begin_with_msg, _proc_denap_assertion_complete, | |
| 2583 | _proc_disable_apptype, _proc_disable_cpumon, _proc_disable_wakemon, | |
| 2584 | _proc_donate_importance_boost, _proc_enable_apptype, _proc_get_cpumon_params, | |
| 2585 | _proc_get_dirty, _proc_get_wakemon_params, _proc_importance_assertion_begin_with_msg, | |
| 2586 | _proc_importance_assertion_complete, _proc_kmsgbuf, _proc_libversion, | |
| 2587 | _proc_list_dynkqueueids, _proc_list_uptrs, _proc_listallpids, | |
| 2588 | _proc_listchildpids, _proc_listcoalitions, _proc_listpgrppids, | |
| 2589 | _proc_listpids, _proc_listpidspath, _proc_name, _proc_pid_rusage, | |
| 2590 | _proc_piddynkqueueinfo, _proc_pidfdinfo, _proc_pidfileportinfo, | |
| 2591 | _proc_pidinfo, _proc_pidoriginatorinfo, _proc_pidpath, _proc_pidpath_audittoken, | |
| 2592 | _proc_regionfilename, _proc_reset_footprint_interval, _proc_resume_cpumon, | |
| 2593 | _proc_rlimit_control, _proc_set_cpumon_defaults, _proc_set_cpumon_params, | |
| 2594 | _proc_set_cpumon_params_fatal, _proc_set_csm, _proc_set_delayidlesleep, | |
| 2595 | _proc_set_dirty, _proc_set_no_smt, _proc_set_owner_vmpressure, | |
| 2596 | _proc_set_wakemon_defaults, _proc_set_wakemon_params, _proc_setcpu_percentage, | |
| 2597 | _proc_setpcontrol, _proc_setthread_cpupercent, _proc_setthread_csm, | |
| 2598 | _proc_setthread_no_smt, _proc_suppress, _proc_terminate, _proc_terminate_all_rsr, | |
| 2561 | _posix_spawnattr_set_crash_count_np, _posix_spawnattr_set_csm_np, | |
| 2562 | _posix_spawnattr_set_darwin_role_np, _posix_spawnattr_set_filedesclimit_ext, | |
| 2563 | _posix_spawnattr_set_gid_np, _posix_spawnattr_set_groups_np, | |
| 2564 | _posix_spawnattr_set_importancewatch_port_np, _posix_spawnattr_set_jetsam_ttr_np, | |
| 2565 | _posix_spawnattr_set_launch_type_np, _posix_spawnattr_set_login_np, | |
| 2566 | _posix_spawnattr_set_max_addr_np, _posix_spawnattr_set_persona_gid_np, | |
| 2567 | _posix_spawnattr_set_persona_groups_np, _posix_spawnattr_set_persona_np, | |
| 2568 | _posix_spawnattr_set_persona_uid_np, _posix_spawnattr_set_platform_np, | |
| 2569 | _posix_spawnattr_set_portlimits_ext, _posix_spawnattr_set_ptrauth_task_port_np, | |
| 2570 | _posix_spawnattr_set_qos_clamp_np, _posix_spawnattr_set_registered_ports_np, | |
| 2571 | _posix_spawnattr_set_subsystem_root_path_np, _posix_spawnattr_set_threadlimit_ext, | |
| 2572 | _posix_spawnattr_set_uid_np, _posix_spawnattr_setarchpref_np, | |
| 2573 | _posix_spawnattr_setauditsessionport_np, _posix_spawnattr_setbinpref_np, | |
| 2574 | _posix_spawnattr_setcoalition_np, _posix_spawnattr_setcpumonitor, | |
| 2575 | _posix_spawnattr_setcpumonitor_default, _posix_spawnattr_setexceptionports_np, | |
| 2576 | _posix_spawnattr_setflags, _posix_spawnattr_setjetsam_ext, | |
| 2577 | _posix_spawnattr_setmacpolicyinfo_np, _posix_spawnattr_setnosmt_np, | |
| 2578 | _posix_spawnattr_setpcontrol_np, _posix_spawnattr_setpgroup, | |
| 2579 | _posix_spawnattr_setprocesstype_np, _posix_spawnattr_setsigdefault, | |
| 2580 | _posix_spawnattr_setsigmask, _posix_spawnattr_setspecialport_np, | |
| 2581 | _pread, '_pread$NOCANCEL', _preadv, '_preadv$NOCANCEL', _proc_clear_cpulimits, | |
| 2582 | _proc_clear_delayidlesleep, _proc_clear_dirty, _proc_clear_vmpressure, | |
| 2583 | _proc_current_thread_schedinfo, _proc_denap_assertion_begin_with_msg, | |
| 2584 | _proc_denap_assertion_complete, _proc_disable_apptype, _proc_disable_cpumon, | |
| 2585 | _proc_disable_wakemon, _proc_donate_importance_boost, _proc_enable_apptype, | |
| 2586 | _proc_get_cpumon_params, _proc_get_dirty, _proc_get_wakemon_params, | |
| 2587 | _proc_importance_assertion_begin_with_msg, _proc_importance_assertion_complete, | |
| 2588 | _proc_kmsgbuf, _proc_libversion, _proc_list_dynkqueueids, | |
| 2589 | _proc_list_uptrs, _proc_listallpids, _proc_listchildpids, | |
| 2590 | _proc_listcoalitions, _proc_listpgrppids, _proc_listpids, | |
| 2591 | _proc_listpidspath, _proc_name, _proc_pid_rusage, _proc_piddynkqueueinfo, | |
| 2592 | _proc_pidfdinfo, _proc_pidfileportinfo, _proc_pidinfo, _proc_pidoriginatorinfo, | |
| 2593 | _proc_pidpath, _proc_pidpath_audittoken, _proc_regionfilename, | |
| 2594 | _proc_reset_footprint_interval, _proc_resume_cpumon, _proc_rlimit_control, | |
| 2595 | _proc_set_cpumon_defaults, _proc_set_cpumon_params, _proc_set_cpumon_params_fatal, | |
| 2596 | _proc_set_csm, _proc_set_delayidlesleep, _proc_set_dirty, | |
| 2597 | _proc_set_no_smt, _proc_set_owner_vmpressure, _proc_set_wakemon_defaults, | |
| 2598 | _proc_set_wakemon_params, _proc_setcpu_percentage, _proc_setpcontrol, | |
| 2599 | _proc_setthread_cpupercent, _proc_setthread_csm, _proc_setthread_no_smt, | |
| 2600 | _proc_suppress, _proc_terminate, _proc_terminate_all_rsr, | |
| 2599 | 2601 | _proc_trace_log, _proc_track_dirty, _proc_udata_info, _proc_uuid_policy, |
| 2600 | 2602 | _processor_assign, _processor_control, _processor_exit, _processor_get_assignment, |
| 2601 | 2603 | _processor_info, _processor_set_create, _processor_set_default, |
| ... | ... | @@ -2707,21 +2709,21 @@ targets: [ x86_64-macos, x86_64-maccatalyst, x86_64h-macos, x86_64h-macc |
| 2707 | 2709 | arm64-macos, arm64-maccatalyst, arm64e-macos, arm64e-maccatalyst ] |
| 2708 | 2710 | uuids: |
| 2709 | 2711 | - target: x86_64-macos |
| 2710 | value: 5F7B0A6E-0315-3171-B806-4CCDB23007F4 | |
| 2712 | value: DC460796-C8A7-3507-8539-C890D9EDDC8C | |
| 2711 | 2713 | - target: x86_64-maccatalyst |
| 2712 | value: 5F7B0A6E-0315-3171-B806-4CCDB23007F4 | |
| 2714 | value: DC460796-C8A7-3507-8539-C890D9EDDC8C | |
| 2713 | 2715 | - target: x86_64h-macos |
| 2714 | value: 99FD67E1-20A8-36A7-836D-C8F156C98C5D | |
| 2716 | value: 73F0FC1C-FC2A-3B36-8796-7C2C2CBA7214 | |
| 2715 | 2717 | - target: x86_64h-maccatalyst |
| 2716 | value: 99FD67E1-20A8-36A7-836D-C8F156C98C5D | |
| 2718 | value: 73F0FC1C-FC2A-3B36-8796-7C2C2CBA7214 | |
| 2717 | 2719 | - target: arm64-macos |
| 2718 | 2720 | value: 00000000-0000-0000-0000-000000000000 |
| 2719 | 2721 | - target: arm64-maccatalyst |
| 2720 | 2722 | value: 00000000-0000-0000-0000-000000000000 |
| 2721 | 2723 | - target: arm64e-macos |
| 2722 | value: 748648A3-C1FF-3A75-8CE4-95B8334A6D58 | |
| 2724 | value: 6BEE17F3-04F2-3B1F-B8EB-C94379ABA9BD | |
| 2723 | 2725 | - target: arm64e-maccatalyst |
| 2724 | value: 748648A3-C1FF-3A75-8CE4-95B8334A6D58 | |
| 2726 | value: 6BEE17F3-04F2-3B1F-B8EB-C94379ABA9BD | |
| 2725 | 2727 | install-name: '/usr/lib/system/libsystem_m.dylib' |
| 2726 | 2728 | current-version: 3226.0.1 |
| 2727 | 2729 | parent-umbrella: |
| ... | ... | @@ -2938,19 +2940,19 @@ targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatal |
| 2938 | 2940 | arm64e-macos, arm64e-maccatalyst ] |
| 2939 | 2941 | uuids: |
| 2940 | 2942 | - target: x86_64-macos |
| 2941 | value: D95D8C17-9F95-3076-A449-FBC4D1E9AD57 | |
| 2943 | value: F609F029-BCD0-3A54-B48A-99B3CE8378CE | |
| 2942 | 2944 | - target: x86_64-maccatalyst |
| 2943 | value: D95D8C17-9F95-3076-A449-FBC4D1E9AD57 | |
| 2945 | value: F609F029-BCD0-3A54-B48A-99B3CE8378CE | |
| 2944 | 2946 | - target: arm64-macos |
| 2945 | 2947 | value: 00000000-0000-0000-0000-000000000000 |
| 2946 | 2948 | - target: arm64-maccatalyst |
| 2947 | 2949 | value: 00000000-0000-0000-0000-000000000000 |
| 2948 | 2950 | - target: arm64e-macos |
| 2949 | value: 030A8CB7-CD53-32E1-A0CC-6AC7D7DE93F1 | |
| 2951 | value: 04185997-16D2-30DA-8691-7C82612635A3 | |
| 2950 | 2952 | - target: arm64e-maccatalyst |
| 2951 | value: 030A8CB7-CD53-32E1-A0CC-6AC7D7DE93F1 | |
| 2953 | value: 04185997-16D2-30DA-8691-7C82612635A3 | |
| 2952 | 2954 | install-name: '/usr/lib/system/libsystem_malloc.dylib' |
| 2953 | current-version: 409.40.6 | |
| 2955 | current-version: 409.60.6 | |
| 2954 | 2956 | parent-umbrella: |
| 2955 | 2957 | - targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatalyst, |
| 2956 | 2958 | arm64e-macos, arm64e-maccatalyst ] |
| ... | ... | @@ -3002,17 +3004,17 @@ targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatal |
| 3002 | 3004 | arm64e-macos, arm64e-maccatalyst ] |
| 3003 | 3005 | uuids: |
| 3004 | 3006 | - target: x86_64-macos |
| 3005 | value: 33130846-6A1D-33AA-BC75-06695EFCBF20 | |
| 3007 | value: 09114B12-EC3D-3943-A1BD-9909EE2F85B6 | |
| 3006 | 3008 | - target: x86_64-maccatalyst |
| 3007 | value: 33130846-6A1D-33AA-BC75-06695EFCBF20 | |
| 3009 | value: 09114B12-EC3D-3943-A1BD-9909EE2F85B6 | |
| 3008 | 3010 | - target: arm64-macos |
| 3009 | 3011 | value: 00000000-0000-0000-0000-000000000000 |
| 3010 | 3012 | - target: arm64-maccatalyst |
| 3011 | 3013 | value: 00000000-0000-0000-0000-000000000000 |
| 3012 | 3014 | - target: arm64e-macos |
| 3013 | value: 4972C105-1F4D-38BF-87C0-4724101B2CFA | |
| 3015 | value: 8737AB7F-91FA-3C06-B797-566A62D0751C | |
| 3014 | 3016 | - target: arm64e-maccatalyst |
| 3015 | value: 4972C105-1F4D-38BF-87C0-4724101B2CFA | |
| 3017 | value: 8737AB7F-91FA-3C06-B797-566A62D0751C | |
| 3016 | 3018 | install-name: '/usr/lib/system/libsystem_networkextension.dylib' |
| 3017 | 3019 | parent-umbrella: |
| 3018 | 3020 | - targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatalyst, |
| ... | ... | @@ -3095,17 +3097,17 @@ targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatal |
| 3095 | 3097 | arm64e-macos, arm64e-maccatalyst ] |
| 3096 | 3098 | uuids: |
| 3097 | 3099 | - target: x86_64-macos |
| 3098 | value: 1F9FBDD3-694A-3FF7-A232-F07DF4845ABE | |
| 3100 | value: 0463374D-9E62-3E58-A668-C9EFF9DB217C | |
| 3099 | 3101 | - target: x86_64-maccatalyst |
| 3100 | value: 1F9FBDD3-694A-3FF7-A232-F07DF4845ABE | |
| 3102 | value: 0463374D-9E62-3E58-A668-C9EFF9DB217C | |
| 3101 | 3103 | - target: arm64-macos |
| 3102 | 3104 | value: 00000000-0000-0000-0000-000000000000 |
| 3103 | 3105 | - target: arm64-maccatalyst |
| 3104 | 3106 | value: 00000000-0000-0000-0000-000000000000 |
| 3105 | 3107 | - target: arm64e-macos |
| 3106 | value: B2C5AAD6-13E5-3E2E-8DFC-601BAED4AA96 | |
| 3108 | value: 62FA1CCF-D4BB-3606-BDC9-C2F247A12CE8 | |
| 3107 | 3109 | - target: arm64e-maccatalyst |
| 3108 | value: B2C5AAD6-13E5-3E2E-8DFC-601BAED4AA96 | |
| 3110 | value: 62FA1CCF-D4BB-3606-BDC9-C2F247A12CE8 | |
| 3109 | 3111 | install-name: '/usr/lib/system/libsystem_notify.dylib' |
| 3110 | 3112 | current-version: 306 |
| 3111 | 3113 | parent-umbrella: |
| ... | ... | @@ -3128,17 +3130,17 @@ targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatal |
| 3128 | 3130 | arm64e-macos, arm64e-maccatalyst ] |
| 3129 | 3131 | uuids: |
| 3130 | 3132 | - target: x86_64-macos |
| 3131 | value: F07558DB-8B15-3D96-93F9-3A61BBD52F25 | |
| 3133 | value: F314B62B-98F4-3A7C-8296-8739F8B6855A | |
| 3132 | 3134 | - target: x86_64-maccatalyst |
| 3133 | value: F07558DB-8B15-3D96-93F9-3A61BBD52F25 | |
| 3135 | value: F314B62B-98F4-3A7C-8296-8739F8B6855A | |
| 3134 | 3136 | - target: arm64-macos |
| 3135 | value: 372B6A5F-EE6F-3F9C-84D1-E8027DB6FA17 | |
| 3137 | value: ABF0BAEB-706B-3AC1-B6AD-B5CF380B8963 | |
| 3136 | 3138 | - target: arm64-maccatalyst |
| 3137 | value: 372B6A5F-EE6F-3F9C-84D1-E8027DB6FA17 | |
| 3139 | value: ABF0BAEB-706B-3AC1-B6AD-B5CF380B8963 | |
| 3138 | 3140 | - target: arm64e-macos |
| 3139 | value: 78189670-2F47-332C-9A59-A210157AA97B | |
| 3141 | value: B215AE90-4ED2-3FCD-8CCC-6C0D93CC4F41 | |
| 3140 | 3142 | - target: arm64e-maccatalyst |
| 3141 | value: 78189670-2F47-332C-9A59-A210157AA97B | |
| 3143 | value: B215AE90-4ED2-3FCD-8CCC-6C0D93CC4F41 | |
| 3142 | 3144 | install-name: '/usr/lib/system/libsystem_platform.dylib' |
| 3143 | 3145 | current-version: 288 |
| 3144 | 3146 | parent-umbrella: |
| ... | ... | @@ -3220,17 +3222,17 @@ targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatal |
| 3220 | 3222 | arm64e-macos, arm64e-maccatalyst ] |
| 3221 | 3223 | uuids: |
| 3222 | 3224 | - target: x86_64-macos |
| 3223 | value: 13B5E252-77D1-31E1-888D-1C5F4426EA87 | |
| 3225 | value: 5920E36F-53EC-33F0-B675-8AE48B58418C | |
| 3224 | 3226 | - target: x86_64-maccatalyst |
| 3225 | value: 13B5E252-77D1-31E1-888D-1C5F4426EA87 | |
| 3227 | value: 5920E36F-53EC-33F0-B675-8AE48B58418C | |
| 3226 | 3228 | - target: arm64-macos |
| 3227 | value: 030D2641-514F-373F-9688-582D9D3B369A | |
| 3229 | value: 51C613E3-4ABF-359C-B275-2608BB1BE0B6 | |
| 3228 | 3230 | - target: arm64-maccatalyst |
| 3229 | value: 030D2641-514F-373F-9688-582D9D3B369A | |
| 3231 | value: 51C613E3-4ABF-359C-B275-2608BB1BE0B6 | |
| 3230 | 3232 | - target: arm64e-macos |
| 3231 | value: 886CACA0-5762-3640-8DB2-3FA3B911C062 | |
| 3233 | value: 132084C6-C347-3489-9AC2-FCAAD21CDB73 | |
| 3232 | 3234 | - target: arm64e-maccatalyst |
| 3233 | value: 886CACA0-5762-3640-8DB2-3FA3B911C062 | |
| 3235 | value: 132084C6-C347-3489-9AC2-FCAAD21CDB73 | |
| 3234 | 3236 | install-name: '/usr/lib/system/libsystem_pthread.dylib' |
| 3235 | 3237 | current-version: 514 |
| 3236 | 3238 | parent-umbrella: |
| ... | ... | @@ -3328,19 +3330,19 @@ targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatal |
| 3328 | 3330 | arm64e-macos, arm64e-maccatalyst ] |
| 3329 | 3331 | uuids: |
| 3330 | 3332 | - target: x86_64-macos |
| 3331 | value: A064D0A7-139F-33E5-959C-7067CF94DC2E | |
| 3333 | value: D199B283-8F09-3F2F-A17E-274BFF7733BE | |
| 3332 | 3334 | - target: x86_64-maccatalyst |
| 3333 | value: A064D0A7-139F-33E5-959C-7067CF94DC2E | |
| 3335 | value: D199B283-8F09-3F2F-A17E-274BFF7733BE | |
| 3334 | 3336 | - target: arm64-macos |
| 3335 | 3337 | value: 00000000-0000-0000-0000-000000000000 |
| 3336 | 3338 | - target: arm64-maccatalyst |
| 3337 | 3339 | value: 00000000-0000-0000-0000-000000000000 |
| 3338 | 3340 | - target: arm64e-macos |
| 3339 | value: 3ADBD543-3E57-332F-972C-A958D9E4FBF8 | |
| 3341 | value: 3680811A-78F7-361A-ABBE-8E783165AC81 | |
| 3340 | 3342 | - target: arm64e-maccatalyst |
| 3341 | value: 3ADBD543-3E57-332F-972C-A958D9E4FBF8 | |
| 3343 | value: 3680811A-78F7-361A-ABBE-8E783165AC81 | |
| 3342 | 3344 | install-name: '/usr/lib/system/libsystem_sandbox.dylib' |
| 3343 | current-version: 1845.41.2 | |
| 3345 | current-version: 1845.60.12 | |
| 3344 | 3346 | parent-umbrella: |
| 3345 | 3347 | - targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatalyst, |
| 3346 | 3348 | arm64e-macos, arm64e-maccatalyst ] |
| ... | ... | @@ -3415,17 +3417,17 @@ targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatal |
| 3415 | 3417 | arm64e-macos, arm64e-maccatalyst ] |
| 3416 | 3418 | uuids: |
| 3417 | 3419 | - target: x86_64-macos |
| 3418 | value: 15425DC5-5AEF-3711-A6B1-E3979FBEC662 | |
| 3420 | value: F24B1FA9-5692-35BA-9A9C-E071B7BFA5D7 | |
| 3419 | 3421 | - target: x86_64-maccatalyst |
| 3420 | value: 15425DC5-5AEF-3711-A6B1-E3979FBEC662 | |
| 3422 | value: F24B1FA9-5692-35BA-9A9C-E071B7BFA5D7 | |
| 3421 | 3423 | - target: arm64-macos |
| 3422 | 3424 | value: 00000000-0000-0000-0000-000000000000 |
| 3423 | 3425 | - target: arm64-maccatalyst |
| 3424 | 3426 | value: 00000000-0000-0000-0000-000000000000 |
| 3425 | 3427 | - target: arm64e-macos |
| 3426 | value: B8D75446-A5A3-3D0C-9C89-B65092333CD2 | |
| 3428 | value: 82513DC5-565F-3A4E-9431-4511FB0C22FA | |
| 3427 | 3429 | - target: arm64e-maccatalyst |
| 3428 | value: B8D75446-A5A3-3D0C-9C89-B65092333CD2 | |
| 3430 | value: 82513DC5-565F-3A4E-9431-4511FB0C22FA | |
| 3429 | 3431 | install-name: '/usr/lib/system/libsystem_secinit.dylib' |
| 3430 | 3432 | current-version: 119.40.2 |
| 3431 | 3433 | parent-umbrella: |
| ... | ... | @@ -3444,17 +3446,17 @@ targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatal |
| 3444 | 3446 | arm64e-macos, arm64e-maccatalyst ] |
| 3445 | 3447 | uuids: |
| 3446 | 3448 | - target: x86_64-macos |
| 3447 | value: CA62E5A0-80F0-3798-B8B6-71088A61F03C | |
| 3449 | value: A5915FB2-F0C9-3BF0-ADC6-BEB571C73E57 | |
| 3448 | 3450 | - target: x86_64-maccatalyst |
| 3449 | value: CA62E5A0-80F0-3798-B8B6-71088A61F03C | |
| 3451 | value: A5915FB2-F0C9-3BF0-ADC6-BEB571C73E57 | |
| 3450 | 3452 | - target: arm64-macos |
| 3451 | 3453 | value: 00000000-0000-0000-0000-000000000000 |
| 3452 | 3454 | - target: arm64-maccatalyst |
| 3453 | 3455 | value: 00000000-0000-0000-0000-000000000000 |
| 3454 | 3456 | - target: arm64e-macos |
| 3455 | value: DE393954-A39B-305C-BF0D-CF7563473762 | |
| 3457 | value: B31CD553-083B-39C6-BCB9-B0413ECAF562 | |
| 3456 | 3458 | - target: arm64e-maccatalyst |
| 3457 | value: DE393954-A39B-305C-BF0D-CF7563473762 | |
| 3459 | value: B31CD553-083B-39C6-BCB9-B0413ECAF562 | |
| 3458 | 3460 | install-name: '/usr/lib/system/libsystem_symptoms.dylib' |
| 3459 | 3461 | parent-umbrella: |
| 3460 | 3462 | - targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatalyst, |
| ... | ... | @@ -3474,19 +3476,19 @@ targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatal |
| 3474 | 3476 | arm64e-macos, arm64e-maccatalyst ] |
| 3475 | 3477 | uuids: |
| 3476 | 3478 | - target: x86_64-macos |
| 3477 | value: EBFC896A-380B-39AB-949F-06BEADFCDBF8 | |
| 3479 | value: C5359E6E-7B63-3E51-A664-3E3581E15F52 | |
| 3478 | 3480 | - target: x86_64-maccatalyst |
| 3479 | value: EBFC896A-380B-39AB-949F-06BEADFCDBF8 | |
| 3481 | value: C5359E6E-7B63-3E51-A664-3E3581E15F52 | |
| 3480 | 3482 | - target: arm64-macos |
| 3481 | 3483 | value: 00000000-0000-0000-0000-000000000000 |
| 3482 | 3484 | - target: arm64-maccatalyst |
| 3483 | 3485 | value: 00000000-0000-0000-0000-000000000000 |
| 3484 | 3486 | - target: arm64e-macos |
| 3485 | value: 73557AF9-086C-3CB4-9E95-CA1D774CAA41 | |
| 3487 | value: 616F473A-EB21-377D-B3B4-F1581F127F0D | |
| 3486 | 3488 | - target: arm64e-maccatalyst |
| 3487 | value: 73557AF9-086C-3CB4-9E95-CA1D774CAA41 | |
| 3489 | value: 616F473A-EB21-377D-B3B4-F1581F127F0D | |
| 3488 | 3490 | install-name: '/usr/lib/system/libsystem_trace.dylib' |
| 3489 | current-version: 1406.0.15 | |
| 3491 | current-version: 1406.60.2 | |
| 3490 | 3492 | parent-umbrella: |
| 3491 | 3493 | - targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatalyst, |
| 3492 | 3494 | arm64e-macos, arm64e-maccatalyst ] |
| ... | ... | @@ -3551,17 +3553,17 @@ targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatal |
| 3551 | 3553 | arm64e-macos, arm64e-maccatalyst ] |
| 3552 | 3554 | uuids: |
| 3553 | 3555 | - target: x86_64-macos |
| 3554 | value: 31C10303-6B57-3219-8DEF-ED784DCC67BA | |
| 3556 | value: E45FA86E-48EB-3926-A24C-323DB84D3700 | |
| 3555 | 3557 | - target: x86_64-maccatalyst |
| 3556 | value: 31C10303-6B57-3219-8DEF-ED784DCC67BA | |
| 3558 | value: E45FA86E-48EB-3926-A24C-323DB84D3700 | |
| 3557 | 3559 | - target: arm64-macos |
| 3558 | 3560 | value: 00000000-0000-0000-0000-000000000000 |
| 3559 | 3561 | - target: arm64-maccatalyst |
| 3560 | 3562 | value: 00000000-0000-0000-0000-000000000000 |
| 3561 | 3563 | - target: arm64e-macos |
| 3562 | value: 60F56A64-C75D-3E87-B275-E1FB9D078C5E | |
| 3564 | value: 1228EDDF-7C61-3674-8C42-B537FFE9EDDA | |
| 3563 | 3565 | - target: arm64e-maccatalyst |
| 3564 | value: 60F56A64-C75D-3E87-B275-E1FB9D078C5E | |
| 3566 | value: 1228EDDF-7C61-3674-8C42-B537FFE9EDDA | |
| 3565 | 3567 | install-name: '/usr/lib/system/libunwind.dylib' |
| 3566 | 3568 | current-version: 202.100 |
| 3567 | 3569 | parent-umbrella: |
| ... | ... | @@ -3624,19 +3626,19 @@ targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatal |
| 3624 | 3626 | arm64e-macos, arm64e-maccatalyst ] |
| 3625 | 3627 | uuids: |
| 3626 | 3628 | - target: x86_64-macos |
| 3627 | value: 38124BDF-4424-32BF-A60B-B4E96BC0EF70 | |
| 3629 | value: 7E56F9FE-DC35-3354-BA23-4103C09E22DD | |
| 3628 | 3630 | - target: x86_64-maccatalyst |
| 3629 | value: 38124BDF-4424-32BF-A60B-B4E96BC0EF70 | |
| 3631 | value: 7E56F9FE-DC35-3354-BA23-4103C09E22DD | |
| 3630 | 3632 | - target: arm64-macos |
| 3631 | 3633 | value: 00000000-0000-0000-0000-000000000000 |
| 3632 | 3634 | - target: arm64-maccatalyst |
| 3633 | 3635 | value: 00000000-0000-0000-0000-000000000000 |
| 3634 | 3636 | - target: arm64e-macos |
| 3635 | value: 44992A1E-D222-3D40-841D-E2CF9E26F67E | |
| 3637 | value: 8EF4547D-1AF8-37CF-B15A-29405BF12642 | |
| 3636 | 3638 | - target: arm64e-maccatalyst |
| 3637 | value: 44992A1E-D222-3D40-841D-E2CF9E26F67E | |
| 3639 | value: 8EF4547D-1AF8-37CF-B15A-29405BF12642 | |
| 3638 | 3640 | install-name: '/usr/lib/system/libxpc.dylib' |
| 3639 | current-version: 2462.41.2 | |
| 3641 | current-version: 2462.60.15 | |
| 3640 | 3642 | parent-umbrella: |
| 3641 | 3643 | - targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatalyst, |
| 3642 | 3644 | arm64e-macos, arm64e-maccatalyst ] |
lib/libc/include/aarch64-macos.11-none/arm/_limits.h-4| ... | ... | @@ -4,10 +4,6 @@ |
| 4 | 4 | #ifndef _ARM__LIMITS_H_ |
| 5 | 5 | #define _ARM__LIMITS_H_ |
| 6 | 6 | |
| 7 | #if defined (__arm__) || defined (__arm64__) | |
| 8 | ||
| 9 | 7 | #define __DARWIN_CLK_TCK 100 /* ticks per second */ |
| 10 | 8 | |
| 11 | #endif /* defined (__arm__) || defined (__arm64__) */ | |
| 12 | ||
| 13 | 9 | #endif /* _ARM__LIMITS_H_ */ |
| \ No newline at end of file |
lib/libc/include/aarch64-macos.11-none/arm/_mcontext.h-4| ... | ... | @@ -29,8 +29,6 @@ |
| 29 | 29 | #ifndef __ARM_MCONTEXT_H_ |
| 30 | 30 | #define __ARM_MCONTEXT_H_ |
| 31 | 31 | |
| 32 | #if defined (__arm__) || defined (__arm64__) | |
| 33 | ||
| 34 | 32 | #include <sys/cdefs.h> /* __DARWIN_UNIX03 */ |
| 35 | 33 | #include <sys/appleapiopts.h> |
| 36 | 34 | #include <mach/machine/_structs.h> |
| ... | ... | @@ -90,6 +88,4 @@ typedef _STRUCT_MCONTEXT32 *mcontext_t; |
| 90 | 88 | #endif |
| 91 | 89 | #endif /* _MCONTEXT_T */ |
| 92 | 90 | |
| 93 | #endif /* defined (__arm__) || defined (__arm64__) */ | |
| 94 | ||
| 95 | 91 | #endif /* __ARM_MCONTEXT_H_ */ |
| \ No newline at end of file |
lib/libc/include/aarch64-macos.11-none/arm/_param.h-3| ... | ... | @@ -5,8 +5,6 @@ |
| 5 | 5 | #ifndef _ARM__PARAM_H_ |
| 6 | 6 | #define _ARM__PARAM_H_ |
| 7 | 7 | |
| 8 | #if defined (__arm__) || defined (__arm64__) | |
| 9 | ||
| 10 | 8 | #include <arm/_types.h> |
| 11 | 9 | |
| 12 | 10 | /* |
| ... | ... | @@ -20,6 +18,5 @@ |
| 20 | 18 | #define __DARWIN_ALIGNBYTES32 (sizeof(__uint32_t) - 1) |
| 21 | 19 | #define __DARWIN_ALIGN32(p) ((__darwin_size_t)((__darwin_size_t)(p) + __DARWIN_ALIGNBYTES32) &~ __DARWIN_ALIGNBYTES32) |
| 22 | 20 | |
| 23 | #endif /* defined (__arm__) || defined (__arm64__) */ | |
| 24 | 21 | |
| 25 | 22 | #endif /* _ARM__PARAM_H_ */ |
| \ No newline at end of file |
lib/libc/include/aarch64-macos.11-none/arm/_types.h-4| ... | ... | @@ -4,8 +4,6 @@ |
| 4 | 4 | #ifndef _BSD_ARM__TYPES_H_ |
| 5 | 5 | #define _BSD_ARM__TYPES_H_ |
| 6 | 6 | |
| 7 | #if defined (__arm__) || defined (__arm64__) | |
| 8 | ||
| 9 | 7 | /* |
| 10 | 8 | * This header file contains integer types. It's intended to also contain |
| 11 | 9 | * flotaing point and other arithmetic types, as needed, later. |
| ... | ... | @@ -97,6 +95,4 @@ typedef __uint32_t __darwin_socklen_t; /* socklen_t (duh) */ |
| 97 | 95 | typedef long __darwin_ssize_t; /* byte count or error */ |
| 98 | 96 | typedef long __darwin_time_t; /* time() */ |
| 99 | 97 | |
| 100 | #endif /* defined (__arm__) || defined (__arm64__) */ | |
| 101 | ||
| 102 | 98 | #endif /* _BSD_ARM__TYPES_H_ */ |
| \ No newline at end of file |
lib/libc/include/aarch64-macos.11-none/arm/arch.h-4| ... | ... | @@ -28,8 +28,6 @@ |
| 28 | 28 | #ifndef _ARM_ARCH_H |
| 29 | 29 | #define _ARM_ARCH_H |
| 30 | 30 | |
| 31 | #if defined (__arm__) || defined (__arm64__) | |
| 32 | ||
| 33 | 31 | /* Collect the __ARM_ARCH_*__ compiler flags into something easier to use. */ |
| 34 | 32 | #if defined (__ARM_ARCH_7A__) || defined (__ARM_ARCH_7S__) || defined (__ARM_ARCH_7F__) || defined (__ARM_ARCH_7K__) |
| 35 | 33 | #define _ARM_ARCH_7 |
| ... | ... | @@ -66,6 +64,4 @@ |
| 66 | 64 | #define _ARM_ARCH_4 |
| 67 | 65 | #endif |
| 68 | 66 | |
| 69 | #endif /* defined (__arm__) || defined (__arm64__) */ | |
| 70 | ||
| 71 | 67 | #endif |
| \ No newline at end of file |
lib/libc/include/aarch64-macos.11-none/arm/endian.h-3| ... | ... | @@ -42,8 +42,6 @@ |
| 42 | 42 | #ifndef _ARM__ENDIAN_H_ |
| 43 | 43 | #define _ARM__ENDIAN_H_ |
| 44 | 44 | |
| 45 | #if defined (__arm__) || defined (__arm64__) | |
| 46 | ||
| 47 | 45 | #include <sys/cdefs.h> |
| 48 | 46 | /* |
| 49 | 47 | * Define _NOQUAD if the compiler does NOT support 64-bit integers. |
| ... | ... | @@ -77,5 +75,4 @@ |
| 77 | 75 | #include <sys/_endian.h> |
| 78 | 76 | |
| 79 | 77 | #endif /* defined(KERNEL) || (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) */ |
| 80 | #endif /* defined (__arm__) || defined (__arm64__) */ | |
| 81 | 78 | #endif /* !_ARM__ENDIAN_H_ */ |
| \ No newline at end of file |
lib/libc/include/aarch64-macos.11-none/arm/limits.h-4| ... | ... | @@ -39,8 +39,6 @@ |
| 39 | 39 | #ifndef _ARM_LIMITS_H_ |
| 40 | 40 | #define _ARM_LIMITS_H_ |
| 41 | 41 | |
| 42 | #if defined (__arm__) || defined (__arm64__) | |
| 43 | ||
| 44 | 42 | #include <sys/cdefs.h> |
| 45 | 43 | #include <arm/_limits.h> |
| 46 | 44 | |
| ... | ... | @@ -109,6 +107,4 @@ |
| 109 | 107 | #endif /* (!_POSIX_C_SOURCE && !_XOPEN_SOURCE) || _DARWIN_C_SOURCE */ |
| 110 | 108 | #endif /* !_ANSI_SOURCE */ |
| 111 | 109 | |
| 112 | #endif /* defined (__arm__) || defined (__arm64__) */ | |
| 113 | ||
| 114 | 110 | #endif /* _ARM_LIMITS_H_ */ |
| \ No newline at end of file |
lib/libc/include/aarch64-macos.11-none/arm/param.h-4| ... | ... | @@ -48,8 +48,6 @@ |
| 48 | 48 | #ifndef _ARM_PARAM_H_ |
| 49 | 49 | #define _ARM_PARAM_H_ |
| 50 | 50 | |
| 51 | #if defined (__arm__) || defined (__arm64__) | |
| 52 | ||
| 53 | 51 | #include <arm/_param.h> |
| 54 | 52 | |
| 55 | 53 | /* |
| ... | ... | @@ -146,6 +144,4 @@ |
| 146 | 144 | #define DELAY(n) { int N = (n); while (--N > 0); } |
| 147 | 145 | #endif /* defined(KERNEL) || defined(STANDALONE) */ |
| 148 | 146 | |
| 149 | #endif /* defined (__arm__) || defined (__arm64__) */ | |
| 150 | ||
| 151 | 147 | #endif /* _ARM_PARAM_H_ */ |
| \ No newline at end of file |
lib/libc/include/aarch64-macos.11-none/arm/signal.h-4| ... | ... | @@ -9,14 +9,10 @@ |
| 9 | 9 | #ifndef _ARM_SIGNAL_ |
| 10 | 10 | #define _ARM_SIGNAL_ 1 |
| 11 | 11 | |
| 12 | #if defined (__arm__) || defined (__arm64__) | |
| 13 | ||
| 14 | 12 | #include <sys/cdefs.h> |
| 15 | 13 | |
| 16 | 14 | #ifndef _ANSI_SOURCE |
| 17 | 15 | typedef int sig_atomic_t; |
| 18 | 16 | #endif /* ! _ANSI_SOURCE */ |
| 19 | 17 | |
| 20 | #endif /* defined (__arm__) || defined (__arm64__) */ | |
| 21 | ||
| 22 | 18 | #endif /* _ARM_SIGNAL_ */ |
| \ No newline at end of file |
lib/libc/include/aarch64-macos.11-none/arm/types.h+2-6| ... | ... | @@ -39,12 +39,9 @@ |
| 39 | 39 | *	@(#)types.h	8.3 (Berkeley) 1/5/94 |
| 40 | 40 | */ |
| 41 | 41 | |
| 42 | #ifndef _ARM_MACHTYPES_H_ | |
| 43 | #define _ARM_MACHTYPES_H_ | |
| 42 | #ifndef _MACHTYPES_H_ | |
| 44 | 43 | #define _MACHTYPES_H_ |
| 45 | 44 | |
| 46 | #if defined (__arm__) || defined (__arm64__) | |
| 47 | ||
| 48 | 45 | #ifndef __ASSEMBLER__ |
| 49 | 46 | #include <arm/_types.h> |
| 50 | 47 | #include <sys/cdefs.h> |
| ... | ... | @@ -107,5 +104,4 @@ typedef u_int64_t syscall_arg_t; |
| 107 | 104 | #endif |
| 108 | 105 | |
| 109 | 106 | #endif /* __ASSEMBLER__ */ |
| 110 | #endif /* defined (__arm__) || defined (__arm64__) */ | |
| 111 | #endif /* _ARM_MACHTYPES_H_ */ | |
| \ No newline at end of file | ||
| 107 | #endif /* _MACHTYPES_H_ */ | |
| \ No newline at end of file |
lib/libc/include/aarch64-macos.11-none/mach/arm/_structs.h+19-4| ... | ... | @@ -31,8 +31,6 @@ |
| 31 | 31 | #ifndef _MACH_ARM__STRUCTS_H_ |
| 32 | 32 | #define _MACH_ARM__STRUCTS_H_ |
| 33 | 33 | |
| 34 | #if defined (__arm__) || defined (__arm64__) | |
| 35 | ||
| 36 | 34 | #include <sys/cdefs.h> /* __DARWIN_UNIX03 */ |
| 37 | 35 | #include <machine/types.h> /* __uint32_t */ |
| 38 | 36 | |
| ... | ... | @@ -509,6 +507,25 @@ _STRUCT_ARM_NEON_STATE |
| 509 | 507 | |
| 510 | 508 | #endif /* __DARWIN_UNIX03 */ |
| 511 | 509 | |
| 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 */ | |
| 512 | 529 | |
| 513 | 530 | #define _STRUCT_ARM_PAGEIN_STATE struct __arm_pagein_state |
| 514 | 531 | _STRUCT_ARM_PAGEIN_STATE |
| ... | ... | @@ -625,6 +642,4 @@ _STRUCT_ARM_CPMU_STATE64 |
| 625 | 642 | }; |
| 626 | 643 | #endif /* !__DARWIN_UNIX03 */ |
| 627 | 644 | |
| 628 | #endif /* defined (__arm__) || defined (__arm64__) */ | |
| 629 | ||
| 630 | 645 | #endif /* _MACH_ARM__STRUCTS_H_ */ |
| \ No newline at end of file |
lib/libc/include/aarch64-macos.11-none/mach/arm/boolean.h-4| ... | ... | @@ -65,10 +65,6 @@ |
| 65 | 65 | #ifndef _MACH_ARM_BOOLEAN_H_ |
| 66 | 66 | #define _MACH_ARM_BOOLEAN_H_ |
| 67 | 67 | |
| 68 | #if defined (__arm__) || defined (__arm64__) | |
| 69 | ||
| 70 | 68 | typedef int boolean_t; |
| 71 | 69 | |
| 72 | #endif /* defined (__arm__) || defined (__arm64__) */ | |
| 73 | ||
| 74 | 70 | #endif /* _MACH_ARM_BOOLEAN_H_ */ |
| \ No newline at end of file |
lib/libc/include/aarch64-macos.11-none/mach/arm/exception.h-3| ... | ... | @@ -29,8 +29,6 @@ |
| 29 | 29 | #ifndef _MACH_ARM_EXCEPTION_H_ |
| 30 | 30 | #define _MACH_ARM_EXCEPTION_H_ |
| 31 | 31 | |
| 32 | #if defined (__arm__) || defined (__arm64__) | |
| 33 | ||
| 34 | 32 | #define EXC_TYPES_COUNT 14 /* incl. illegal exception 0 */ |
| 35 | 33 | |
| 36 | 34 | #define EXC_MASK_MACHINE 0 |
| ... | ... | @@ -77,6 +75,5 @@ |
| 77 | 75 | |
| 78 | 76 | #define EXC_ARM_BREAKPOINT 1 /* breakpoint trap */ |
| 79 | 77 | |
| 80 | #endif /* defined (__arm__) || defined (__arm64__) */ | |
| 81 | 78 | |
| 82 | 79 | #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,12 +67,8 @@ |
| 67 | 67 | #ifndef _MACH_ARM_KERN_RETURN_H_ |
| 68 | 68 | #define _MACH_ARM_KERN_RETURN_H_ |
| 69 | 69 | |
| 70 | #if defined (__arm__) || defined (__arm64__) | |
| 71 | ||
| 72 | 70 | #ifndef ASSEMBLER |
| 73 | 71 | typedef int kern_return_t; |
| 74 | 72 | #endif /* ASSEMBLER */ |
| 75 | 73 | |
| 76 | #endif /* defined (__arm__) || defined (__arm64__) */ | |
| 77 | ||
| 78 | 74 | #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,8 +29,6 @@ |
| 29 | 29 | #ifndef _MACH_ARM_PROCESSOR_INFO_H_ |
| 30 | 30 | #define _MACH_ARM_PROCESSOR_INFO_H_ |
| 31 | 31 | |
| 32 | #if defined (__arm__) || defined (__arm64__) | |
| 33 | ||
| 34 | 32 | #define PROCESSOR_CPU_STAT 0x10000003 /* Low-level CPU statistics */ |
| 35 | 33 | #define PROCESSOR_CPU_STAT64 0x10000004 /* Low-level CPU statistics, in full 64-bit */ |
| 36 | 34 | |
| ... | ... | @@ -71,6 +69,4 @@ typedef struct processor_cpu_stat64 *processor_cpu_stat64_t; |
| 71 | 69 | #define PROCESSOR_CPU_STAT64_COUNT ((mach_msg_type_number_t) \ |
| 72 | 70 | 	 (sizeof(processor_cpu_stat64_data_t) / sizeof(integer_t))) |
| 73 | 71 | |
| 74 | #endif /* defined (__arm__) || defined (__arm64__) */ | |
| 75 | ||
| 76 | 72 | #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,8 +32,4 @@ |
| 32 | 32 | #ifndef _MACH_ARM_RPC_H_ |
| 33 | 33 | #define _MACH_ARM_RPC_H_ |
| 34 | 34 | |
| 35 | #if defined (__arm__) || defined (__arm64__) | |
| 36 | ||
| 37 | #endif /* defined (__arm__) || defined (__arm64__) */ | |
| 38 | ||
| 39 | 35 | #endif /* _MACH_ARM_RPC_H_ */ |
| \ No newline at end of file |
lib/libc/include/aarch64-macos.11-none/mach/arm/thread_state.h+5-3| ... | ... | @@ -32,11 +32,13 @@ |
| 32 | 32 | #ifndef _MACH_ARM_THREAD_STATE_H_ |
| 33 | 33 | #define _MACH_ARM_THREAD_STATE_H_ |
| 34 | 34 | |
| 35 | #if defined (__arm__) || defined (__arm64__) | |
| 36 | ||
| 37 | 35 | /* Size of maximum exported thread state in words */ |
| 38 | 36 | #define ARM_THREAD_STATE_MAX (1296) /* Size of biggest state possible */ |
| 39 | 37 | |
| 40 | #endif /* defined (__arm__) || defined (__arm64__) */ | |
| 38 | #if defined (__arm__) || defined(__arm64__) | |
| 39 | #define THREAD_STATE_MAX ARM_THREAD_STATE_MAX | |
| 40 | #else | |
| 41 | #error Unsupported arch | |
| 42 | #endif | |
| 41 | 43 | |
| 42 | 44 | #endif /* _MACH_ARM_THREAD_STATE_H_ */ |
| \ No newline at end of file |
lib/libc/include/aarch64-macos.11-none/mach/arm/thread_status.h+23-9| ... | ... | @@ -33,12 +33,10 @@ |
| 33 | 33 | #ifndef _ARM_THREAD_STATUS_H_ |
| 34 | 34 | #define _ARM_THREAD_STATUS_H_ |
| 35 | 35 | |
| 36 | #if defined (__arm__) || defined (__arm64__) | |
| 37 | ||
| 38 | 36 | #include <mach/machine/_structs.h> |
| 39 | #include <mach/machine/thread_state.h> | |
| 40 | 37 | #include <mach/message.h> |
| 41 | 38 | #include <mach/vm_types.h> |
| 39 | #include <mach/arm/thread_state.h> | |
| 42 | 40 | |
| 43 | 41 | /* |
| 44 | 42 | * Support for determining the state of a thread |
| ... | ... | @@ -69,12 +67,13 @@ |
| 69 | 67 | #define ARM_CPMU_STATE64 18 |
| 70 | 68 | |
| 71 | 69 | |
| 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) | |
| 72 | 75 | #define ARM_PAGEIN_STATE 27 |
| 73 | 76 | |
| 74 | #ifndef ARM_STATE_FLAVOR_IS_OTHER_VALID | |
| 75 | #define ARM_STATE_FLAVOR_IS_OTHER_VALID(_flavor_) 0 | |
| 76 | #endif | |
| 77 | ||
| 78 | 77 | #define VALID_THREAD_STATE_FLAVOR(x) \ |
| 79 | 78 | 	((x == ARM_THREAD_STATE) || \ |
| 80 | 79 | 	 (x == ARM_VFP_STATE) || \ |
| ... | ... | @@ -171,6 +170,7 @@ typedef _STRUCT_ARM_NEON_STATE arm_neon_state_t; |
| 171 | 170 | typedef _STRUCT_ARM_NEON_STATE arm_neon_state32_t; |
| 172 | 171 | typedef _STRUCT_ARM_NEON_STATE64 arm_neon_state64_t; |
| 173 | 172 | |
| 173 | typedef _STRUCT_ARM_AMX_STATE_V1 arm_amx_state_v1_t; | |
| 174 | 174 | |
| 175 | 175 | typedef _STRUCT_ARM_EXCEPTION_STATE arm_exception_state_t; |
| 176 | 176 | typedef _STRUCT_ARM_EXCEPTION_STATE arm_exception_state32_t; |
| ... | ... | @@ -224,12 +224,26 @@ typedef _STRUCT_ARM_LEGACY_DEBUG_STATE arm_debug_state_t; |
| 224 | 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 | ||
| 227 | 243 | /* |
| 228 | 244 | * Largest state on this machine: |
| 229 | 245 | */ |
| 230 | 246 | #define THREAD_MACHINE_STATE_MAX THREAD_STATE_MAX |
| 231 | 247 | |
| 232 | 248 | |
| 233 | #endif /* defined (__arm__) || defined (__arm64__) */ | |
| 234 | ||
| 235 | 249 | #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,8 +36,6 @@ |
| 36 | 36 | #ifndef _MACH_ARM_VM_PARAM_H_ |
| 37 | 37 | #define _MACH_ARM_VM_PARAM_H_ |
| 38 | 38 | |
| 39 | #if defined (__arm__) || defined (__arm64__) | |
| 40 | ||
| 41 | 39 | |
| 42 | 40 | #if !defined (KERNEL) && !defined (__ASSEMBLER__) |
| 43 | 41 | #include <mach/vm_page_size.h> |
| ... | ... | @@ -106,6 +104,4 @@ |
| 106 | 104 | |
| 107 | 105 | #define SWI_SYSCALL 0x80 |
| 108 | 106 | |
| 109 | #endif /* defined (__arm__) || defined (__arm64__) */ | |
| 110 | ||
| 111 | 107 | #endif /* _MACH_ARM_VM_PARAM_H_ */ |
| \ No newline at end of file |
lib/libc/include/aarch64-macos.11-none/mach/arm/vm_types.h+10-15| ... | ... | @@ -67,14 +67,11 @@ |
| 67 | 67 | #ifndef _MACH_ARM_VM_TYPES_H_ |
| 68 | 68 | #define _MACH_ARM_VM_TYPES_H_ |
| 69 | 69 | |
| 70 | #if defined (__arm__) || defined (__arm64__) | |
| 71 | ||
| 72 | 70 | #ifndef ASSEMBLER |
| 73 | 71 | |
| 74 | 72 | #include <arm/_types.h> |
| 75 | 73 | #include <stdint.h> |
| 76 | 74 | #include <Availability.h> |
| 77 | #include <sys/cdefs.h> | |
| 78 | 75 | |
| 79 | 76 | /* |
| 80 | 77 | * natural_t and integer_t are Mach's legacy types for machine- |
| ... | ... | @@ -101,18 +98,18 @@ typedef int integer_t; |
| 101 | 98 | * e.g. an offset into a virtual memory space. |
| 102 | 99 | */ |
| 103 | 100 | #ifdef __LP64__ |
| 104 | typedef uintptr_t vm_offset_t __kernel_ptr_semantics; | |
| 101 | typedef uintptr_t vm_offset_t; | |
| 105 | 102 | typedef uintptr_t vm_size_t; |
| 106 | 103 | |
| 107 | typedef uint64_t mach_vm_address_t __kernel_ptr_semantics; | |
| 108 | typedef uint64_t mach_vm_offset_t __kernel_ptr_semantics; | |
| 104 | typedef uint64_t mach_vm_address_t; | |
| 105 | typedef uint64_t mach_vm_offset_t; | |
| 109 | 106 | typedef uint64_t mach_vm_size_t; |
| 110 | 107 | |
| 111 | typedef uint64_t vm_map_offset_t __kernel_ptr_semantics; | |
| 112 | typedef uint64_t vm_map_address_t __kernel_ptr_semantics; | |
| 108 | typedef uint64_t vm_map_offset_t; | |
| 109 | typedef uint64_t vm_map_address_t; | |
| 113 | 110 | typedef uint64_t vm_map_size_t; |
| 114 | 111 | #else |
| 115 | typedef natural_t vm_offset_t __kernel_ptr_semantics; | |
| 112 | typedef natural_t vm_offset_t; | |
| 116 | 113 | /* |
| 117 | 114 | * A vm_size_t is the proper type for e.g. |
| 118 | 115 | * expressing the difference between two |
| ... | ... | @@ -132,13 +129,13 @@ typedef uint32_t mach_vm_address_t; |
| 132 | 129 | typedef uint32_t mach_vm_offset_t; |
| 133 | 130 | typedef uint32_t mach_vm_size_t; |
| 134 | 131 | #else |
| 135 | typedef uint64_t mach_vm_address_t __kernel_ptr_semantics; | |
| 136 | typedef uint64_t mach_vm_offset_t __kernel_ptr_semantics; | |
| 132 | typedef uint64_t mach_vm_address_t; | |
| 133 | typedef uint64_t mach_vm_offset_t; | |
| 137 | 134 | typedef uint64_t mach_vm_size_t; |
| 138 | 135 | #endif |
| 139 | 136 | |
| 140 | typedef uint32_t vm_map_offset_t __kernel_ptr_semantics; | |
| 141 | typedef uint32_t vm_map_address_t __kernel_ptr_semantics; | |
| 137 | typedef uint32_t vm_map_offset_t; | |
| 138 | typedef uint32_t vm_map_address_t; | |
| 142 | 139 | typedef uint32_t vm_map_size_t; |
| 143 | 140 | #endif /* __LP64__ */ |
| 144 | 141 | |
| ... | ... | @@ -157,6 +154,4 @@ typedef vm_offset_t mach_port_context_t; |
| 157 | 154 | */ |
| 158 | 155 | #define MACH_MSG_TYPE_INTEGER_T MACH_MSG_TYPE_INTEGER_32 |
| 159 | 156 | |
| 160 | #endif /* defined (__arm__) || defined (__arm64__) */ | |
| 161 | ||
| 162 | 157 | #endif /* _MACH_ARM_VM_TYPES_H_ */ |
| \ No newline at end of file |
lib/libc/include/any-macos-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-any/db.h created+219| ... | ... | @@ -0,0 +1,219 @@ |
| 1 | /*- | |
| 2 | * Copyright (c) 1990, 1993, 1994 | |
| 3 | *	The Regents of the University of California. All rights reserved. | |
| 4 | * | |
| 5 | * Redistribution and use in source and binary forms, with or without | |
| 6 | * modification, are permitted provided that the following conditions | |
| 7 | * are met: | |
| 8 | * 1. Redistributions of source code must retain the above copyright | |
| 9 | * notice, this list of conditions and the following disclaimer. | |
| 10 | * 2. Redistributions in binary form must reproduce the above copyright | |
| 11 | * notice, this list of conditions and the following disclaimer in the | |
| 12 | * documentation and/or other materials provided with the distribution. | |
| 13 | * 3. All advertising materials mentioning features or use of this software | |
| 14 | * must display the following acknowledgement: | |
| 15 | *	This product includes software developed by the University of | |
| 16 | *	California, Berkeley and its contributors. | |
| 17 | * 4. Neither the name of the University nor the names of its contributors | |
| 18 | * may be used to endorse or promote products derived from this software | |
| 19 | * without specific prior written permission. | |
| 20 | * | |
| 21 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | |
| 22 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |
| 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | |
| 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | |
| 25 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
| 26 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
| 27 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
| 28 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
| 29 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
| 30 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
| 31 | * SUCH DAMAGE. | |
| 32 | * | |
| 33 | *	@(#)db.h	8.7 (Berkeley) 6/16/94 | |
| 34 | * $FreeBSD: src/include/db.h,v 1.5 2002/03/26 01:35:05 bde Exp $ | |
| 35 | */ | |
| 36 | ||
| 37 | #ifndef _DB_H_ | |
| 38 | #define	_DB_H_ | |
| 39 | ||
| 40 | #include <sys/types.h> | |
| 41 | #include <sys/cdefs.h> | |
| 42 | ||
| 43 | #include <limits.h> | |
| 44 | ||
| 45 | #define	RET_ERROR	-1		/* Return values. */ | |
| 46 | #define	RET_SUCCESS	 0 | |
| 47 | #define	RET_SPECIAL	 1 | |
| 48 | ||
| 49 | #define	MAX_PAGE_NUMBER	0xffffffff	/* >= # of pages in a file */ | |
| 50 | typedef u_int32_t	pgno_t; | |
| 51 | #define	MAX_PAGE_OFFSET	65535		/* >= # of bytes in a page */ | |
| 52 | typedef u_int16_t	indx_t; | |
| 53 | #define	MAX_REC_NUMBER	0xffffffff	/* >= # of records in a tree */ | |
| 54 | typedef u_int32_t	recno_t; | |
| 55 | ||
| 56 | /* Key/data structure -- a Data-Base Thang. */ | |
| 57 | typedef struct { | |
| 58 | 	void	*data;			/* data */ | |
| 59 | 	size_t	 size;			/* data length */ | |
| 60 | } DBT; | |
| 61 | ||
| 62 | /* Routine flags. */ | |
| 63 | #define	R_CURSOR	1		/* del, put, seq */ | |
| 64 | #define	__R_UNUSED	2		/* UNUSED */ | |
| 65 | #define	R_FIRST		3		/* seq */ | |
| 66 | #define	R_IAFTER	4		/* put (RECNO) */ | |
| 67 | #define	R_IBEFORE	5		/* put (RECNO) */ | |
| 68 | #define	R_LAST		6		/* seq (BTREE, RECNO) */ | |
| 69 | #define	R_NEXT		7		/* seq */ | |
| 70 | #define	R_NOOVERWRITE	8		/* put */ | |
| 71 | #define	R_PREV		9		/* seq (BTREE, RECNO) */ | |
| 72 | #define	R_SETCURSOR	10		/* put (RECNO) */ | |
| 73 | #define	R_RECNOSYNC	11		/* sync (RECNO) */ | |
| 74 | ||
| 75 | typedef enum { DB_BTREE, DB_HASH, DB_RECNO } DBTYPE; | |
| 76 | ||
| 77 | /* | |
| 78 | * !!! | |
| 79 | * The following flags are included in the dbopen(3) call as part of the | |
| 80 | * open(2) flags. In order to avoid conflicts with the open flags, start | |
| 81 | * at the top of the 16 or 32-bit number space and work our way down. If | |
| 82 | * the open flags were significantly expanded in the future, it could be | |
| 83 | * a problem. Wish I'd left another flags word in the dbopen call. | |
| 84 | * | |
| 85 | * !!! | |
| 86 | * None of this stuff is implemented yet. The only reason that it's here | |
| 87 | * is so that the access methods can skip copying the key/data pair when | |
| 88 | * the DB_LOCK flag isn't set. | |
| 89 | */ | |
| 90 | #if UINT_MAX > 65535 | |
| 91 | #define	DB_LOCK		0x20000000	/* Do locking. */ | |
| 92 | #define	DB_SHMEM	0x40000000	/* Use shared memory. */ | |
| 93 | #define	DB_TXN		0x80000000	/* Do transactions. */ | |
| 94 | #else | |
| 95 | #define	DB_LOCK		 0x2000	/* Do locking. */ | |
| 96 | #define	DB_SHMEM	 0x4000	/* Use shared memory. */ | |
| 97 | #define	DB_TXN		 0x8000	/* Do transactions. */ | |
| 98 | #endif | |
| 99 | ||
| 100 | /* Access method description structure. */ | |
| 101 | typedef struct __db { | |
| 102 | 	DBTYPE type;			/* Underlying db type. */ | |
| 103 | 	int (*close)(struct __db *); | |
| 104 | 	int (*del)(const struct __db *, const DBT *, unsigned int); | |
| 105 | 	int (*get)(const struct __db *, const DBT *, DBT *, unsigned int); | |
| 106 | 	int (*put)(const struct __db *, DBT *, const DBT *, unsigned int); | |
| 107 | 	int (*seq)(const struct __db *, DBT *, DBT *, unsigned int); | |
| 108 | 	int (*sync)(const struct __db *, unsigned int); | |
| 109 | 	void *internal;			/* Access method private. */ | |
| 110 | 	int (*fd)(const struct __db *); | |
| 111 | } DB; | |
| 112 | ||
| 113 | #define	BTREEMAGIC	0x053162 | |
| 114 | #define	BTREEVERSION	3 | |
| 115 | ||
| 116 | /* Structure used to pass parameters to the btree routines. */ | |
| 117 | typedef struct { | |
| 118 | #define	R_DUP		0x01	/* duplicate keys */ | |
| 119 | 	unsigned long	flags; | |
| 120 | 	unsigned int	cachesize;	/* bytes to cache */ | |
| 121 | 	int		maxkeypage;	/* maximum keys per page */ | |
| 122 | 	int		minkeypage;	/* minimum keys per page */ | |
| 123 | 	unsigned int	psize;		/* page size */ | |
| 124 | 	int		(*compare)	/* comparison function */ | |
| 125 | 			(const DBT *, const DBT *); | |
| 126 | 	size_t		(*prefix)	/* prefix function */ | |
| 127 | 	 		(const DBT *, const DBT *); | |
| 128 | 	int		lorder;		/* byte order */ | |
| 129 | } BTREEINFO; | |
| 130 | ||
| 131 | #define	HASHMAGIC	0x061561 | |
| 132 | #define	HASHVERSION	2 | |
| 133 | ||
| 134 | /* Structure used to pass parameters to the hashing routines. */ | |
| 135 | typedef struct { | |
| 136 | 	unsigned int	bsize;		/* bucket size */ | |
| 137 | 	unsigned int	ffactor;	/* fill factor */ | |
| 138 | 	unsigned int	nelem;		/* number of elements */ | |
| 139 | 	unsigned int	cachesize;	/* bytes to cache */ | |
| 140 | 	u_int32_t		/* hash function */ | |
| 141 | 		(*hash)(const void *, size_t); | |
| 142 | 	int	lorder;		/* byte order */ | |
| 143 | } HASHINFO; | |
| 144 | ||
| 145 | /* Structure used to pass parameters to the record routines. */ | |
| 146 | typedef struct { | |
| 147 | #define	R_FIXEDLEN	0x01	/* fixed-length records */ | |
| 148 | #define	R_NOKEY		0x02	/* key not required */ | |
| 149 | #define	R_SNAPSHOT	0x04	/* snapshot the input */ | |
| 150 | 	unsigned long	flags; | |
| 151 | 	unsigned int	cachesize;	/* bytes to cache */ | |
| 152 | 	unsigned int	psize;		/* page size */ | |
| 153 | 	int		lorder;		/* byte order */ | |
| 154 | 	size_t		reclen;		/* record length (fixed-length records) */ | |
| 155 | 	unsigned char	bval;		/* delimiting byte (variable-length records */ | |
| 156 | 	char	*bfname;	/* btree file name */ | |
| 157 | } RECNOINFO; | |
| 158 | ||
| 159 | #ifdef __DBINTERFACE_PRIVATE | |
| 160 | /* | |
| 161 | * Little endian <==> big endian 32-bit swap macros. | |
| 162 | *	M_32_SWAP	swap a memory location | |
| 163 | *	P_32_SWAP	swap a referenced memory location | |
| 164 | *	P_32_COPY	swap from one location to another | |
| 165 | */ | |
| 166 | #define	M_32_SWAP(a) {							\ | |
| 167 | 	u_int32_t _tmp = a;						\ | |
| 168 | 	((char *)&a)[0] = ((char *)&_tmp)[3];				\ | |
| 169 | 	((char *)&a)[1] = ((char *)&_tmp)[2];				\ | |
| 170 | 	((char *)&a)[2] = ((char *)&_tmp)[1];				\ | |
| 171 | 	((char *)&a)[3] = ((char *)&_tmp)[0];				\ | |
| 172 | } | |
| 173 | #define	P_32_SWAP(a) {							\ | |
| 174 | 	u_int32_t _tmp = *(u_int32_t *)a;				\ | |
| 175 | 	((char *)a)[0] = ((char *)&_tmp)[3];				\ | |
| 176 | 	((char *)a)[1] = ((char *)&_tmp)[2];				\ | |
| 177 | 	((char *)a)[2] = ((char *)&_tmp)[1];				\ | |
| 178 | 	((char *)a)[3] = ((char *)&_tmp)[0];				\ | |
| 179 | } | |
| 180 | #define	P_32_COPY(a, b) {						\ | |
| 181 | 	((char *)&(b))[0] = ((char *)&(a))[3];				\ | |
| 182 | 	((char *)&(b))[1] = ((char *)&(a))[2];				\ | |
| 183 | 	((char *)&(b))[2] = ((char *)&(a))[1];				\ | |
| 184 | 	((char *)&(b))[3] = ((char *)&(a))[0];				\ | |
| 185 | } | |
| 186 | ||
| 187 | /* | |
| 188 | * Little endian <==> big endian 16-bit swap macros. | |
| 189 | *	M_16_SWAP	swap a memory location | |
| 190 | *	P_16_SWAP	swap a referenced memory location | |
| 191 | *	P_16_COPY	swap from one location to another | |
| 192 | */ | |
| 193 | #define	M_16_SWAP(a) {							\ | |
| 194 | 	u_int16_t _tmp = a;						\ | |
| 195 | 	((char *)&a)[0] = ((char *)&_tmp)[1];				\ | |
| 196 | 	((char *)&a)[1] = ((char *)&_tmp)[0];				\ | |
| 197 | } | |
| 198 | #define	P_16_SWAP(a) {							\ | |
| 199 | 	u_int16_t _tmp = *(u_int16_t *)a;				\ | |
| 200 | 	((char *)a)[0] = ((char *)&_tmp)[1];				\ | |
| 201 | 	((char *)a)[1] = ((char *)&_tmp)[0];				\ | |
| 202 | } | |
| 203 | #define	P_16_COPY(a, b) {						\ | |
| 204 | 	((char *)&(b))[0] = ((char *)&(a))[1];				\ | |
| 205 | 	((char *)&(b))[1] = ((char *)&(a))[0];				\ | |
| 206 | } | |
| 207 | #endif | |
| 208 | ||
| 209 | __BEGIN_DECLS | |
| 210 | DB *dbopen(const char *, int, int, DBTYPE, const void *); | |
| 211 | ||
| 212 | #ifdef __DBINTERFACE_PRIVATE | |
| 213 | DB	*__bt_open(const char *, int, int, const BTREEINFO *, int); | |
| 214 | DB	*__hash_open(const char *, int, int, const HASHINFO *, int); | |
| 215 | DB	*__rec_open(const char *, int, int, const RECNOINFO *, int); | |
| 216 | void	 __dbpanic(DB *dbp); | |
| 217 | #endif | |
| 218 | __END_DECLS | |
| 219 | #endif /* !_DB_H_ */ | |
| \ No newline at end of file |
lib/libc/include/any-macos-any/dispatch/base.h deleted-333| ... | ... | @@ -1,333 +0,0 @@ |
| 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 | #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 | ||
| 157 | #define DISPATCH_LINUX_UNAVAILABLE() | |
| 158 | ||
| 159 | #ifdef __FreeBSD__ | |
| 160 | #define DISPATCH_FREEBSD_UNAVAILABLE() \ | |
| 161 | 		DISPATCH_UNAVAILABLE_MSG( \ | |
| 162 | 		"This interface is unavailable on FreeBSD systems") | |
| 163 | #else | |
| 164 | #define DISPATCH_FREEBSD_UNAVAILABLE() | |
| 165 | #endif | |
| 166 | ||
| 167 | #ifndef DISPATCH_ALIAS_V2 | |
| 168 | #if TARGET_OS_MAC | |
| 169 | #define DISPATCH_ALIAS_V2(sym)	 __asm__("_" #sym "$V2") | |
| 170 | #else | |
| 171 | #define DISPATCH_ALIAS_V2(sym) | |
| 172 | #endif | |
| 173 | #endif | |
| 174 | ||
| 175 | #if defined(_WIN32) | |
| 176 | #if defined(__cplusplus) | |
| 177 | #define DISPATCH_EXPORT extern "C" __declspec(dllimport) | |
| 178 | #else | |
| 179 | #define DISPATCH_EXPORT extern __declspec(dllimport) | |
| 180 | #endif | |
| 181 | #elif __GNUC__ | |
| 182 | #define DISPATCH_EXPORT extern __attribute__((visibility("default"))) | |
| 183 | #else | |
| 184 | #define DISPATCH_EXPORT extern | |
| 185 | #endif | |
| 186 | ||
| 187 | #if __GNUC__ | |
| 188 | #define DISPATCH_INLINE static __inline__ | |
| 189 | #else | |
| 190 | #define DISPATCH_INLINE static inline | |
| 191 | #endif | |
| 192 | ||
| 193 | #if __GNUC__ | |
| 194 | #define DISPATCH_EXPECT(x, v) __builtin_expect((x), (v)) | |
| 195 | #define dispatch_compiler_barrier() __asm__ __volatile__("" ::: "memory") | |
| 196 | #else | |
| 197 | #define DISPATCH_EXPECT(x, v) (x) | |
| 198 | #define dispatch_compiler_barrier() do { } while (0) | |
| 199 | #endif | |
| 200 | ||
| 201 | #if __has_attribute(not_tail_called) | |
| 202 | #define DISPATCH_NOT_TAIL_CALLED __attribute__((__not_tail_called__)) | |
| 203 | #else | |
| 204 | #define DISPATCH_NOT_TAIL_CALLED | |
| 205 | #endif | |
| 206 | ||
| 207 | #if __has_builtin(__builtin_assume) | |
| 208 | #define DISPATCH_COMPILER_CAN_ASSUME(expr) __builtin_assume(expr) | |
| 209 | #else | |
| 210 | #define DISPATCH_COMPILER_CAN_ASSUME(expr) ((void)(expr)) | |
| 211 | #endif | |
| 212 | ||
| 213 | #if __has_attribute(noescape) | |
| 214 | #define DISPATCH_NOESCAPE __attribute__((__noescape__)) | |
| 215 | #else | |
| 216 | #define DISPATCH_NOESCAPE | |
| 217 | #endif | |
| 218 | ||
| 219 | #if __has_attribute(cold) | |
| 220 | #define DISPATCH_COLD __attribute__((__cold__)) | |
| 221 | #else | |
| 222 | #define DISPATCH_COLD | |
| 223 | #endif | |
| 224 | ||
| 225 | #if __has_feature(assume_nonnull) | |
| 226 | #define DISPATCH_ASSUME_NONNULL_BEGIN _Pragma("clang assume_nonnull begin") | |
| 227 | #define DISPATCH_ASSUME_NONNULL_END _Pragma("clang assume_nonnull end") | |
| 228 | #else | |
| 229 | #define DISPATCH_ASSUME_NONNULL_BEGIN | |
| 230 | #define DISPATCH_ASSUME_NONNULL_END | |
| 231 | #endif | |
| 232 | ||
| 233 | #if !__has_feature(nullability) | |
| 234 | #ifndef _Nullable | |
| 235 | #define _Nullable | |
| 236 | #endif | |
| 237 | #ifndef _Nonnull | |
| 238 | #define _Nonnull | |
| 239 | #endif | |
| 240 | #ifndef _Null_unspecified | |
| 241 | #define _Null_unspecified | |
| 242 | #endif | |
| 243 | #endif | |
| 244 | ||
| 245 | #ifndef DISPATCH_RETURNS_RETAINED_BLOCK | |
| 246 | #if __has_attribute(ns_returns_retained) | |
| 247 | #define DISPATCH_RETURNS_RETAINED_BLOCK __attribute__((__ns_returns_retained__)) | |
| 248 | #else | |
| 249 | #define DISPATCH_RETURNS_RETAINED_BLOCK | |
| 250 | #endif | |
| 251 | #endif | |
| 252 | ||
| 253 | #if __has_attribute(enum_extensibility) | |
| 254 | #define __DISPATCH_ENUM_ATTR __attribute__((__enum_extensibility__(open))) | |
| 255 | #define __DISPATCH_ENUM_ATTR_CLOSED __attribute__((__enum_extensibility__(closed))) | |
| 256 | #else | |
| 257 | #define __DISPATCH_ENUM_ATTR | |
| 258 | #define __DISPATCH_ENUM_ATTR_CLOSED | |
| 259 | #endif // __has_attribute(enum_extensibility) | |
| 260 | ||
| 261 | #if __has_attribute(flag_enum) | |
| 262 | #define __DISPATCH_OPTIONS_ATTR __attribute__((__flag_enum__)) | |
| 263 | #else | |
| 264 | #define __DISPATCH_OPTIONS_ATTR | |
| 265 | #endif // __has_attribute(flag_enum) | |
| 266 | ||
| 267 | ||
| 268 | #if __has_feature(objc_fixed_enum) || __has_extension(cxx_strong_enums) || \ | |
| 269 | 		__has_extension(cxx_fixed_enum) || defined(_WIN32) | |
| 270 | #define DISPATCH_ENUM(name, type, ...) \ | |
| 271 | 		typedef enum : type { __VA_ARGS__ } __DISPATCH_ENUM_ATTR name##_t | |
| 272 | #define DISPATCH_OPTIONS(name, type, ...) \ | |
| 273 | 		typedef enum : type { __VA_ARGS__ } __DISPATCH_OPTIONS_ATTR __DISPATCH_ENUM_ATTR name##_t | |
| 274 | #else | |
| 275 | #define DISPATCH_ENUM(name, type, ...) \ | |
| 276 | 		enum { __VA_ARGS__ } __DISPATCH_ENUM_ATTR; typedef type name##_t | |
| 277 | #define DISPATCH_OPTIONS(name, type, ...) \ | |
| 278 | 		enum { __VA_ARGS__ } __DISPATCH_OPTIONS_ATTR __DISPATCH_ENUM_ATTR; typedef type name##_t | |
| 279 | #endif // __has_feature(objc_fixed_enum) ... | |
| 280 | ||
| 281 | ||
| 282 | ||
| 283 | #if __has_feature(enumerator_attributes) | |
| 284 | #define DISPATCH_ENUM_API_AVAILABLE(...) API_AVAILABLE(__VA_ARGS__) | |
| 285 | #define DISPATCH_ENUM_API_DEPRECATED(...) API_DEPRECATED(__VA_ARGS__) | |
| 286 | #define DISPATCH_ENUM_API_DEPRECATED_WITH_REPLACEMENT(...) \ | |
| 287 | 		API_DEPRECATED_WITH_REPLACEMENT(__VA_ARGS__) | |
| 288 | #else | |
| 289 | #define DISPATCH_ENUM_API_AVAILABLE(...) | |
| 290 | #define DISPATCH_ENUM_API_DEPRECATED(...) | |
| 291 | #define DISPATCH_ENUM_API_DEPRECATED_WITH_REPLACEMENT(...) | |
| 292 | #endif | |
| 293 | ||
| 294 | #ifdef __swift__ | |
| 295 | #define DISPATCH_SWIFT3_OVERLAY 1 | |
| 296 | #else // __swift__ | |
| 297 | #define DISPATCH_SWIFT3_OVERLAY 0 | |
| 298 | #endif // __swift__ | |
| 299 | ||
| 300 | #if __has_feature(attribute_availability_swift) | |
| 301 | #define DISPATCH_SWIFT_UNAVAILABLE(_msg) \ | |
| 302 | 		__attribute__((__availability__(swift, unavailable, message=_msg))) | |
| 303 | #else | |
| 304 | #define DISPATCH_SWIFT_UNAVAILABLE(_msg) | |
| 305 | #endif | |
| 306 | ||
| 307 | #if DISPATCH_SWIFT3_OVERLAY | |
| 308 | #define DISPATCH_SWIFT3_UNAVAILABLE(_msg) DISPATCH_SWIFT_UNAVAILABLE(_msg) | |
| 309 | #else | |
| 310 | #define DISPATCH_SWIFT3_UNAVAILABLE(_msg) | |
| 311 | #endif | |
| 312 | ||
| 313 | #if __has_attribute(swift_private) | |
| 314 | #define DISPATCH_REFINED_FOR_SWIFT __attribute__((__swift_private__)) | |
| 315 | #else | |
| 316 | #define DISPATCH_REFINED_FOR_SWIFT | |
| 317 | #endif | |
| 318 | ||
| 319 | #if __has_attribute(swift_name) | |
| 320 | #define DISPATCH_SWIFT_NAME(_name) __attribute__((__swift_name__(#_name))) | |
| 321 | #else | |
| 322 | #define DISPATCH_SWIFT_NAME(_name) | |
| 323 | #endif | |
| 324 | ||
| 325 | #ifndef __cplusplus | |
| 326 | #define DISPATCH_TRANSPARENT_UNION __attribute__((__transparent_union__)) | |
| 327 | #else | |
| 328 | #define DISPATCH_TRANSPARENT_UNION | |
| 329 | #endif | |
| 330 | ||
| 331 | typedef void (*dispatch_function_t)(void *_Nullable); | |
| 332 | ||
| 333 | #endif | |
| \ No newline at end of file |
lib/libc/include/any-macos-any/err.h created+93| ... | ... | @@ -0,0 +1,93 @@ |
| 1 | /* | |
| 2 | * Copyright (c) 2000, 2003, 2004, 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) 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 | *	@(#)err.h	8.1 (Berkeley) 6/2/93 | |
| 56 | */ | |
| 57 | ||
| 58 | #ifndef _ERR_H_ | |
| 59 | #define	_ERR_H_ | |
| 60 | ||
| 61 | /* | |
| 62 | * Don't use va_list in the err/warn prototypes. Va_list is typedef'd in two | |
| 63 | * places (<machine/varargs.h> and <machine/stdarg.h>), so if we include one | |
| 64 | * of them here we may collide with the utility's includes. It's unreasonable | |
| 65 | * for utilities to have to include one of them to include err.h, so we get | |
| 66 | * __darwin_va_list from <machine/_type.h> and use it. | |
| 67 | */ | |
| 68 | #include <sys/cdefs.h> | |
| 69 | #include <_types.h> | |
| 70 | #include <Availability.h> | |
| 71 | ||
| 72 | __BEGIN_DECLS | |
| 73 | void	err(int, const char *, ...) __cold __dead2 __printflike(2, 3); | |
| 74 | void	verr(int, const char *, __darwin_va_list) __cold __dead2 __printflike(2, 0); | |
| 75 | void	errc(int, int, const char *, ...) __cold __dead2 __printflike(3, 4); | |
| 76 | void	verrc(int, int, const char *, __darwin_va_list) __cold __dead2 __printflike(3, 0); | |
| 77 | void	errx(int, const char *, ...) __cold __dead2 __printflike(2, 3); | |
| 78 | void	verrx(int, const char *, __darwin_va_list) __cold __dead2 __printflike(2, 0); | |
| 79 | void	warn(const char *, ...) __cold __printflike(1, 2); | |
| 80 | void	vwarn(const char *, __darwin_va_list) __cold __printflike(1, 0); | |
| 81 | void	warnc(int, const char *, ...) __cold __printflike(2, 3); | |
| 82 | void	vwarnc(int, const char *, __darwin_va_list) __cold __printflike(2, 0); | |
| 83 | void	warnx(const char *, ...) __cold __printflike(1, 2); | |
| 84 | void	vwarnx(const char *, __darwin_va_list) __cold __printflike(1, 0); | |
| 85 | void	err_set_file(void *); | |
| 86 | void	err_set_exit(void (* _Nullable)(int)); | |
| 87 | #ifdef __BLOCKS__ | |
| 88 | void	err_set_exit_b(void (^ _Nullable)(int)) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2); | |
| 89 | #endif /* __BLOCKS__ */ | |
| 90 | ||
| 91 | __END_DECLS | |
| 92 | ||
| 93 | #endif /* !_ERR_H_ */ | |
| \ No newline at end of file |
lib/libc/include/any-macos-any/fts.h created+190| ... | ... | @@ -0,0 +1,190 @@ |
| 1 | /* | |
| 2 | * Copyright (c) 2000, 2003-2006, 2008, 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) 1989, 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 | *	@(#)fts.h	8.3 (Berkeley) 8/14/94 | |
| 56 | */ | |
| 57 | ||
| 58 | #ifndef	_FTS_H_ | |
| 59 | #define	_FTS_H_ | |
| 60 | ||
| 61 | #include <sys/_types.h> | |
| 62 | #include <sys/_types/_dev_t.h> | |
| 63 | #include <sys/_types/_ino_t.h> | |
| 64 | #include <sys/_types/_nlink_t.h> | |
| 65 | ||
| 66 | #include <Availability.h> | |
| 67 | ||
| 68 | #pragma clang diagnostic push | |
| 69 | #pragma clang diagnostic ignored "-Wstrict-prototypes" | |
| 70 | ||
| 71 | typedef struct { | |
| 72 | 	struct _ftsent *fts_cur;	/* current node */ | |
| 73 | 	struct _ftsent *fts_child;	/* linked list of children */ | |
| 74 | 	struct _ftsent **fts_array;	/* sort array */ | |
| 75 | 	dev_t fts_dev;			/* starting device # */ | |
| 76 | 	char *fts_path;			/* path for this descent */ | |
| 77 | 	int fts_rfd;			/* fd for root */ | |
| 78 | 	int fts_pathlen;		/* sizeof(path) */ | |
| 79 | 	int fts_nitems;			/* elements in the sort array */ | |
| 80 | #ifdef __BLOCKS__ | |
| 81 | 	union { | |
| 82 | #endif /* __BLOCKS__ */ | |
| 83 | 	 int (*fts_compar)();	/* compare function */ | |
| 84 | #ifdef __BLOCKS__ | |
| 85 | 	 int (^fts_compar_b)();	/* compare block */ | |
| 86 | 	}; | |
| 87 | #endif /* __BLOCKS__ */ | |
| 88 | ||
| 89 | #define	FTS_COMFOLLOW	0x001		/* follow command line symlinks */ | |
| 90 | #define	FTS_LOGICAL	0x002		/* logical walk */ | |
| 91 | #define	FTS_NOCHDIR	0x004		/* don't change directories */ | |
| 92 | #define	FTS_NOSTAT	0x008		/* don't get stat info */ | |
| 93 | #define	FTS_PHYSICAL	0x010		/* physical walk */ | |
| 94 | #define	FTS_SEEDOT	0x020		/* return dot and dot-dot */ | |
| 95 | #define	FTS_XDEV	0x040		/* don't cross devices */ | |
| 96 | #define	FTS_WHITEOUT	0x080		/* (no longer supported) return whiteout information */ | |
| 97 | #define	FTS_COMFOLLOWDIR 0x400		/* (non-std) follow command line symlinks for directories only */ | |
| 98 | #if (defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED < 1090) || (defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED < 70000) | |
| 99 | #define	FTS_OPTIONMASK	0x4ff		/* valid user option mask */ | |
| 100 | #else | |
| 101 | #define	FTS_NOSTAT_TYPE	0x800		/* (non-std) no stat, but use d_type in struct dirent when available */ | |
| 102 | #define	FTS_OPTIONMASK	0xcff		/* valid user option mask */ | |
| 103 | #endif | |
| 104 | ||
| 105 | #define	FTS_NAMEONLY	0x100		/* (private) child names only */ | |
| 106 | #define	FTS_STOP	0x200		/* (private) unrecoverable error */ | |
| 107 | #ifdef __BLOCKS__ | |
| 108 | #define	FTS_BLOCK_COMPAR 0x80000000	/* fts_compar is a block */ | |
| 109 | #endif /* __BLOCKS__ */ | |
| 110 | 	int fts_options;		/* fts_open options, global flags */ | |
| 111 | } FTS; | |
| 112 | ||
| 113 | typedef struct _ftsent { | |
| 114 | 	struct _ftsent *fts_cycle;	/* cycle node */ | |
| 115 | 	struct _ftsent *fts_parent;	/* parent directory */ | |
| 116 | 	struct _ftsent *fts_link;	/* next file in directory */ | |
| 117 | 	long fts_number;	 /* local numeric value */ | |
| 118 | 	void *fts_pointer;	 /* local address value */ | |
| 119 | 	char *fts_accpath;		/* access path */ | |
| 120 | 	char *fts_path;			/* root path */ | |
| 121 | 	int fts_errno;			/* errno for this node */ | |
| 122 | 	int fts_symfd;			/* fd for symlink or chdir */ | |
| 123 | 	unsigned short fts_pathlen;	/* strlen(fts_path) */ | |
| 124 | 	unsigned short fts_namelen;	/* strlen(fts_name) */ | |
| 125 | ||
| 126 | 	ino_t fts_ino;			/* inode */ | |
| 127 | 	dev_t fts_dev;			/* device */ | |
| 128 | 	nlink_t fts_nlink;		/* link count */ | |
| 129 | ||
| 130 | #define	FTS_ROOTPARENTLEVEL	-1 | |
| 131 | #define	FTS_ROOTLEVEL		 0 | |
| 132 | #define	FTS_MAXLEVEL		 0x7fffffff | |
| 133 | 	short fts_level;		/* depth (-1 to N) */ | |
| 134 | ||
| 135 | #define	FTS_D		 1		/* preorder directory */ | |
| 136 | #define	FTS_DC		 2		/* directory that causes cycles */ | |
| 137 | #define	FTS_DEFAULT	 3		/* none of the above */ | |
| 138 | #define	FTS_DNR		 4		/* unreadable directory */ | |
| 139 | #define	FTS_DOT		 5		/* dot or dot-dot */ | |
| 140 | #define	FTS_DP		 6		/* postorder directory */ | |
| 141 | #define	FTS_ERR		 7		/* error; errno is set */ | |
| 142 | #define	FTS_F		 8		/* regular file */ | |
| 143 | #define	FTS_INIT	 9		/* initialized only */ | |
| 144 | #define	FTS_NS		10		/* stat(2) failed */ | |
| 145 | #define	FTS_NSOK	11		/* no stat(2) requested */ | |
| 146 | #define	FTS_SL		12		/* symbolic link */ | |
| 147 | #define	FTS_SLNONE	13		/* symbolic link without target */ | |
| 148 | #define	FTS_W		14		/* whiteout object */ | |
| 149 | 	unsigned short fts_info;	/* user flags for FTSENT structure */ | |
| 150 | ||
| 151 | #define	FTS_DONTCHDIR	 0x01		/* don't chdir .. to the parent */ | |
| 152 | #define	FTS_SYMFOLLOW	 0x02		/* followed a symlink to get here */ | |
| 153 | #define	FTS_ISW		 0x04		/* this is a whiteout object */ | |
| 154 | #define	FTS_CHDIRFD 0x08 /* indicates the fts_symfd field was set for chdir */ | |
| 155 | 	unsigned short fts_flags;	/* private flags for FTSENT structure */ | |
| 156 | ||
| 157 | #define	FTS_AGAIN	 1		/* read node again */ | |
| 158 | #define	FTS_FOLLOW	 2		/* follow symbolic link */ | |
| 159 | #define	FTS_NOINSTR	 3		/* no instructions */ | |
| 160 | #define	FTS_SKIP	 4		/* discard node */ | |
| 161 | 	unsigned short fts_instr;	/* fts_set() instructions */ | |
| 162 | ||
| 163 | 	struct stat *fts_statp;		/* stat(2) information */ | |
| 164 | 	char fts_name[1];		/* file name */ | |
| 165 | } FTSENT; | |
| 166 | ||
| 167 | #include <sys/cdefs.h> | |
| 168 | #include <Availability.h> | |
| 169 | ||
| 170 | __BEGIN_DECLS | |
| 171 | FTSENT	*fts_children(FTS *, int) __DARWIN_INODE64(fts_children); | |
| 172 | int	 fts_close(FTS *) __DARWIN_INODE64(fts_close); | |
| 173 | FTS	*fts_open(char * const *, int, | |
| 174 | 	 int (*)(const FTSENT **, const FTSENT **)) __DARWIN_INODE64(fts_open); | |
| 175 | #ifdef __BLOCKS__ | |
| 176 | #if __has_attribute(noescape) | |
| 177 | #define __fts_noescape __attribute__((__noescape__)) | |
| 178 | #else | |
| 179 | #define __fts_noescape | |
| 180 | #endif | |
| 181 | FTS	*fts_open_b(char * const *, int, | |
| 182 | 	 int (^)(const FTSENT **, const FTSENT **) __fts_noescape) | |
| 183 | 	 __DARWIN_INODE64(fts_open_b) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2); | |
| 184 | #endif /* __BLOCKS__ */ | |
| 185 | FTSENT	*fts_read(FTS *) __DARWIN_INODE64(fts_read); | |
| 186 | int	 fts_set(FTS *, FTSENT *, int) __DARWIN_INODE64(fts_set); | |
| 187 | __END_DECLS | |
| 188 | ||
| 189 | #pragma clang diagnostic pop | |
| 190 | #endif /* !_FTS_H_ */ | |
| \ No newline at end of file |
lib/libc/include/any-macos-any/iso646.h created+52| ... | ... | @@ -0,0 +1,52 @@ |
| 1 | /*- | |
| 2 | * Copyright (c) 1998 Alex Nash | |
| 3 | * All rights reserved. | |
| 4 | * | |
| 5 | * Redistribution and use in source and binary forms, with or without | |
| 6 | * modification, are permitted provided that the following conditions | |
| 7 | * are met: | |
| 8 | * 1. Redistributions of source code must retain the above copyright | |
| 9 | * notice, this list of conditions and the following disclaimer. | |
| 10 | * 2. Redistributions in binary form must reproduce the above copyright | |
| 11 | * notice, this list of conditions and the following disclaimer in the | |
| 12 | * documentation and/or other materials provided with the distribution. | |
| 13 | * | |
| 14 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND | |
| 15 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |
| 16 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | |
| 17 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | |
| 18 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
| 19 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
| 20 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
| 21 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
| 22 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
| 23 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
| 24 | * SUCH DAMAGE. | |
| 25 | * | |
| 26 | * $FreeBSD: src/include/iso646.h,v 1.4 2002/09/18 22:23:59 mike Exp $ | |
| 27 | */ | |
| 28 | ||
| 29 | #ifndef _ISO646_H_ | |
| 30 | #define	_ISO646_H_ | |
| 31 | ||
| 32 | #include <sys/cdefs.h> | |
| 33 | ||
| 34 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | |
| 35 | ||
| 36 | #ifndef __cplusplus | |
| 37 | #define	and	&& | |
| 38 | #define	and_eq	&= | |
| 39 | #define	bitand	& | |
| 40 | #define	bitor	| | |
| 41 | #define	compl	~ | |
| 42 | #define	not	! | |
| 43 | #define	not_eq	!= | |
| 44 | #define	or	|| | |
| 45 | #define	or_eq	|= | |
| 46 | #define	xor	^ | |
| 47 | #define	xor_eq	^= | |
| 48 | #endif /* ! __cplusplus */ | |
| 49 | ||
| 50 | #endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ | |
| 51 | ||
| 52 | #endif /* !_ISO646_H_ */ | |
| \ No newline at end of file |
lib/libc/include/any-macos-any/libkern/OSCacheControl.h created+66| ... | ... | @@ -0,0 +1,66 @@ |
| 1 | /* | |
| 2 | * Copyright (c) 2006 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 _OS_CACHE_CONTROL_H_ | |
| 25 | #define _OS_CACHE_CONTROL_H_ | |
| 26 | ||
| 27 | #include <stddef.h> | |
| 28 | #include <sys/cdefs.h> | |
| 29 | #include <stdint.h> | |
| 30 | #include <Availability.h> | |
| 31 | ||
| 32 | __BEGIN_DECLS | |
| 33 | ||
| 34 | ||
| 35 | /* Functions performed by sys_cache_control(): */ | |
| 36 | ||
| 37 | /* Prepare memory for execution. This should be called | |
| 38 | * after writing machine instructions to memory, before | |
| 39 | * executing them. It syncs the dcache and icache. | |
| 40 | * On IA32 processors this function is a NOP, because | |
| 41 | * no synchronization is required. | |
| 42 | */ | |
| 43 | #define	kCacheFunctionPrepareForExecution	1 | |
| 44 | ||
| 45 | /* Flush data cache(s). This ensures that cached data | |
| 46 | * makes it all the way out to DRAM, and then removes | |
| 47 | * copies of the data from all processor caches. | |
| 48 | * It can be useful when dealing with cache incoherent | |
| 49 | * devices or DMA. | |
| 50 | */ | |
| 51 | #define	kCacheFunctionFlushDcache	2 | |
| 52 | ||
| 53 | ||
| 54 | /* perform one of the above cache functions: */ | |
| 55 | int	sys_cache_control( int function, void *start, size_t len) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0); | |
| 56 | ||
| 57 | /* equivalent to sys_cache_control(kCacheFunctionPrepareForExecution): */ | |
| 58 | void	sys_icache_invalidate( void *start, size_t len) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0); | |
| 59 | ||
| 60 | /* equivalent to sys_cache_control(kCacheFunctionFlushDcache): */ | |
| 61 | void	sys_dcache_flush( void *start, size_t len) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0); | |
| 62 | ||
| 63 | ||
| 64 | __END_DECLS | |
| 65 | ||
| 66 | #endif /* _OS_CACHE_CONTROL_H_ */ | |
| \ No newline at end of file |
lib/libc/include/any-macos-any/libkern/OSDebug.h created+59| ... | ... | @@ -0,0 +1,59 @@ |
| 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 | * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. | |
| 30 | * | |
| 31 | * HISTORY | |
| 32 | * | |
| 33 | */ | |
| 34 | ||
| 35 | #ifndef _OS_OSDEBBUG_H | |
| 36 | #define _OS_OSDEBBUG_H | |
| 37 | ||
| 38 | #include <sys/cdefs.h> | |
| 39 | #include <mach/mach_types.h> | |
| 40 | ||
| 41 | __BEGIN_DECLS | |
| 42 | ||
| 43 | /* Report a message with a 4 entry backtrace - very slow */ | |
| 44 | extern void OSReportWithBacktrace(const char *str, ...) __printflike(1, 2); | |
| 45 | extern unsigned OSBacktrace(void **bt, unsigned maxAddrs); | |
| 46 | ||
| 47 | /* Simple dump of 20 backtrace entries */ | |
| 48 | extern void OSPrintBacktrace(void); | |
| 49 | ||
| 50 | /*! @function OSKernelStackRemaining | |
| 51 | * @abstract Returns bytes available below the current stack frame. | |
| 52 | * @discussion Returns bytes available below the current stack frame. Safe for interrupt or thread context. | |
| 53 | * @result Approximate byte count available. */ | |
| 54 | ||
| 55 | vm_offset_t OSKernelStackRemaining( void ); | |
| 56 | ||
| 57 | __END_DECLS | |
| 58 | ||
| 59 | #endif /* !_OS_OSDEBBUG_H */ | |
| \ No newline at end of file |
lib/libc/include/any-macos-any/libkern/OSKextLib.h created+571| ... | ... | @@ -0,0 +1,571 @@ |
| 1 | /* | |
| 2 | * Copyright (c) 2008 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 _LIBKERN_OSKEXTLIB_H | |
| 30 | #define _LIBKERN_OSKEXTLIB_H | |
| 31 | ||
| 32 | #include <sys/cdefs.h> | |
| 33 | __BEGIN_DECLS | |
| 34 | ||
| 35 | #include <stdint.h> | |
| 36 | #include <mach/kmod.h> | |
| 37 | #include <mach/vm_types.h> | |
| 38 | #include <uuid/uuid.h> | |
| 39 | ||
| 40 | #include <libkern/OSReturn.h> | |
| 41 | ||
| 42 | /*! | |
| 43 | * @header | |
| 44 | * | |
| 45 | * Declares functions, basic return values, and other constants | |
| 46 | * related to kernel extensions (kexts). | |
| 47 | */ | |
| 48 | ||
| 49 | #if PRAGMA_MARK | |
| 50 | #pragma mark - | |
| 51 | /********************************************************************/ | |
| 52 | #pragma mark OSReturn Values for Kernel Extensions | |
| 53 | /********************************************************************/ | |
| 54 | #endif | |
| 55 | /*! | |
| 56 | * @group OSReturn Values for Kernel Extensions | |
| 57 | * Many kext-related functions return these values, | |
| 58 | * as well as those defined under | |
| 59 | * <code>@link //apple_ref/c/tdef/OSReturn OSReturn@/link</code> | |
| 60 | * and other variants of <code>kern_return_t</code>. | |
| 61 | */ | |
| 62 | ||
| 63 | ||
| 64 | #define sub_libkern_kext err_sub(2) | |
| 65 | #define libkern_kext_err(code) (sys_libkern|sub_libkern_kext|(code)) | |
| 66 | ||
| 67 | ||
| 68 | /*! | |
| 69 | * @define kOSKextReturnInternalError | |
| 70 | * @abstract An internal error in the kext library. | |
| 71 | * Contrast with <code>@link //apple_ref/c/econst/OSReturnError | |
| 72 | * OSReturnError@/link</code>. | |
| 73 | */ | |
| 74 | #define kOSKextReturnInternalError libkern_kext_err(0x1) | |
| 75 | ||
| 76 | /*! | |
| 77 | * @define kOSKextReturnNoMemory | |
| 78 | * @abstract Memory allocation failed. | |
| 79 | */ | |
| 80 | #define kOSKextReturnNoMemory libkern_kext_err(0x2) | |
| 81 | ||
| 82 | /*! | |
| 83 | * @define kOSKextReturnNoResources | |
| 84 | * @abstract Some resource other than memory (such as available load tags) | |
| 85 | * is exhausted. | |
| 86 | */ | |
| 87 | #define kOSKextReturnNoResources libkern_kext_err(0x3) | |
| 88 | ||
| 89 | /*! | |
| 90 | * @define kOSKextReturnNotPrivileged | |
| 91 | * @abstract The caller lacks privileges to perform the requested operation. | |
| 92 | */ | |
| 93 | #define kOSKextReturnNotPrivileged libkern_kext_err(0x4) | |
| 94 | ||
| 95 | /*! | |
| 96 | * @define kOSKextReturnInvalidArgument | |
| 97 | * @abstract Invalid argument. | |
| 98 | */ | |
| 99 | #define kOSKextReturnInvalidArgument libkern_kext_err(0x5) | |
| 100 | ||
| 101 | /*! | |
| 102 | * @define kOSKextReturnNotFound | |
| 103 | * @abstract Search item not found. | |
| 104 | */ | |
| 105 | #define kOSKextReturnNotFound libkern_kext_err(0x6) | |
| 106 | ||
| 107 | /*! | |
| 108 | * @define kOSKextReturnBadData | |
| 109 | * @abstract Malformed data (not used for XML). | |
| 110 | */ | |
| 111 | #define kOSKextReturnBadData libkern_kext_err(0x7) | |
| 112 | ||
| 113 | /*! | |
| 114 | * @define kOSKextReturnSerialization | |
| 115 | * @abstract Error converting or (un)serializing URL, string, or XML. | |
| 116 | */ | |
| 117 | #define kOSKextReturnSerialization libkern_kext_err(0x8) | |
| 118 | ||
| 119 | /*! | |
| 120 | * @define kOSKextReturnUnsupported | |
| 121 | * @abstract Operation is no longer or not yet supported. | |
| 122 | */ | |
| 123 | #define kOSKextReturnUnsupported libkern_kext_err(0x9) | |
| 124 | ||
| 125 | /*! | |
| 126 | * @define kOSKextReturnDisabled | |
| 127 | * @abstract Operation is currently disabled. | |
| 128 | */ | |
| 129 | #define kOSKextReturnDisabled libkern_kext_err(0xa) | |
| 130 | ||
| 131 | /*! | |
| 132 | * @define kOSKextReturnNotAKext | |
| 133 | * @abstract Bundle is not a kernel extension. | |
| 134 | */ | |
| 135 | #define kOSKextReturnNotAKext libkern_kext_err(0xb) | |
| 136 | ||
| 137 | /*! | |
| 138 | * @define kOSKextReturnValidation | |
| 139 | * @abstract Validation failures encountered; check diagnostics for details. | |
| 140 | */ | |
| 141 | #define kOSKextReturnValidation libkern_kext_err(0xc) | |
| 142 | ||
| 143 | /*! | |
| 144 | * @define kOSKextReturnAuthentication | |
| 145 | * @abstract Authetication failures encountered; check diagnostics for details. | |
| 146 | */ | |
| 147 | #define kOSKextReturnAuthentication libkern_kext_err(0xd) | |
| 148 | ||
| 149 | /*! | |
| 150 | * @define kOSKextReturnDependencies | |
| 151 | * @abstract Dependency resolution failures encountered; check diagnostics for details. | |
| 152 | */ | |
| 153 | #define kOSKextReturnDependencies libkern_kext_err(0xe) | |
| 154 | ||
| 155 | /*! | |
| 156 | * @define kOSKextReturnArchNotFound | |
| 157 | * @abstract Kext does not contain code for the requested architecture. | |
| 158 | */ | |
| 159 | #define kOSKextReturnArchNotFound libkern_kext_err(0xf) | |
| 160 | ||
| 161 | /*! | |
| 162 | * @define kOSKextReturnCache | |
| 163 | * @abstract An error occurred processing a system kext cache. | |
| 164 | */ | |
| 165 | #define kOSKextReturnCache libkern_kext_err(0x10) | |
| 166 | ||
| 167 | /*! | |
| 168 | * @define kOSKextReturnDeferred | |
| 169 | * @abstract Operation has been posted asynchronously to user space (kernel only). | |
| 170 | */ | |
| 171 | #define kOSKextReturnDeferred libkern_kext_err(0x11) | |
| 172 | ||
| 173 | /*! | |
| 174 | * @define kOSKextReturnBootLevel | |
| 175 | * @abstract Kext not loadable or operation not allowed at current boot level. | |
| 176 | */ | |
| 177 | #define kOSKextReturnBootLevel libkern_kext_err(0x12) | |
| 178 | ||
| 179 | /*! | |
| 180 | * @define kOSKextReturnNotLoadable | |
| 181 | * @abstract Kext cannot be loaded; check diagnostics for details. | |
| 182 | */ | |
| 183 | #define kOSKextReturnNotLoadable libkern_kext_err(0x13) | |
| 184 | ||
| 185 | /*! | |
| 186 | * @define kOSKextReturnLoadedVersionDiffers | |
| 187 | * @abstract A different version (or executable UUID, or executable by checksum) | |
| 188 | * of the requested kext is already loaded. | |
| 189 | */ | |
| 190 | #define kOSKextReturnLoadedVersionDiffers libkern_kext_err(0x14) | |
| 191 | ||
| 192 | /*! | |
| 193 | * @define kOSKextReturnDependencyLoadError | |
| 194 | * @abstract A load error occurred on a dependency of the kext being loaded. | |
| 195 | */ | |
| 196 | #define kOSKextReturnDependencyLoadError libkern_kext_err(0x15) | |
| 197 | ||
| 198 | /*! | |
| 199 | * @define kOSKextReturnLinkError | |
| 200 | * @abstract A link failure occured with this kext or a dependency. | |
| 201 | */ | |
| 202 | #define kOSKextReturnLinkError libkern_kext_err(0x16) | |
| 203 | ||
| 204 | /*! | |
| 205 | * @define kOSKextReturnStartStopError | |
| 206 | * @abstract The kext start or stop routine returned an error. | |
| 207 | */ | |
| 208 | #define kOSKextReturnStartStopError libkern_kext_err(0x17) | |
| 209 | ||
| 210 | /*! | |
| 211 | * @define kOSKextReturnInUse | |
| 212 | * @abstract The kext is currently in use or has outstanding references, | |
| 213 | * and cannot be unloaded. | |
| 214 | */ | |
| 215 | #define kOSKextReturnInUse libkern_kext_err(0x18) | |
| 216 | ||
| 217 | /*! | |
| 218 | * @define kOSKextReturnTimeout | |
| 219 | * @abstract A kext request has timed out. | |
| 220 | */ | |
| 221 | #define kOSKextReturnTimeout libkern_kext_err(0x19) | |
| 222 | ||
| 223 | /*! | |
| 224 | * @define kOSKextReturnStopping | |
| 225 | * @abstract The kext is in the process of stopping; requests cannot be made. | |
| 226 | */ | |
| 227 | #define kOSKextReturnStopping libkern_kext_err(0x1a) | |
| 228 | ||
| 229 | /*! | |
| 230 | * @define kOSKextReturnSystemPolicy | |
| 231 | * @abstract The kext was prevented from loading due to system policy. | |
| 232 | */ | |
| 233 | #define kOSKextReturnSystemPolicy libkern_kext_err(0x1b) | |
| 234 | ||
| 235 | /*! | |
| 236 | * @define kOSKextReturnKCLoadFailure | |
| 237 | * @abstract Loading of the System KC failed | |
| 238 | */ | |
| 239 | #define kOSKextReturnKCLoadFailure libkern_kext_err(0x1c) | |
| 240 | ||
| 241 | /*! | |
| 242 | * @define kOSKextReturnKCLoadFailureSystemKC | |
| 243 | * @abstract Loading of the System KC failed | |
| 244 | * | |
| 245 | * This a sub-code of kOSKextReturnKCLoadFailure. It can be OR'd together | |
| 246 | * with: kOSKextReturnKCLoadFailureAuxKC | |
| 247 | * | |
| 248 | * If both the System and Aux KCs fail to load, then the error code will be: | |
| 249 | * libkern_kext_err(0x1f) | |
| 250 | */ | |
| 251 | #define kOSKextReturnKCLoadFailureSystemKC libkern_kext_err(0x1d) | |
| 252 | ||
| 253 | /*! | |
| 254 | * @define kOSKextReturnKCLoadFailureAuxKC | |
| 255 | * @abstract Loading of the Aux KC failed | |
| 256 | * | |
| 257 | * This a sub-code of kOSKextReturnKCLoadFailure. It can be OR'd together | |
| 258 | * with: kOSKextReturnKCLoadFailureSystemKC | |
| 259 | * | |
| 260 | * If both the System and Aux KCs fail to load, then the error code will be: | |
| 261 | * libkern_kext_err(0x1f) | |
| 262 | */ | |
| 263 | #define kOSKextReturnKCLoadFailureAuxKC libkern_kext_err(0x1e) | |
| 264 | ||
| 265 | /* next available error is: libkern_kext_err(0x20) */ | |
| 266 | ||
| 267 | #if PRAGMA_MARK | |
| 268 | #pragma mark - | |
| 269 | /********************************************************************/ | |
| 270 | #pragma mark Kext/OSBundle Property List Keys | |
| 271 | /********************************************************************/ | |
| 272 | #endif | |
| 273 | /*! | |
| 274 | * @group Kext Property List Keys | |
| 275 | * These constants cover CFBundle properties defined for kernel extensions. | |
| 276 | * Because they are used in the kernel, if you want to use one with | |
| 277 | * CFBundle APIs you'll need to wrap it in a <code>CFSTR()</code> macro. | |
| 278 | */ | |
| 279 | ||
| 280 | ||
| 281 | /*! | |
| 282 | * @define kOSBundleCompatibleVersionKey | |
| 283 | * @abstract A string giving the backwards-compatible version of a library kext | |
| 284 | * in extended Mac OS 'vers' format (####.##.##s{1-255} where 's' | |
| 285 | * is a build stage 'd', 'a', 'b', 'f' or 'fc'). | |
| 286 | */ | |
| 287 | #define kOSBundleCompatibleVersionKey "OSBundleCompatibleVersion" | |
| 288 | ||
| 289 | /*! | |
| 290 | * @define kOSBundleEnableKextLoggingKey | |
| 291 | * @abstract Set to true to have the kernel kext logging spec applied | |
| 292 | * to the kext. | |
| 293 | * See <code>@link //apple_ref/c/econst/OSKextLogSpec | |
| 294 | * OSKextLogSpec@/link</code>. | |
| 295 | */ | |
| 296 | #define kOSBundleEnableKextLoggingKey "OSBundleEnableKextLogging" | |
| 297 | ||
| 298 | /*! | |
| 299 | * @define kOSBundleIsInterfaceKey | |
| 300 | * @abstract A boolean value indicating whether the kext executable | |
| 301 | * contains only symbol references. | |
| 302 | */ | |
| 303 | #define kOSBundleIsInterfaceKey "OSBundleIsInterface" | |
| 304 | ||
| 305 | /*! | |
| 306 | * @define kOSBundleLibrariesKey | |
| 307 | * @abstract A dictionary listing link dependencies for this kext. | |
| 308 | * Keys are bundle identifiers, values are version strings. | |
| 309 | */ | |
| 310 | #define kOSBundleLibrariesKey "OSBundleLibraries" | |
| 311 | ||
| 312 | /*! | |
| 313 | * @define kOSBundleRequiredKey | |
| 314 | * @abstract A string indicating in which kinds of startup this kext | |
| 315 | * may need to load during early startup (before | |
| 316 | * <code>@link //apple_ref/doc/man/8/kextd kextcache(8)@/link</code>). | |
| 317 | * @discussion | |
| 318 | * The value is one of: | |
| 319 | * <ul> | |
| 320 | * <li>@link kOSBundleRequiredRoot "OSBundleRequiredRoot"@/link</li> | |
| 321 | * <li>@link kOSBundleRequiredLocalRoot "OSBundleRequiredLocalRoot"@/link</li> | |
| 322 | * <li>@link kOSBundleRequiredNetworkRoot "OSBundleRequiredNetworkRoot"@/link</li> | |
| 323 | * <li>@link kOSBundleRequiredSafeBoot "OSBundleRequiredSafeBoot"@/link</li> | |
| 324 | * <li>@link kOSBundleRequiredConsole "OSBundleRequiredConsole"@/link</li> | |
| 325 | * </ul> | |
| 326 | * | |
| 327 | * Use this property judiciously. | |
| 328 | * Every kext that declares a value other than "OSBundleRequiredSafeBoot" | |
| 329 | * increases startup time, as the booter must read it into memory, | |
| 330 | * or startup kext caches must include it. | |
| 331 | */ | |
| 332 | #define kOSBundleRequiredKey "OSBundleRequired" | |
| 333 | ||
| 334 | /*! | |
| 335 | * @define kOSBundleRequireExplicitLoadKey | |
| 336 | * @abstract A boolean value indicating whether the kext requires an | |
| 337 | * explicit kextload in order to start/match. | |
| 338 | */ | |
| 339 | #define kOSBundleRequireExplicitLoadKey "OSBundleRequireExplicitLoad" | |
| 340 | ||
| 341 | /*! | |
| 342 | * @define kOSBundleAllowUserLoadKey | |
| 343 | * @abstract A boolean value indicating whether | |
| 344 | * <code>@link //apple_ref/doc/man/8/kextd kextcache(8)@/link</code> | |
| 345 | * will honor a non-root process's request to load a kext. | |
| 346 | * @discussion | |
| 347 | * See <code>@link //apple_ref/doc/compositePage/c/func/KextManagerLoadKextWithURL | |
| 348 | * KextManagerLoadKextWithURL@/link</code> | |
| 349 | * and <code>@link //apple_ref/doc/compositePage/c/func/KextManagerLoadKextWithIdentifier | |
| 350 | * KextManagerLoadKextWithIdentifier@/link</code>. | |
| 351 | */ | |
| 352 | #define kOSBundleAllowUserLoadKey "OSBundleAllowUserLoad" | |
| 353 | ||
| 354 | /*! | |
| 355 | * @define kOSBundleAllowUserTerminateKey | |
| 356 | * @abstract A boolean value indicating whether the kextunload tool | |
| 357 | * is allowed to issue IOService terminate to classes defined in this kext. | |
| 358 | * @discussion A boolean value indicating whether the kextunload tool | |
| 359 | * is allowed to issue IOService terminate to classes defined in this kext. | |
| 360 | */ | |
| 361 | #define kOSBundleAllowUserTerminateKey "OSBundleAllowUserTerminate" | |
| 362 | ||
| 363 | /*! | |
| 364 | * @define kOSKernelResourceKey | |
| 365 | * @abstract A boolean value indicating whether the kext represents a built-in | |
| 366 | * component of the kernel. | |
| 367 | */ | |
| 368 | #define kOSKernelResourceKey "OSKernelResource" | |
| 369 | ||
| 370 | /*! | |
| 371 | * @define kOSKextVariantOverrideKey | |
| 372 | * @abstract A dictionary with target names as key and a target-specific variant | |
| 373 | * name as value. | |
| 374 | */ | |
| 375 | #define kOSKextVariantOverrideKey "OSKextVariantOverride" | |
| 376 | ||
| 377 | /*! | |
| 378 | * @define kIOKitPersonalitiesKey | |
| 379 | * @abstract A dictionary of dictionaries used in matching for I/O Kit drivers. | |
| 380 | */ | |
| 381 | #define kIOKitPersonalitiesKey "IOKitPersonalities" | |
| 382 | ||
| 383 | /* | |
| 384 | * @define kIOPersonalityPublisherKey | |
| 385 | * @abstract Used in personalities sent to the I/O Kit, | |
| 386 | * contains the CFBundleIdentifier of the kext | |
| 387 | * that the personality originated in. | |
| 388 | */ | |
| 389 | #define kIOPersonalityPublisherKey "IOPersonalityPublisher" | |
| 390 | ||
| 391 | #if CONFIG_KEC_FIPS | |
| 392 | /* | |
| 393 | * @define kAppleTextHashesKey | |
| 394 | * @abstract A dictionary conataining hashes for corecrypto kext. | |
| 395 | */ | |
| 396 | #define kAppleTextHashesKey "AppleTextHashes" | |
| 397 | #endif | |
| 398 | ||
| 399 | /*! | |
| 400 | * @define kOSMutableSegmentCopy | |
| 401 | * @abstract A boolean value indicating whether the kext requires a copy of | |
| 402 | * its mutable segments to be kept in memory, and then reset when the kext | |
| 403 | * unloads. This should be used with caution as it will increase the | |
| 404 | * amount of memory used by the kext. | |
| 405 | */ | |
| 406 | #define kOSMutableSegmentCopy "OSMutableSegmentCopy" | |
| 407 | ||
| 408 | ||
| 409 | #if PRAGMA_MARK | |
| 410 | /********************************************************************/ | |
| 411 | #pragma mark Kext/OSBundle Property Deprecated Keys | |
| 412 | /********************************************************************/ | |
| 413 | #endif | |
| 414 | /* | |
| 415 | * @define kOSBundleDebugLevelKey | |
| 416 | * @abstract | |
| 417 | * Deprecated (used on some releases of Mac OS X prior to 10.6 Snow Leopard). | |
| 418 | * Value is an integer from 1-6, corresponding to the verbose levels | |
| 419 | * of kext tools on those releases. | |
| 420 | * On 10.6 Snow Leopard, use <code>@link OSKextEnableKextLogging | |
| 421 | * OSKextEnableKextLogging@/link</code>. | |
| 422 | */ | |
| 423 | #define kOSBundleDebugLevelKey "OSBundleDebugLevel" | |
| 424 | ||
| 425 | /*! | |
| 426 | * @define kOSBundleSharedExecutableIdentifierKey | |
| 427 | * @abstract Deprecated (used on some releases of Mac OS X | |
| 428 | * prior to 10.6 Snow Leopard). | |
| 429 | * Value is the bundle identifier of the pseudokext | |
| 430 | * that contains an executable shared by this kext. | |
| 431 | */ | |
| 432 | #define kOSBundleSharedExecutableIdentifierKey "OSBundleSharedExecutableIdentifier" | |
| 433 | ||
| 434 | ||
| 435 | #if PRAGMA_MARK | |
| 436 | /********************************************************************/ | |
| 437 | #pragma mark Kext/OSBundle Property List Values | |
| 438 | /********************************************************************/ | |
| 439 | #endif | |
| 440 | ||
| 441 | /*! | |
| 442 | * @group Kext Property List Values | |
| 443 | * These constants encompass established values | |
| 444 | * for kernel extension bundle properties. | |
| 445 | */ | |
| 446 | ||
| 447 | /*! | |
| 448 | * @define kOSKextKernelIdentifier | |
| 449 | * @abstract | |
| 450 | * This is the CFBundleIdentifier user for the kernel itself. | |
| 451 | */ | |
| 452 | #define kOSKextKernelIdentifier "__kernel__" | |
| 453 | ||
| 454 | /*! | |
| 455 | * @define kOSKextBundlePackageTypeKext | |
| 456 | * @abstract | |
| 457 | * The bundle type value for Kernel Extensions. | |
| 458 | */ | |
| 459 | #define kOSKextBundlePackageTypeKext "KEXT" | |
| 460 | ||
| 461 | /*! | |
| 462 | * @define kOSKextBundlePackageTypeDriverKit | |
| 463 | * @abstract | |
| 464 | * The bundle type value for Driver Extensions. | |
| 465 | */ | |
| 466 | #define kOSKextBundlePackageTypeDriverKit "DEXT" | |
| 467 | ||
| 468 | /*! | |
| 469 | * @define kOSBundleRequiredRoot | |
| 470 | * @abstract | |
| 471 | * This <code>@link kOSBundleRequiredKey OSBundleRequired@/link</code> | |
| 472 | * value indicates that the kext may be needed to mount the root filesystem | |
| 473 | * whether starting from a local or a network volume. | |
| 474 | */ | |
| 475 | #define kOSBundleRequiredRoot "Root" | |
| 476 | ||
| 477 | /*! | |
| 478 | * @define kOSBundleRequiredLocalRoot | |
| 479 | * @abstract | |
| 480 | * This <code>@link kOSBundleRequiredKey OSBundleRequired@/link</code> | |
| 481 | * value indicates that the kext may be needed to mount the root filesystem | |
| 482 | * when starting from a local disk. | |
| 483 | */ | |
| 484 | #define kOSBundleRequiredLocalRoot "Local-Root" | |
| 485 | ||
| 486 | /*! | |
| 487 | * @define kOSBundleRequiredNetworkRoot | |
| 488 | * @abstract | |
| 489 | * This <code>@link kOSBundleRequiredKey OSBundleRequired@/link</code> | |
| 490 | * value indicates that the kext may be needed to mount the root filesystem | |
| 491 | * when starting over a network connection. | |
| 492 | */ | |
| 493 | #define kOSBundleRequiredNetworkRoot "Network-Root" | |
| 494 | ||
| 495 | /*! | |
| 496 | * @define kOSBundleRequiredSafeBoot | |
| 497 | * @abstract | |
| 498 | * This <code>@link kOSBundleRequiredKey OSBundleRequired@/link</code> | |
| 499 | * value indicates that the kext can be loaded during a safe startup. | |
| 500 | * This value does not normally cause the kext to be read by the booter | |
| 501 | * or included in startup kext caches. | |
| 502 | */ | |
| 503 | #define kOSBundleRequiredSafeBoot "Safe Boot" | |
| 504 | ||
| 505 | /*! | |
| 506 | * @define kOSBundleRequiredConsole | |
| 507 | * @abstract | |
| 508 | * This <code>@link kOSBundleRequiredKey OSBundleRequired@/link</code> | |
| 509 | * value indicates that the kext may be needed for console access | |
| 510 | * (specifically in a single-user startup when | |
| 511 | * <code>@link //apple_ref/doc/man/8/kextd kextd(8)@/link</code>. | |
| 512 | * does not run) | |
| 513 | * and should be loaded during early startup. | |
| 514 | */ | |
| 515 | #define kOSBundleRequiredConsole "Console" | |
| 516 | ||
| 517 | /*! | |
| 518 | * @define kOSBundleRequiredDriverKit | |
| 519 | * @abstract | |
| 520 | * This <code>@link kOSBundleRequiredKey OSBundleRequired@/link</code> | |
| 521 | * value indicates that the driver extension's (DriverKit driver's) | |
| 522 | * personalities must be present in the kernel at early boot (specifically | |
| 523 | * before <code>@link //apple_ref/doc/man/8/kextd kextd(8)@/link</code> starts) | |
| 524 | * in order to compete with kexts built into the prelinkedkernel. Note that | |
| 525 | * kextd is still required to launch the user space driver binary. The IOKit | |
| 526 | * matching will happen during early boot, and the actual driver launch | |
| 527 | * will happen after kextd starts. | |
| 528 | */ | |
| 529 | #define kOSBundleRequiredDriverKit "DriverKit" | |
| 530 | ||
| 531 | #if PRAGMA_MARK | |
| 532 | #pragma mark - | |
| 533 | /********************************************************************/ | |
| 534 | #pragma mark Kext Information | |
| 535 | /********************************************************************/ | |
| 536 | #endif | |
| 537 | /*! | |
| 538 | * @group Kext Information | |
| 539 | * Types, constants, and macros providing a kext with information | |
| 540 | * about itself. | |
| 541 | */ | |
| 542 | ||
| 543 | /*! | |
| 544 | * @typedef OSKextLoadTag | |
| 545 | * | |
| 546 | * @abstract | |
| 547 | * A unique identifier assigned to a loaded instanace of a kext. | |
| 548 | * | |
| 549 | * @discussion | |
| 550 | * If a kext is unloaded and later reloaded, the new instance | |
| 551 | * has a different load tag. | |
| 552 | * | |
| 553 | * A kext can get its own load tag in the <code>kmod_info_t</code> | |
| 554 | * structure passed into its module start routine, as the | |
| 555 | * <code>id</code> field (cast to this type). | |
| 556 | */ | |
| 557 | typedef uint32_t OSKextLoadTag; | |
| 558 | ||
| 559 | /*! | |
| 560 | * @define kOSKextInvalidLoadTag | |
| 561 | * | |
| 562 | * @abstract | |
| 563 | * A load tag value that will never be used for a loaded kext; | |
| 564 | * indicates kext not found. | |
| 565 | */ | |
| 566 | #define kOSKextInvalidLoadTag ((OSKextLoadTag)(-1)) | |
| 567 | ||
| 568 | ||
| 569 | __END_DECLS | |
| 570 | ||
| 571 | #endif /* _LIBKERN_OSKEXTLIB_H */ | |
| \ No newline at end of file |
lib/libc/include/any-macos-any/libkern/OSReturn.h created+198| ... | ... | @@ -0,0 +1,198 @@ |
| 1 | /* | |
| 2 | * Copyright (c) 2000 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) 1998 Apple Inc. All rights reserved. | |
| 30 | * | |
| 31 | * HISTORY | |
| 32 | * | |
| 33 | */ | |
| 34 | ||
| 35 | /* | |
| 36 | * Core OSReturn values. | |
| 37 | */ | |
| 38 | ||
| 39 | #ifndef __LIBKERN_OSRETURN_H | |
| 40 | #define __LIBKERN_OSRETURN_H | |
| 41 | ||
| 42 | #include <sys/cdefs.h> | |
| 43 | ||
| 44 | __BEGIN_DECLS | |
| 45 | ||
| 46 | #include <mach/error.h> | |
| 47 | ||
| 48 | ||
| 49 | /*! | |
| 50 | * @header | |
| 51 | * | |
| 52 | * Declares functions, basic return values, and other constants | |
| 53 | * related to kernel extensions (kexts). | |
| 54 | */ | |
| 55 | ||
| 56 | #if PRAGMA_MARK | |
| 57 | #pragma mark Core OSReturn Values for Libkern | |
| 58 | #endif | |
| 59 | /********************************************************************* | |
| 60 | * Core OSReturn Values for Libkern | |
| 61 | *********************************************************************/ | |
| 62 | /*! | |
| 63 | * @group Core OSReturn Values for Libkern | |
| 64 | * Some kext and I/O Kit functions can return these values, | |
| 65 | * as well as other values of | |
| 66 | * <code>kern_return_t</code>. | |
| 67 | * | |
| 68 | * Many of these return values represent internal errors | |
| 69 | * in the Libkern C++ run-time typing information system | |
| 70 | * based on @link //apple_ref/doc/class/OSMetaClass OSMetaClass@/link; | |
| 71 | * you are unlikely to ever see them. | |
| 72 | * | |
| 73 | */ | |
| 74 | ||
| 75 | ||
| 76 | /*! | |
| 77 | * @typedef OSReturn | |
| 78 | * @abstract The return type for many Libkern functions. | |
| 79 | */ | |
| 80 | typedef kern_return_t OSReturn; | |
| 81 | ||
| 82 | #ifndef sys_libkern | |
| 83 | #define sys_libkern err_system(0x37) | |
| 84 | #endif /* sys_libkern */ | |
| 85 | ||
| 86 | #define sub_libkern_common err_sub(0) | |
| 87 | #define sub_libkern_metaclass err_sub(1) | |
| 88 | #define sub_libkern_reserved err_sub(-1) | |
| 89 | ||
| 90 | #define libkern_common_err(return ) (sys_libkern|sub_libkern_common|(return)) | |
| 91 | #define libkern_metaclass_err(return ) (sys_libkern|sub_libkern_metaclass|(return)) | |
| 92 | ||
| 93 | /* See OSKextLib.h for these | |
| 94 | * #define sub_libkern_kext err_sub(2) | |
| 95 | * #define libkern_kext_err(code) (sys_libkern|sub_libkern_kext|(code)) | |
| 96 | */ | |
| 97 | ||
| 98 | /*! | |
| 99 | * @define kOSReturnSuccess | |
| 100 | * @abstract Operation successful. | |
| 101 | * Equal to <code>@link //apple_ref/c/econst/KERN_SUCCESS | |
| 102 | * KERN_SUCCESS@/link</code>. | |
| 103 | */ | |
| 104 | #define kOSReturnSuccess KERN_SUCCESS | |
| 105 | ||
| 106 | /*! | |
| 107 | * @define kOSReturnError | |
| 108 | * @abstract Unspecified Libkern error. | |
| 109 | * <b>Not equal</b> to | |
| 110 | * <code>@link //apple_ref/c/econst/KERN_FAILURE | |
| 111 | * KERN_FAILURE@/link</code>. | |
| 112 | */ | |
| 113 | #define kOSReturnError libkern_common_err(1) | |
| 114 | ||
| 115 | /*! | |
| 116 | * @define kOSMetaClassInternal | |
| 117 | * @abstract Internal OSMetaClass run-time error. | |
| 118 | */ | |
| 119 | #define kOSMetaClassInternal libkern_metaclass_err(1) | |
| 120 | ||
| 121 | /*! | |
| 122 | * @define kOSMetaClassHasInstances | |
| 123 | * @abstract A kext cannot be unloaded because there are instances | |
| 124 | * derived from Libkern C++ classes that it defines. | |
| 125 | */ | |
| 126 | #define kOSMetaClassHasInstances libkern_metaclass_err(2) | |
| 127 | ||
| 128 | /*! | |
| 129 | * @define kOSMetaClassNoInit | |
| 130 | * @abstract Internal error: The Libkern C++ class registration system | |
| 131 | * was not properly initialized during kext loading. | |
| 132 | */ | |
| 133 | #define kOSMetaClassNoInit libkern_metaclass_err(3) | |
| 134 | // OSMetaClass::preModLoad wasn't called, runtime internal error | |
| 135 | ||
| 136 | /*! | |
| 137 | * @define kOSMetaClassNoTempData | |
| 138 | * @abstract Internal error: An allocation failure occurred | |
| 139 | * registering Libkern C++ classes during kext loading. | |
| 140 | */ | |
| 141 | #define kOSMetaClassNoTempData libkern_metaclass_err(4) | |
| 142 | // Allocation failure internal data | |
| 143 | ||
| 144 | /*! | |
| 145 | * @define kOSMetaClassNoDicts | |
| 146 | * @abstract Internal error: An allocation failure occurred | |
| 147 | * registering Libkern C++ classes during kext loading. | |
| 148 | */ | |
| 149 | #define kOSMetaClassNoDicts libkern_metaclass_err(5) | |
| 150 | // Allocation failure for Metaclass internal dictionaries | |
| 151 | ||
| 152 | /*! | |
| 153 | * @define kOSMetaClassNoKModSet | |
| 154 | * @abstract Internal error: An allocation failure occurred | |
| 155 | * registering Libkern C++ classes during kext loading. | |
| 156 | */ | |
| 157 | #define kOSMetaClassNoKModSet libkern_metaclass_err(6) | |
| 158 | // Allocation failure for internal kmodule set | |
| 159 | ||
| 160 | /*! | |
| 161 | * @define kOSMetaClassNoInsKModSet | |
| 162 | * @abstract Internal error: An error occurred registering | |
| 163 | * a specific Libkern C++ class during kext loading. | |
| 164 | */ | |
| 165 | #define kOSMetaClassNoInsKModSet libkern_metaclass_err(7) | |
| 166 | // Can't insert the KMod set into the module dictionary | |
| 167 | ||
| 168 | /*! | |
| 169 | * @define kOSMetaClassNoSuper | |
| 170 | * @abstract Internal error: No superclass can be found | |
| 171 | * for a specific Libkern C++ class during kext loading. | |
| 172 | */ | |
| 173 | #define kOSMetaClassNoSuper libkern_metaclass_err(8) | |
| 174 | ||
| 175 | /*! | |
| 176 | * @define kOSMetaClassInstNoSuper | |
| 177 | * @abstract Internal error: No superclass can be found when constructing | |
| 178 | * an instance of a Libkern C++ class. | |
| 179 | */ | |
| 180 | #define kOSMetaClassInstNoSuper libkern_metaclass_err(9) | |
| 181 | ||
| 182 | /*! | |
| 183 | * @define kOSMetaClassDuplicateClass | |
| 184 | * @abstract A duplicate Libkern C++ classname was encountered | |
| 185 | * during kext loading. | |
| 186 | */ | |
| 187 | #define kOSMetaClassDuplicateClass libkern_metaclass_err(10) | |
| 188 | ||
| 189 | /*! | |
| 190 | * @define kOSMetaClassNoKext | |
| 191 | * @abstract Internal error: The kext for a Libkern C++ class | |
| 192 | * can't be found during kext loading. | |
| 193 | */ | |
| 194 | #define kOSMetaClassNoKext libkern_metaclass_err(11) | |
| 195 | ||
| 196 | __END_DECLS | |
| 197 | ||
| 198 | #endif /* ! __LIBKERN_OSRETURN_H */ | |
| \ No newline at end of file |
lib/libc/include/any-macos-any/libkern/OSThermalNotification.h created+135| ... | ... | @@ -0,0 +1,135 @@ |
| 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 | ||
| 24 | #ifndef _OSTHERMALNOTIFICATION_H_ | |
| 25 | #define _OSTHERMALNOTIFICATION_H_ | |
| 26 | ||
| 27 | #include <sys/cdefs.h> | |
| 28 | #include <Availability.h> | |
| 29 | ||
| 30 | /* | |
| 31 | ** OSThermalNotification.h | |
| 32 | ** | |
| 33 | ** Notification mechanism to alert registered tasks when device thermal conditions | |
| 34 | ** reach certain thresholds. Notifications are triggered in both directions | |
| 35 | ** so clients can manage their memory usage more and less aggressively. | |
| 36 | ** | |
| 37 | */ | |
| 38 | ||
| 39 | __BEGIN_DECLS | |
| 40 | ||
| 41 | /* Define pressure levels usable by OSThermalPressureLevel */ | |
| 42 | typedef enum { | |
| 43 | #if TARGET_OS_OSX || TARGET_OS_MACCATALYST | |
| 44 | 	kOSThermalPressureLevelNominal = 0, | |
| 45 | 	kOSThermalPressureLevelModerate, | |
| 46 | 	kOSThermalPressureLevelHeavy, | |
| 47 | 	kOSThermalPressureLevelTrapping, | |
| 48 | 	kOSThermalPressureLevelSleeping | |
| 49 | #else | |
| 50 | 	kOSThermalPressureLevelNominal = 0, | |
| 51 | 	kOSThermalPressureLevelLight = 10, | |
| 52 | 	kOSThermalPressureLevelModerate = 20, | |
| 53 | 	kOSThermalPressureLevelHeavy = 30, | |
| 54 | 	kOSThermalPressureLevelTrapping = 40, | |
| 55 | 	kOSThermalPressureLevelSleeping = 50 | |
| 56 | #endif | |
| 57 | } OSThermalPressureLevel; | |
| 58 | ||
| 59 | /* | |
| 60 | ** External notify(3) string for thermal pressure level notification | |
| 61 | */ | |
| 62 | __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0) | |
| 63 | extern const char * const kOSThermalNotificationPressureLevelName; | |
| 64 | ||
| 65 | ||
| 66 | #if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && \ | |
| 67 | 	__IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_2_0 | |
| 68 | ||
| 69 | typedef enum { | |
| 70 | 	OSThermalNotificationLevelAny = -1, | |
| 71 | 	OSThermalNotificationLevelNormal = 0, | |
| 72 | } OSThermalNotificationLevel; | |
| 73 | ||
| 74 | extern OSThermalNotificationLevel _OSThermalNotificationLevelForBehavior(int) __OSX_AVAILABLE_STARTING(__MAC_NA, __IPHONE_4_2); | |
| 75 | extern void _OSThermalNotificationSetLevelForBehavior(int, int) __OSX_AVAILABLE_STARTING(__MAC_NA, __IPHONE_4_2); | |
| 76 | ||
| 77 | enum { | |
| 78 | 	kOSThermalMitigationNone, | |
| 79 | 	kOSThermalMitigation70PercentTorch, | |
| 80 | 	kOSThermalMitigation70PercentBacklight, | |
| 81 | 	kOSThermalMitigation50PercentTorch, | |
| 82 | 	kOSThermalMitigation50PercentBacklight, | |
| 83 | 	kOSThermalMitigationDisableTorch, | |
| 84 | 	kOSThermalMitigation25PercentBacklight, | |
| 85 | 	kOSThermalMitigationDisableMapsHalo, | |
| 86 | 	kOSThermalMitigationAppTerminate, | |
| 87 | 	kOSThermalMitigationDeviceRestart, | |
| 88 | 	kOSThermalMitigationThermalTableReady, | |
| 89 | 	kOSThermalMitigationCount | |
| 90 | }; | |
| 91 | ||
| 92 | #define OSThermalNotificationLevel70PercentTorch _OSThermalNotificationLevelForBehavior(kOSThermalMitigation70PercentTorch) | |
| 93 | #define OSThermalNotificationLevel70PercentBacklight _OSThermalNotificationLevelForBehavior(kOSThermalMitigation70PercentBacklight) | |
| 94 | #define OSThermalNotificationLevel50PercentTorch _OSThermalNotificationLevelForBehavior(kOSThermalMitigation50PercentTorch) | |
| 95 | #define OSThermalNotificationLevel50PercentBacklight _OSThermalNotificationLevelForBehavior(kOSThermalMitigation50PercentBacklight) | |
| 96 | #define OSThermalNotificationLevelDisableTorch _OSThermalNotificationLevelForBehavior(kOSThermalMitigationDisableTorch) | |
| 97 | #define OSThermalNotificationLevel25PercentBacklight _OSThermalNotificationLevelForBehavior(kOSThermalMitigation25PercentBacklight) | |
| 98 | #define OSThermalNotificationLevelDisableMapsHalo _OSThermalNotificationLevelForBehavior(kOSThermalMitigationDisableMapsHalo) | |
| 99 | #define OSThermalNotificationLevelAppTerminate _OSThermalNotificationLevelForBehavior(kOSThermalMitigationAppTerminate) | |
| 100 | #define OSThermalNotificationLevelDeviceRestart _OSThermalNotificationLevelForBehavior(kOSThermalMitigationDeviceRestart) | |
| 101 | ||
| 102 | /* Backwards compatibility */ | |
| 103 | #define OSThermalNotificationLevelWarning OSThermalNotificationLevel70PercentBacklight | |
| 104 | #define OSThermalNotificationLevelUrgent OSThermalNotificationLevelAppTerminate | |
| 105 | #define OSThermalNotificationLevelCritical OSThermalNotificationLevelDeviceRestart | |
| 106 | ||
| 107 | /* | |
| 108 | ** Simple polling interface to detect current thermal level | |
| 109 | */ | |
| 110 | __OSX_AVAILABLE_STARTING(__MAC_NA, __IPHONE_2_0) | |
| 111 | extern OSThermalNotificationLevel OSThermalNotificationCurrentLevel(void); | |
| 112 | ||
| 113 | /* | |
| 114 | ** External notify(3) string for manual notification setup | |
| 115 | */ | |
| 116 | __OSX_AVAILABLE_STARTING(__MAC_NA, __IPHONE_2_0) | |
| 117 | extern const char * const kOSThermalNotificationName; | |
| 118 | ||
| 119 | /* | |
| 120 | ** External notify(3) string for alerting user of a thermal condition | |
| 121 | */ | |
| 122 | __OSX_AVAILABLE_STARTING(__MAC_NA, __IPHONE_6_0) | |
| 123 | extern const char * const kOSThermalNotificationAlert; | |
| 124 | ||
| 125 | /* | |
| 126 | ** External notify(3) string for notifying system the options taken to resolve thermal condition | |
| 127 | */ | |
| 128 | __OSX_AVAILABLE_STARTING(__MAC_NA, __IPHONE_6_0) | |
| 129 | extern const char * const kOSThermalNotificationDecision; | |
| 130 | ||
| 131 | #endif // __IPHONE_OS_VERSION_MIN_REQUIRED | |
| 132 | ||
| 133 | __END_DECLS | |
| 134 | ||
| 135 | #endif /* _OSTHERMALNOTIFICATION_H_ */ | |
| \ No newline at end of file |
lib/libc/include/any-macos-any/libproc.h deleted-172| ... | ... | @@ -1,172 +0,0 @@ |
| 1 | /* | |
| 2 | * Copyright (c) 2006, 2007, 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 | #ifndef _LIBPROC_H_ | |
| 24 | #define _LIBPROC_H_ | |
| 25 | ||
| 26 | #include <sys/cdefs.h> | |
| 27 | #include <sys/param.h> | |
| 28 | #include <sys/types.h> | |
| 29 | #include <sys/stat.h> | |
| 30 | #include <sys/mount.h> | |
| 31 | #include <sys/resource.h> | |
| 32 | #include <stdint.h> | |
| 33 | #include <stdbool.h> | |
| 34 | #include <mach/message.h> /* for audit_token_t */ | |
| 35 | ||
| 36 | #include <sys/proc_info.h> | |
| 37 | ||
| 38 | #include <Availability.h> | |
| 39 | #include <os/availability.h> | |
| 40 | ||
| 41 | /* | |
| 42 | * This header file contains private interfaces to obtain process information. | |
| 43 | * These interfaces are subject to change in future releases. | |
| 44 | */ | |
| 45 | ||
| 46 | /*! | |
| 47 | * @define PROC_LISTPIDSPATH_PATH_IS_VOLUME | |
| 48 | * @discussion This flag indicates that all processes that hold open | |
| 49 | * file references on the volume associated with the specified | |
| 50 | * path should be returned. | |
| 51 | */ | |
| 52 | #define PROC_LISTPIDSPATH_PATH_IS_VOLUME 1 | |
| 53 | ||
| 54 | ||
| 55 | /*! | |
| 56 | * @define PROC_LISTPIDSPATH_EXCLUDE_EVTONLY | |
| 57 | * @discussion This flag indicates that file references that were opened | |
| 58 | * with the O_EVTONLY flag should be excluded from the matching | |
| 59 | * criteria. | |
| 60 | */ | |
| 61 | #define PROC_LISTPIDSPATH_EXCLUDE_EVTONLY 2 | |
| 62 | ||
| 63 | __BEGIN_DECLS | |
| 64 | ||
| 65 | ||
| 66 | /*! | |
| 67 | * @function proc_listpidspath | |
| 68 | * @discussion A function which will search through the current | |
| 69 | * processes looking for open file references which match | |
| 70 | * a specified path or volume. | |
| 71 | * @param type types of processes to be searched (see proc_listpids) | |
| 72 | * @param typeinfo adjunct information for type | |
| 73 | * @param path file or volume path | |
| 74 | * @param pathflags flags to control which files should be considered | |
| 75 | * during the process search. | |
| 76 | * @param buffer a C array of int-sized values to be filled with | |
| 77 | * process identifiers that hold an open file reference | |
| 78 | * matching the specified path or volume. Pass NULL to | |
| 79 | * obtain the minimum buffer size needed to hold the | |
| 80 | * currently active processes. | |
| 81 | * @param buffersize the size (in bytes) of the provided buffer. | |
| 82 | * @result the number of bytes of data returned in the provided buffer; | |
| 83 | * -1 if an error was encountered; | |
| 84 | */ | |
| 85 | int proc_listpidspath(uint32_t type, | |
| 86 | uint32_t typeinfo, | |
| 87 | const char *path, | |
| 88 | uint32_t pathflags, | |
| 89 | void *buffer, | |
| 90 | int buffersize) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0); | |
| 91 | ||
| 92 | int proc_listpids(uint32_t type, uint32_t typeinfo, void *buffer, int buffersize) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0); | |
| 93 | int proc_listallpids(void * buffer, int buffersize) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_1); | |
| 94 | int proc_listpgrppids(pid_t pgrpid, void * buffer, int buffersize) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_1); | |
| 95 | int proc_listchildpids(pid_t ppid, void * buffer, int buffersize) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_1); | |
| 96 | int proc_pidinfo(int pid, int flavor, uint64_t arg, void *buffer, int buffersize) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0); | |
| 97 | int proc_pidfdinfo(int pid, int fd, int flavor, void * buffer, int buffersize) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0); | |
| 98 | int proc_pidfileportinfo(int pid, uint32_t fileport, int flavor, void *buffer, int buffersize) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3); | |
| 99 | int proc_name(int pid, void * buffer, uint32_t buffersize) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0); | |
| 100 | int proc_regionfilename(int pid, uint64_t address, void * buffer, uint32_t buffersize) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0); | |
| 101 | int proc_kmsgbuf(void * buffer, uint32_t buffersize) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0); | |
| 102 | int proc_pidpath(int pid, void * buffer, uint32_t buffersize) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0); | |
| 103 | int proc_pidpath_audittoken(audit_token_t *audittoken, void * buffer, uint32_t buffersize) API_AVAILABLE(macos(11.0), ios(14.0), watchos(7.0), tvos(14.0)); | |
| 104 | int proc_libversion(int *major, int * minor) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0); | |
| 105 | ||
| 106 | /* | |
| 107 | * Return resource usage information for the given pid, which can be a live process or a zombie. | |
| 108 | * | |
| 109 | * Returns 0 on success; or -1 on failure, with errno set to indicate the specific error. | |
| 110 | */ | |
| 111 | int proc_pid_rusage(int pid, int flavor, rusage_info_t *buffer) __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0); | |
| 112 | ||
| 113 | /* | |
| 114 | * A process can use the following api to set its own process control | |
| 115 | * state on resoure starvation. The argument can have one of the PROC_SETPC_XX values | |
| 116 | */ | |
| 117 | #define PROC_SETPC_NONE 0 | |
| 118 | #define PROC_SETPC_THROTTLEMEM 1 | |
| 119 | #define PROC_SETPC_SUSPEND 2 | |
| 120 | #define PROC_SETPC_TERMINATE 3 | |
| 121 | ||
| 122 | int proc_setpcontrol(const int control) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2); | |
| 123 | int proc_setpcontrol(const int control); | |
| 124 | ||
| 125 | int proc_track_dirty(pid_t pid, uint32_t flags); | |
| 126 | int proc_set_dirty(pid_t pid, bool dirty); | |
| 127 | int proc_get_dirty(pid_t pid, uint32_t *flags); | |
| 128 | int proc_clear_dirty(pid_t pid, uint32_t flags); | |
| 129 | ||
| 130 | int proc_terminate(pid_t pid, int *sig); | |
| 131 | ||
| 132 | /* | |
| 133 | * NO_SMT means that on an SMT CPU, this thread must be scheduled alone, | |
| 134 | * with the paired CPU idle. | |
| 135 | * | |
| 136 | * Set NO_SMT on the current proc (all existing and future threads) | |
| 137 | * This attribute is inherited on fork and exec | |
| 138 | */ | |
| 139 | int proc_set_no_smt(void) __API_AVAILABLE(macos(11.0)); | |
| 140 | ||
| 141 | /* Set NO_SMT on the current thread */ | |
| 142 | int proc_setthread_no_smt(void) __API_AVAILABLE(macos(11.0)); | |
| 143 | ||
| 144 | /* | |
| 145 | * CPU Security Mitigation APIs | |
| 146 | * | |
| 147 | * Set CPU security mitigation on the current proc (all existing and future threads) | |
| 148 | * This attribute is inherited on fork and exec | |
| 149 | */ | |
| 150 | int proc_set_csm(uint32_t flags) __API_AVAILABLE(macos(11.0)); | |
| 151 | ||
| 152 | /* Set CPU security mitigation on the current thread */ | |
| 153 | int proc_setthread_csm(uint32_t flags) __API_AVAILABLE(macos(11.0)); | |
| 154 | ||
| 155 | /* | |
| 156 | * flags for CPU Security Mitigation APIs | |
| 157 | * PROC_CSM_ALL should be used in most cases, | |
| 158 | * the individual flags are provided only for performance evaluation etc | |
| 159 | */ | |
| 160 | #define PROC_CSM_ALL 0x0001 /* Set all available mitigations */ | |
| 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 */ | |
| 163 | ||
| 164 | int proc_udata_info(int pid, int flavor, void *buffer, int buffersize); | |
| 165 | ||
| 166 | #if __has_include(<libproc_private.h>) | |
| 167 | #include <libproc_private.h> | |
| 168 | #endif | |
| 169 | ||
| 170 | __END_DECLS | |
| 171 | ||
| 172 | #endif /*_LIBPROC_H_ */ | |
| \ No newline at end of file |
lib/libc/include/any-macos-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-any/pthread.h deleted-727| ... | ... | @@ -1,727 +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 | * 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 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-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-any/stddef.h created+90| ... | ... | @@ -0,0 +1,90 @@ |
| 1 | /* | |
| 2 | * Copyright (c) 2000-2013 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 | /*	$OpenBSD: stddef.h,v 1.2 1997/09/21 10:45:52 niklas Exp $	*/ | |
| 24 | /*	$NetBSD: stddef.h,v 1.4 1994/10/26 00:56:26 cgd Exp $	*/ | |
| 25 | ||
| 26 | /*- | |
| 27 | * Copyright (c) 1990 The Regents of the University of California. | |
| 28 | * All rights reserved. | |
| 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 | *	@(#)stddef.h	5.5 (Berkeley) 4/3/91 | |
| 59 | */ | |
| 60 | ||
| 61 | #ifndef __STDDEF_H__ | |
| 62 | #define __STDDEF_H__ | |
| 63 | ||
| 64 | #include <_types.h> | |
| 65 | ||
| 66 | #include <sys/_types.h> | |
| 67 | #include <sys/_types/_null.h> | |
| 68 | #include <sys/_types/_offsetof.h> | |
| 69 | #include <sys/_types/_ptrdiff_t.h> | |
| 70 | ||
| 71 | #if defined(__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__ >= 1 | |
| 72 | #include <sys/_types/_rsize_t.h> | |
| 73 | #endif /* __STDC_WANT_LIB_EXT1__ >= 1 */ | |
| 74 | ||
| 75 | /* DO NOT REMOVE THIS COMMENT: fixincludes needs to see: | |
| 76 | * _GCC_SIZE_T */ | |
| 77 | #include <sys/_types/_size_t.h> | |
| 78 | ||
| 79 | #include <sys/_types/_wchar_t.h> | |
| 80 | ||
| 81 | #if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) | |
| 82 | #include <sys/_types/_wint_t.h> | |
| 83 | #endif /* !_ANSI_SOURCE && (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ | |
| 84 | ||
| 85 | #if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) \ | |
| 86 | || (defined(__cplusplus) && __cplusplus >= 201103L) | |
| 87 | typedef long double max_align_t; | |
| 88 | #endif | |
| 89 | ||
| 90 | #endif /* __STDDEF_H__ */ | |
| \ No newline at end of file |
lib/libc/include/any-macos-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-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-any/sys/_types/_offsetof.h created+30| ... | ... | @@ -0,0 +1,30 @@ |
| 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 offsetof | |
| 29 | #define offsetof(type, field) __offsetof(type, field) | |
| 30 | #endif /* offsetof */ | |
| \ No newline at end of file |
lib/libc/include/any-macos-any/sys/_types/_ptrdiff_t.h created+33| ... | ... | @@ -0,0 +1,33 @@ |
| 1 | /* | |
| 2 | * Copyright (c) 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 | ||
| 29 | #ifndef _PTRDIFF_T | |
| 30 | #define _PTRDIFF_T | |
| 31 | #include <machine/types.h> /* __darwin_ptrdiff_t */ | |
| 32 | typedef __darwin_ptrdiff_t ptrdiff_t; | |
| 33 | #endif /* _PTRDIFF_T */ | |
| \ No newline at end of file |
lib/libc/include/any-macos-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-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-any/vis.h created+138| ... | ... | @@ -0,0 +1,138 @@ |
| 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 | /*	$NetBSD: vis.h,v 1.21 2013/02/20 17:01:15 christos Exp $	*/ | |
| 24 | /*	$FreeBSD$	*/ | |
| 25 | ||
| 26 | /*- | |
| 27 | * Copyright (c) 1990, 1993 | |
| 28 | *	The Regents of the University of California. All rights reserved. | |
| 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. Neither the name of the University nor the names of its contributors | |
| 39 | * may be used to endorse or promote products derived from this software | |
| 40 | * without specific prior written permission. | |
| 41 | * | |
| 42 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | |
| 43 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |
| 44 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | |
| 45 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | |
| 46 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
| 47 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
| 48 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
| 49 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
| 50 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
| 51 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
| 52 | * SUCH DAMAGE. | |
| 53 | * | |
| 54 | *	@(#)vis.h	8.1 (Berkeley) 6/2/93 | |
| 55 | */ | |
| 56 | ||
| 57 | #ifndef _VIS_H_ | |
| 58 | #define	_VIS_H_ | |
| 59 | ||
| 60 | #include <_types.h> | |
| 61 | #include <sys/_types/_size_t.h> | |
| 62 | ||
| 63 | /* | |
| 64 | * to select alternate encoding format | |
| 65 | */ | |
| 66 | #define	VIS_OCTAL	0x0001	/* use octal \ddd format */ | |
| 67 | #define	VIS_CSTYLE	0x0002	/* use \[nrft0..] where appropiate */ | |
| 68 | ||
| 69 | /* | |
| 70 | * to alter set of characters encoded (default is to encode all | |
| 71 | * non-graphic except space, tab, and newline). | |
| 72 | */ | |
| 73 | #define	VIS_SP		0x0004	/* also encode space */ | |
| 74 | #define	VIS_TAB		0x0008	/* also encode tab */ | |
| 75 | #define	VIS_NL		0x0010	/* also encode newline */ | |
| 76 | #define	VIS_WHITE	(VIS_SP | VIS_TAB | VIS_NL) | |
| 77 | #define	VIS_SAFE	0x0020	/* only encode "unsafe" characters */ | |
| 78 | ||
| 79 | /* | |
| 80 | * other | |
| 81 | */ | |
| 82 | #define	VIS_NOSLASH	0x0040	/* inhibit printing '\' */ | |
| 83 | #define	VIS_HTTP1808	0x0080	/* http-style escape % hex hex */ | |
| 84 | #define	VIS_HTTPSTYLE	0x0080	/* http-style escape % hex hex */ | |
| 85 | #define	VIS_GLOB	0x0100	/* encode glob(3) magic characters */ | |
| 86 | #define	VIS_MIMESTYLE	0x0200	/* mime-style escape = HEX HEX */ | |
| 87 | #define	VIS_HTTP1866	0x0400	/* http-style &#num; or &string; */ | |
| 88 | #define	VIS_NOESCAPE	0x0800	/* don't decode `\' */ | |
| 89 | #define	_VIS_END	0x1000	/* for unvis */ | |
| 90 | ||
| 91 | /* | |
| 92 | * unvis return codes | |
| 93 | */ | |
| 94 | #define	UNVIS_VALID	 1	/* character valid */ | |
| 95 | #define	UNVIS_VALIDPUSH	 2	/* character valid, push back passed char */ | |
| 96 | #define	UNVIS_NOCHAR	 3	/* valid sequence, no character produced */ | |
| 97 | #define	UNVIS_SYNBAD	-1	/* unrecognized escape sequence */ | |
| 98 | #define	UNVIS_ERROR	-2	/* decoder in unknown state (unrecoverable) */ | |
| 99 | ||
| 100 | /* | |
| 101 | * unvis flags | |
| 102 | */ | |
| 103 | #define	UNVIS_END	_VIS_END	/* no more characters */ | |
| 104 | ||
| 105 | #include <sys/cdefs.h> | |
| 106 | ||
| 107 | __BEGIN_DECLS | |
| 108 | char	*vis(char *, int, int, int); | |
| 109 | char	*nvis(char *, size_t, int, int, int); | |
| 110 | ||
| 111 | char	*svis(char *, int, int, int, const char *); | |
| 112 | char	*snvis(char *, size_t, int, int, int, const char *); | |
| 113 | ||
| 114 | int	strvis(char *, const char *, int); | |
| 115 | int	strnvis(char *, size_t, const char *, int); | |
| 116 | ||
| 117 | int	strsvis(char *, const char *, int, const char *); | |
| 118 | int	strsnvis(char *, size_t, const char *, int, const char *); | |
| 119 | ||
| 120 | int	strvisx(char *, const char *, size_t, int); | |
| 121 | int	strnvisx(char *, size_t, const char *, size_t, int); | |
| 122 | int 	strenvisx(char *, size_t, const char *, size_t, int, int *); | |
| 123 | ||
| 124 | int	strsvisx(char *, const char *, size_t, int, const char *); | |
| 125 | int	strsnvisx(char *, size_t, const char *, size_t, int, const char *); | |
| 126 | int	strsenvisx(char *, size_t, const char *, size_t , int, const char *, | |
| 127 | int *); | |
| 128 | ||
| 129 | int	strunvis(char *, const char *); | |
| 130 | int	strnunvis(char *, size_t, const char *); | |
| 131 | ||
| 132 | int	strunvisx(char *, const char *, int); | |
| 133 | int	strnunvisx(char *, size_t, const char *, int); | |
| 134 | ||
| 135 | int	unvis(char *, int, int *, int); | |
| 136 | __END_DECLS | |
| 137 | ||
| 138 | #endif /* !_VIS_H_ */ | |
| \ No newline at end of file |
lib/libc/include/any-macos-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-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/any-macos.11-any/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/any-macos.11-any/AvailabilityInternal.h+5-5| ... | ... | @@ -55,7 +55,7 @@ |
| 55 | 55 | #ifdef __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ |
| 56 | 56 | /* compiler sets __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ when -mtvos-version-min is used */ |
| 57 | 57 | #define __TV_OS_VERSION_MIN_REQUIRED __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ |
| 58 | #define __TV_OS_VERSION_MAX_ALLOWED __TVOS_15_2 | |
| 58 | #define __TV_OS_VERSION_MAX_ALLOWED __TVOS_14_5 | |
| 59 | 59 | /* for compatibility with existing code. New code should use platform specific checks */ |
| 60 | 60 | #define __IPHONE_OS_VERSION_MIN_REQUIRED 90000 |
| 61 | 61 | #endif |
| ... | ... | @@ -65,7 +65,7 @@ |
| 65 | 65 | #ifdef __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ |
| 66 | 66 | /* compiler sets __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ when -mwatchos-version-min is used */ |
| 67 | 67 | #define __WATCH_OS_VERSION_MIN_REQUIRED __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ |
| 68 | #define __WATCH_OS_VERSION_MAX_ALLOWED __WATCHOS_8_3 | |
| 68 | #define __WATCH_OS_VERSION_MAX_ALLOWED __WATCHOS_7_4 | |
| 69 | 69 | /* for compatibility with existing code. New code should use platform specific checks */ |
| 70 | 70 | #define __IPHONE_OS_VERSION_MIN_REQUIRED 90000 |
| 71 | 71 | #endif |
| ... | ... | @@ -75,7 +75,7 @@ |
| 75 | 75 | #ifdef __ENVIRONMENT_BRIDGE_OS_VERSION_MIN_REQUIRED__ |
| 76 | 76 | |
| 77 | 77 | #define __BRIDGE_OS_VERSION_MIN_REQUIRED __ENVIRONMENT_BRIDGE_OS_VERSION_MIN_REQUIRED__ |
| 78 | #define __BRIDGE_OS_VERSION_MAX_ALLOWED 60100 | |
| 78 | #define __BRIDGE_OS_VERSION_MAX_ALLOWED 50300 | |
| 79 | 79 | /* for compatibility with existing code. New code should use platform specific checks */ |
| 80 | 80 | #define __IPHONE_OS_VERSION_MIN_REQUIRED 110000 |
| 81 | 81 | #endif |
| ... | ... | @@ -90,14 +90,14 @@ |
| 90 | 90 | #ifdef __MAC_OS_X_VERSION_MIN_REQUIRED |
| 91 | 91 | /* make sure a default max version is set */ |
| 92 | 92 | #ifndef __MAC_OS_X_VERSION_MAX_ALLOWED |
| 93 | #define __MAC_OS_X_VERSION_MAX_ALLOWED __MAC_12_1 | |
| 93 | #define __MAC_OS_X_VERSION_MAX_ALLOWED __MAC_11_3 | |
| 94 | 94 | #endif |
| 95 | 95 | #endif /* __MAC_OS_X_VERSION_MIN_REQUIRED */ |
| 96 | 96 | |
| 97 | 97 | #ifdef __IPHONE_OS_VERSION_MIN_REQUIRED |
| 98 | 98 | /* make sure a default max version is set */ |
| 99 | 99 | #ifndef __IPHONE_OS_VERSION_MAX_ALLOWED |
| 100 | #define __IPHONE_OS_VERSION_MAX_ALLOWED __IPHONE_15_2 | |
| 100 | #define __IPHONE_OS_VERSION_MAX_ALLOWED __IPHONE_14_5 | |
| 101 | 101 | #endif |
| 102 | 102 | /* make sure a valid min is set */ |
| 103 | 103 | #if __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_2_0 |
lib/libc/include/any-macos.11-any/AvailabilityMacros.h created+4015| ... | ... | @@ -0,0 +1,4015 @@ |
| 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,11 +60,6 @@ |
| 60 | 60 | #define __MAC_11_0 110000 |
| 61 | 61 | #define __MAC_11_1 110100 |
| 62 | 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 | |
| 68 | 63 | /* __MAC_NA is not defined to a value but is used as a token by macros to indicate that the API is unavailable */ |
| 69 | 64 | |
| 70 | 65 | #define __IPHONE_2_0 20000 |
| ... | ... | @@ -119,12 +114,6 @@ |
| 119 | 114 | #define __IPHONE_14_2 140200 |
| 120 | 115 | #define __IPHONE_14_3 140300 |
| 121 | 116 | #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 | |
| 128 | 117 | /* __IPHONE_NA is not defined to a value but is used as a token by macros to indicate that the API is unavailable */ |
| 129 | 118 | |
| 130 | 119 | #define __TVOS_9_0 90000 |
| ... | ... | @@ -153,11 +142,6 @@ |
| 153 | 142 | #define __TVOS_14_2 140200 |
| 154 | 143 | #define __TVOS_14_3 140300 |
| 155 | 144 | #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 | |
| 161 | 145 | |
| 162 | 146 | #define __WATCHOS_1_0 10000 |
| 163 | 147 | #define __WATCHOS_2_0 20000 |
| ... | ... | @@ -183,12 +167,6 @@ |
| 183 | 167 | #define __WATCHOS_7_2 70200 |
| 184 | 168 | #define __WATCHOS_7_3 70300 |
| 185 | 169 | #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 | ||
| 192 | 170 | |
| 193 | 171 | /* |
| 194 | 172 | * Set up standard Mac OS X versions |
| ... | ... | @@ -229,12 +207,10 @@ |
| 229 | 207 | #define MAC_OS_X_VERSION_10_15_1 101501 |
| 230 | 208 | #define MAC_OS_X_VERSION_10_16 101600 |
| 231 | 209 | #define MAC_OS_VERSION_11_0 110000 |
| 232 | #define MAC_OS_VERSION_12_0 120000 | |
| 233 | 210 | |
| 234 | 211 | #endif /* #if (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || defined(_DARWIN_C_SOURCE) */ |
| 235 | 212 | |
| 236 | 213 | #define __DRIVERKIT_19_0 190000 |
| 237 | 214 | #define __DRIVERKIT_20_0 200000 |
| 238 | #define __DRIVERKIT_21_0 210000 | |
| 239 | 215 | |
| 240 | 216 | #endif /* __AVAILABILITY_VERSIONS__ */ |
| \ No newline at end of file |
lib/libc/include/any-macos.11-any/TargetConditionals.h+2-10| ... | ... | @@ -61,10 +61,8 @@ |
| 61 | 61 | * The IOS/TV/WATCH conditionals are mutually exclusive. |
| 62 | 62 | * |
| 63 | 63 | * |
| 64 | * TARGET_OS_WIN32 - Generated code will run under WIN32 API | |
| 65 | * TARGET_OS_WINDOWS - Generated code will run under Windows | |
| 64 | * TARGET_OS_WIN32 - Generated code will run under 32-bit Windows | |
| 66 | 65 | * TARGET_OS_UNIX - Generated code will run under some Unix (not OSX) |
| 67 | * TARGET_OS_LINUX - Generated code will run under Linux | |
| 68 | 66 | * TARGET_OS_MAC - Generated code will run under Mac OS X variant |
| 69 | 67 | * TARGET_OS_OSX - Generated code will run under OS X devices |
| 70 | 68 | * TARGET_OS_IPHONE - Generated code for firmware, devices, or simulator |
| ... | ... | @@ -180,7 +178,7 @@ |
| 180 | 178 | /* -target=x86_64-apple-driverkit19.0 */ |
| 181 | 179 | /* -target=arm64-apple-driverkit19.0 */ |
| 182 | 180 | /* -target=arm64e-apple-driverkit19.0 */ |
| 183 | #if __is_target_vendor(apple) && __is_target_os(driverkit) | |
| 181 | #if (__is_target_arch(x86_64) || __is_target_arch(arm64) || __is_target_arch(arm64e)) && __is_target_vendor(apple) && __is_target_os(driverkit) | |
| 184 | 182 | #define TARGET_OS_OSX 0 |
| 185 | 183 | #define TARGET_OS_IPHONE 0 |
| 186 | 184 | #define TARGET_OS_IOS 0 |
| ... | ... | @@ -216,9 +214,7 @@ |
| 216 | 214 | #if defined(__GNUC__) && ( defined(__APPLE_CPP__) || defined(__APPLE_CC__) || defined(__MACOS_CLASSIC__) ) |
| 217 | 215 | #define TARGET_OS_MAC 1 |
| 218 | 216 | #define TARGET_OS_WIN32 0 |
| 219 | #define TARGET_OS_WINDOWS 0 | |
| 220 | 217 | #define TARGET_OS_UNIX 0 |
| 221 | #define TARGET_OS_LINUX 0 | |
| 222 | 218 | |
| 223 | 219 | #if !DYNAMIC_TARGETS_ENABLED |
| 224 | 220 | #define TARGET_OS_OSX 1 |
| ... | ... | @@ -359,9 +355,7 @@ |
| 359 | 355 | #elif defined(__MWERKS__) |
| 360 | 356 | #define TARGET_OS_MAC 1 |
| 361 | 357 | #define TARGET_OS_WIN32 0 |
| 362 | #define TARGET_OS_WINDOWS 0 | |
| 363 | 358 | #define TARGET_OS_UNIX 0 |
| 364 | #define TARGET_OS_LINUX 0 | |
| 365 | 359 | #define TARGET_OS_EMBEDDED 0 |
| 366 | 360 | #if defined(__POWERPC__) |
| 367 | 361 | #define TARGET_CPU_PPC 1 |
| ... | ... | @@ -487,9 +481,7 @@ |
| 487 | 481 | #endif |
| 488 | 482 | #define TARGET_OS_MAC 1 |
| 489 | 483 | #define TARGET_OS_WIN32 0 |
| 490 | #define TARGET_OS_WINDOWS 0 | |
| 491 | 484 | #define TARGET_OS_UNIX 0 |
| 492 | #define TARGET_OS_LINUX 0 | |
| 493 | 485 | #define TARGET_OS_EMBEDDED 0 |
| 494 | 486 | #if TARGET_CPU_PPC || TARGET_CPU_PPC64 |
| 495 | 487 | #define TARGET_RT_BIG_ENDIAN 1 |
lib/libc/include/any-macos.11-any/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/any-macos.11-any/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/any-macos.11-any/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/any-macos.11-any/dispatch/queue.h+2-2| ... | ... | @@ -480,7 +480,7 @@ DISPATCH_EXPORT DISPATCH_NONNULL3 DISPATCH_NOTHROW |
| 480 | 480 | void |
| 481 | 481 | dispatch_apply(size_t iterations, |
| 482 | 482 | 		dispatch_queue_t DISPATCH_APPLY_QUEUE_ARG_NULLABILITY queue, |
| 483 | 		DISPATCH_NOESCAPE void (^block)(size_t iteration)); | |
| 483 | 		DISPATCH_NOESCAPE void (^block)(size_t)); | |
| 484 | 484 | #endif |
| 485 | 485 | |
| 486 | 486 | /*! |
| ... | ... | @@ -515,7 +515,7 @@ DISPATCH_EXPORT DISPATCH_NONNULL4 DISPATCH_NOTHROW |
| 515 | 515 | void |
| 516 | 516 | dispatch_apply_f(size_t iterations, |
| 517 | 517 | 		dispatch_queue_t DISPATCH_APPLY_QUEUE_ARG_NULLABILITY queue, |
| 518 | 		void *_Nullable context, void (*work)(void *_Nullable context, size_t iteration)); | |
| 518 | 		void *_Nullable context, void (*work)(void *_Nullable, size_t)); | |
| 519 | 519 | |
| 520 | 520 | /*! |
| 521 | 521 | * @function dispatch_get_current_queue |
lib/libc/include/any-macos.11-any/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/any-macos.11-any/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/any-macos.11-any/libkern/OSDebug.h created+69| ... | ... | @@ -0,0 +1,69 @@ |
| 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 | * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. | |
| 30 | * | |
| 31 | * HISTORY | |
| 32 | * | |
| 33 | */ | |
| 34 | ||
| 35 | #ifndef _OS_OSDEBBUG_H | |
| 36 | #define _OS_OSDEBBUG_H | |
| 37 | ||
| 38 | #include <sys/cdefs.h> | |
| 39 | #include <mach/mach_types.h> | |
| 40 | ||
| 41 | __BEGIN_DECLS | |
| 42 | ||
| 43 | extern int log_leaks; | |
| 44 | ||
| 45 | /* Use kernel_debug() to log a backtrace */ | |
| 46 | extern void trace_backtrace(unsigned int debugid, unsigned int debugid2, unsigned long size, unsigned long data); | |
| 47 | /* Report a message with a 4 entry backtrace - very slow */ | |
| 48 | extern void OSReportWithBacktrace(const char *str, ...); | |
| 49 | extern unsigned OSBacktrace(void **bt, unsigned maxAddrs); | |
| 50 | ||
| 51 | /* Simple dump of 20 backtrace entries */ | |
| 52 | extern void OSPrintBacktrace(void); | |
| 53 | ||
| 54 | /*! @function OSKernelStackRemaining | |
| 55 | * @abstract Returns bytes available below the current stack frame. | |
| 56 | * @discussion Returns bytes available below the current stack frame. Safe for interrupt or thread context. | |
| 57 | * @result Approximate byte count available. */ | |
| 58 | ||
| 59 | vm_offset_t OSKernelStackRemaining( void ); | |
| 60 | ||
| 61 | __END_DECLS | |
| 62 | ||
| 63 | #define TRACE_MACHLEAKS(a, b, c, d) \ | |
| 64 | do { \ | |
| 65 | if (__builtin_expect(!!log_leaks, 0)) \ | |
| 66 | 	trace_backtrace(a,b,c,d); \ | |
| 67 | } while(0) | |
| 68 | ||
| 69 | #endif /* !_OS_OSDEBBUG_H */ | |
| \ No newline at end of file |
lib/libc/include/any-macos.11-any/libkern/OSKextLib.h created+572| ... | ... | @@ -0,0 +1,572 @@ |
| 1 | /* | |
| 2 | * Copyright (c) 2008 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 _LIBKERN_OSKEXTLIB_H | |
| 30 | #define _LIBKERN_OSKEXTLIB_H | |
| 31 | ||
| 32 | #include <sys/cdefs.h> | |
| 33 | __BEGIN_DECLS | |
| 34 | ||
| 35 | #include <stdint.h> | |
| 36 | #include <mach/kmod.h> | |
| 37 | #include <mach/vm_types.h> | |
| 38 | #include <uuid/uuid.h> | |
| 39 | ||
| 40 | #include <CoreFoundation/CoreFoundation.h> | |
| 41 | #include <libkern/OSReturn.h> | |
| 42 | ||
| 43 | /*! | |
| 44 | * @header | |
| 45 | * | |
| 46 | * Declares functions, basic return values, and other constants | |
| 47 | * related to kernel extensions (kexts). | |
| 48 | */ | |
| 49 | ||
| 50 | #if PRAGMA_MARK | |
| 51 | #pragma mark - | |
| 52 | /********************************************************************/ | |
| 53 | #pragma mark OSReturn Values for Kernel Extensions | |
| 54 | /********************************************************************/ | |
| 55 | #endif | |
| 56 | /*! | |
| 57 | * @group OSReturn Values for Kernel Extensions | |
| 58 | * Many kext-related functions return these values, | |
| 59 | * as well as those defined under | |
| 60 | * <code>@link //apple_ref/c/tdef/OSReturn OSReturn@/link</code> | |
| 61 | * and other variants of <code>kern_return_t</code>. | |
| 62 | */ | |
| 63 | ||
| 64 | ||
| 65 | #define sub_libkern_kext err_sub(2) | |
| 66 | #define libkern_kext_err(code) (sys_libkern|sub_libkern_kext|(code)) | |
| 67 | ||
| 68 | ||
| 69 | /*! | |
| 70 | * @define kOSKextReturnInternalError | |
| 71 | * @abstract An internal error in the kext library. | |
| 72 | * Contrast with <code>@link //apple_ref/c/econst/OSReturnError | |
| 73 | * OSReturnError@/link</code>. | |
| 74 | */ | |
| 75 | #define kOSKextReturnInternalError libkern_kext_err(0x1) | |
| 76 | ||
| 77 | /*! | |
| 78 | * @define kOSKextReturnNoMemory | |
| 79 | * @abstract Memory allocation failed. | |
| 80 | */ | |
| 81 | #define kOSKextReturnNoMemory libkern_kext_err(0x2) | |
| 82 | ||
| 83 | /*! | |
| 84 | * @define kOSKextReturnNoResources | |
| 85 | * @abstract Some resource other than memory (such as available load tags) | |
| 86 | * is exhausted. | |
| 87 | */ | |
| 88 | #define kOSKextReturnNoResources libkern_kext_err(0x3) | |
| 89 | ||
| 90 | /*! | |
| 91 | * @define kOSKextReturnNotPrivileged | |
| 92 | * @abstract The caller lacks privileges to perform the requested operation. | |
| 93 | */ | |
| 94 | #define kOSKextReturnNotPrivileged libkern_kext_err(0x4) | |
| 95 | ||
| 96 | /*! | |
| 97 | * @define kOSKextReturnInvalidArgument | |
| 98 | * @abstract Invalid argument. | |
| 99 | */ | |
| 100 | #define kOSKextReturnInvalidArgument libkern_kext_err(0x5) | |
| 101 | ||
| 102 | /*! | |
| 103 | * @define kOSKextReturnNotFound | |
| 104 | * @abstract Search item not found. | |
| 105 | */ | |
| 106 | #define kOSKextReturnNotFound libkern_kext_err(0x6) | |
| 107 | ||
| 108 | /*! | |
| 109 | * @define kOSKextReturnBadData | |
| 110 | * @abstract Malformed data (not used for XML). | |
| 111 | */ | |
| 112 | #define kOSKextReturnBadData libkern_kext_err(0x7) | |
| 113 | ||
| 114 | /*! | |
| 115 | * @define kOSKextReturnSerialization | |
| 116 | * @abstract Error converting or (un)serializing URL, string, or XML. | |
| 117 | */ | |
| 118 | #define kOSKextReturnSerialization libkern_kext_err(0x8) | |
| 119 | ||
| 120 | /*! | |
| 121 | * @define kOSKextReturnUnsupported | |
| 122 | * @abstract Operation is no longer or not yet supported. | |
| 123 | */ | |
| 124 | #define kOSKextReturnUnsupported libkern_kext_err(0x9) | |
| 125 | ||
| 126 | /*! | |
| 127 | * @define kOSKextReturnDisabled | |
| 128 | * @abstract Operation is currently disabled. | |
| 129 | */ | |
| 130 | #define kOSKextReturnDisabled libkern_kext_err(0xa) | |
| 131 | ||
| 132 | /*! | |
| 133 | * @define kOSKextReturnNotAKext | |
| 134 | * @abstract Bundle is not a kernel extension. | |
| 135 | */ | |
| 136 | #define kOSKextReturnNotAKext libkern_kext_err(0xb) | |
| 137 | ||
| 138 | /*! | |
| 139 | * @define kOSKextReturnValidation | |
| 140 | * @abstract Validation failures encountered; check diagnostics for details. | |
| 141 | */ | |
| 142 | #define kOSKextReturnValidation libkern_kext_err(0xc) | |
| 143 | ||
| 144 | /*! | |
| 145 | * @define kOSKextReturnAuthentication | |
| 146 | * @abstract Authetication failures encountered; check diagnostics for details. | |
| 147 | */ | |
| 148 | #define kOSKextReturnAuthentication libkern_kext_err(0xd) | |
| 149 | ||
| 150 | /*! | |
| 151 | * @define kOSKextReturnDependencies | |
| 152 | * @abstract Dependency resolution failures encountered; check diagnostics for details. | |
| 153 | */ | |
| 154 | #define kOSKextReturnDependencies libkern_kext_err(0xe) | |
| 155 | ||
| 156 | /*! | |
| 157 | * @define kOSKextReturnArchNotFound | |
| 158 | * @abstract Kext does not contain code for the requested architecture. | |
| 159 | */ | |
| 160 | #define kOSKextReturnArchNotFound libkern_kext_err(0xf) | |
| 161 | ||
| 162 | /*! | |
| 163 | * @define kOSKextReturnCache | |
| 164 | * @abstract An error occurred processing a system kext cache. | |
| 165 | */ | |
| 166 | #define kOSKextReturnCache libkern_kext_err(0x10) | |
| 167 | ||
| 168 | /*! | |
| 169 | * @define kOSKextReturnDeferred | |
| 170 | * @abstract Operation has been posted asynchronously to user space (kernel only). | |
| 171 | */ | |
| 172 | #define kOSKextReturnDeferred libkern_kext_err(0x11) | |
| 173 | ||
| 174 | /*! | |
| 175 | * @define kOSKextReturnBootLevel | |
| 176 | * @abstract Kext not loadable or operation not allowed at current boot level. | |
| 177 | */ | |
| 178 | #define kOSKextReturnBootLevel libkern_kext_err(0x12) | |
| 179 | ||
| 180 | /*! | |
| 181 | * @define kOSKextReturnNotLoadable | |
| 182 | * @abstract Kext cannot be loaded; check diagnostics for details. | |
| 183 | */ | |
| 184 | #define kOSKextReturnNotLoadable libkern_kext_err(0x13) | |
| 185 | ||
| 186 | /*! | |
| 187 | * @define kOSKextReturnLoadedVersionDiffers | |
| 188 | * @abstract A different version (or executable UUID, or executable by checksum) | |
| 189 | * of the requested kext is already loaded. | |
| 190 | */ | |
| 191 | #define kOSKextReturnLoadedVersionDiffers libkern_kext_err(0x14) | |
| 192 | ||
| 193 | /*! | |
| 194 | * @define kOSKextReturnDependencyLoadError | |
| 195 | * @abstract A load error occurred on a dependency of the kext being loaded. | |
| 196 | */ | |
| 197 | #define kOSKextReturnDependencyLoadError libkern_kext_err(0x15) | |
| 198 | ||
| 199 | /*! | |
| 200 | * @define kOSKextReturnLinkError | |
| 201 | * @abstract A link failure occured with this kext or a dependency. | |
| 202 | */ | |
| 203 | #define kOSKextReturnLinkError libkern_kext_err(0x16) | |
| 204 | ||
| 205 | /*! | |
| 206 | * @define kOSKextReturnStartStopError | |
| 207 | * @abstract The kext start or stop routine returned an error. | |
| 208 | */ | |
| 209 | #define kOSKextReturnStartStopError libkern_kext_err(0x17) | |
| 210 | ||
| 211 | /*! | |
| 212 | * @define kOSKextReturnInUse | |
| 213 | * @abstract The kext is currently in use or has outstanding references, | |
| 214 | * and cannot be unloaded. | |
| 215 | */ | |
| 216 | #define kOSKextReturnInUse libkern_kext_err(0x18) | |
| 217 | ||
| 218 | /*! | |
| 219 | * @define kOSKextReturnTimeout | |
| 220 | * @abstract A kext request has timed out. | |
| 221 | */ | |
| 222 | #define kOSKextReturnTimeout libkern_kext_err(0x19) | |
| 223 | ||
| 224 | /*! | |
| 225 | * @define kOSKextReturnStopping | |
| 226 | * @abstract The kext is in the process of stopping; requests cannot be made. | |
| 227 | */ | |
| 228 | #define kOSKextReturnStopping libkern_kext_err(0x1a) | |
| 229 | ||
| 230 | /*! | |
| 231 | * @define kOSKextReturnSystemPolicy | |
| 232 | * @abstract The kext was prevented from loading due to system policy. | |
| 233 | */ | |
| 234 | #define kOSKextReturnSystemPolicy libkern_kext_err(0x1b) | |
| 235 | ||
| 236 | /*! | |
| 237 | * @define kOSKextReturnKCLoadFailure | |
| 238 | * @abstract Loading of the System KC failed | |
| 239 | */ | |
| 240 | #define kOSKextReturnKCLoadFailure libkern_kext_err(0x1c) | |
| 241 | ||
| 242 | /*! | |
| 243 | * @define kOSKextReturnKCLoadFailureSystemKC | |
| 244 | * @abstract Loading of the System KC failed | |
| 245 | * | |
| 246 | * This a sub-code of kOSKextReturnKCLoadFailure. It can be OR'd together | |
| 247 | * with: kOSKextReturnKCLoadFailureAuxKC | |
| 248 | * | |
| 249 | * If both the System and Aux KCs fail to load, then the error code will be: | |
| 250 | * libkern_kext_err(0x1f) | |
| 251 | */ | |
| 252 | #define kOSKextReturnKCLoadFailureSystemKC libkern_kext_err(0x1d) | |
| 253 | ||
| 254 | /*! | |
| 255 | * @define kOSKextReturnKCLoadFailureAuxKC | |
| 256 | * @abstract Loading of the Aux KC failed | |
| 257 | * | |
| 258 | * This a sub-code of kOSKextReturnKCLoadFailure. It can be OR'd together | |
| 259 | * with: kOSKextReturnKCLoadFailureSystemKC | |
| 260 | * | |
| 261 | * If both the System and Aux KCs fail to load, then the error code will be: | |
| 262 | * libkern_kext_err(0x1f) | |
| 263 | */ | |
| 264 | #define kOSKextReturnKCLoadFailureAuxKC libkern_kext_err(0x1e) | |
| 265 | ||
| 266 | /* next available error is: libkern_kext_err(0x20) */ | |
| 267 | ||
| 268 | #if PRAGMA_MARK | |
| 269 | #pragma mark - | |
| 270 | /********************************************************************/ | |
| 271 | #pragma mark Kext/OSBundle Property List Keys | |
| 272 | /********************************************************************/ | |
| 273 | #endif | |
| 274 | /*! | |
| 275 | * @group Kext Property List Keys | |
| 276 | * These constants cover CFBundle properties defined for kernel extensions. | |
| 277 | * Because they are used in the kernel, if you want to use one with | |
| 278 | * CFBundle APIs you'll need to wrap it in a <code>CFSTR()</code> macro. | |
| 279 | */ | |
| 280 | ||
| 281 | ||
| 282 | /*! | |
| 283 | * @define kOSBundleCompatibleVersionKey | |
| 284 | * @abstract A string giving the backwards-compatible version of a library kext | |
| 285 | * in extended Mac OS 'vers' format (####.##.##s{1-255} where 's' | |
| 286 | * is a build stage 'd', 'a', 'b', 'f' or 'fc'). | |
| 287 | */ | |
| 288 | #define kOSBundleCompatibleVersionKey "OSBundleCompatibleVersion" | |
| 289 | ||
| 290 | /*! | |
| 291 | * @define kOSBundleEnableKextLoggingKey | |
| 292 | * @abstract Set to true to have the kernel kext logging spec applied | |
| 293 | * to the kext. | |
| 294 | * See <code>@link //apple_ref/c/econst/OSKextLogSpec | |
| 295 | * OSKextLogSpec@/link</code>. | |
| 296 | */ | |
| 297 | #define kOSBundleEnableKextLoggingKey "OSBundleEnableKextLogging" | |
| 298 | ||
| 299 | /*! | |
| 300 | * @define kOSBundleIsInterfaceKey | |
| 301 | * @abstract A boolean value indicating whether the kext executable | |
| 302 | * contains only symbol references. | |
| 303 | */ | |
| 304 | #define kOSBundleIsInterfaceKey "OSBundleIsInterface" | |
| 305 | ||
| 306 | /*! | |
| 307 | * @define kOSBundleLibrariesKey | |
| 308 | * @abstract A dictionary listing link dependencies for this kext. | |
| 309 | * Keys are bundle identifiers, values are version strings. | |
| 310 | */ | |
| 311 | #define kOSBundleLibrariesKey "OSBundleLibraries" | |
| 312 | ||
| 313 | /*! | |
| 314 | * @define kOSBundleRequiredKey | |
| 315 | * @abstract A string indicating in which kinds of startup this kext | |
| 316 | * may need to load during early startup (before | |
| 317 | * <code>@link //apple_ref/doc/man/8/kextd kextcache(8)@/link</code>). | |
| 318 | * @discussion | |
| 319 | * The value is one of: | |
| 320 | * <ul> | |
| 321 | * <li>@link kOSBundleRequiredRoot "OSBundleRequiredRoot"@/link</li> | |
| 322 | * <li>@link kOSBundleRequiredLocalRoot "OSBundleRequiredLocalRoot"@/link</li> | |
| 323 | * <li>@link kOSBundleRequiredNetworkRoot "OSBundleRequiredNetworkRoot"@/link</li> | |
| 324 | * <li>@link kOSBundleRequiredSafeBoot "OSBundleRequiredSafeBoot"@/link</li> | |
| 325 | * <li>@link kOSBundleRequiredConsole "OSBundleRequiredConsole"@/link</li> | |
| 326 | * </ul> | |
| 327 | * | |
| 328 | * Use this property judiciously. | |
| 329 | * Every kext that declares a value other than "OSBundleRequiredSafeBoot" | |
| 330 | * increases startup time, as the booter must read it into memory, | |
| 331 | * or startup kext caches must include it. | |
| 332 | */ | |
| 333 | #define kOSBundleRequiredKey "OSBundleRequired" | |
| 334 | ||
| 335 | /*! | |
| 336 | * @define kOSBundleRequireExplicitLoadKey | |
| 337 | * @abstract A boolean value indicating whether the kext requires an | |
| 338 | * explicit kextload in order to start/match. | |
| 339 | */ | |
| 340 | #define kOSBundleRequireExplicitLoadKey "OSBundleRequireExplicitLoad" | |
| 341 | ||
| 342 | /*! | |
| 343 | * @define kOSBundleAllowUserLoadKey | |
| 344 | * @abstract A boolean value indicating whether | |
| 345 | * <code>@link //apple_ref/doc/man/8/kextd kextcache(8)@/link</code> | |
| 346 | * will honor a non-root process's request to load a kext. | |
| 347 | * @discussion | |
| 348 | * See <code>@link //apple_ref/doc/compositePage/c/func/KextManagerLoadKextWithURL | |
| 349 | * KextManagerLoadKextWithURL@/link</code> | |
| 350 | * and <code>@link //apple_ref/doc/compositePage/c/func/KextManagerLoadKextWithIdentifier | |
| 351 | * KextManagerLoadKextWithIdentifier@/link</code>. | |
| 352 | */ | |
| 353 | #define kOSBundleAllowUserLoadKey "OSBundleAllowUserLoad" | |
| 354 | ||
| 355 | /*! | |
| 356 | * @define kOSBundleAllowUserTerminateKey | |
| 357 | * @abstract A boolean value indicating whether the kextunload tool | |
| 358 | * is allowed to issue IOService terminate to classes defined in this kext. | |
| 359 | * @discussion A boolean value indicating whether the kextunload tool | |
| 360 | * is allowed to issue IOService terminate to classes defined in this kext. | |
| 361 | */ | |
| 362 | #define kOSBundleAllowUserTerminateKey "OSBundleAllowUserTerminate" | |
| 363 | ||
| 364 | /*! | |
| 365 | * @define kOSKernelResourceKey | |
| 366 | * @abstract A boolean value indicating whether the kext represents a built-in | |
| 367 | * component of the kernel. | |
| 368 | */ | |
| 369 | #define kOSKernelResourceKey "OSKernelResource" | |
| 370 | ||
| 371 | /*! | |
| 372 | * @define kOSKextVariantOverrideKey | |
| 373 | * @abstract A dictionary with target names as key and a target-specific variant | |
| 374 | * name as value. | |
| 375 | */ | |
| 376 | #define kOSKextVariantOverrideKey "OSKextVariantOverride" | |
| 377 | ||
| 378 | /*! | |
| 379 | * @define kIOKitPersonalitiesKey | |
| 380 | * @abstract A dictionary of dictionaries used in matching for I/O Kit drivers. | |
| 381 | */ | |
| 382 | #define kIOKitPersonalitiesKey "IOKitPersonalities" | |
| 383 | ||
| 384 | /* | |
| 385 | * @define kIOPersonalityPublisherKey | |
| 386 | * @abstract Used in personalities sent to the I/O Kit, | |
| 387 | * contains the CFBundleIdentifier of the kext | |
| 388 | * that the personality originated in. | |
| 389 | */ | |
| 390 | #define kIOPersonalityPublisherKey "IOPersonalityPublisher" | |
| 391 | ||
| 392 | #if CONFIG_KEC_FIPS | |
| 393 | /* | |
| 394 | * @define kAppleTextHashesKey | |
| 395 | * @abstract A dictionary conataining hashes for corecrypto kext. | |
| 396 | */ | |
| 397 | #define kAppleTextHashesKey "AppleTextHashes" | |
| 398 | #endif | |
| 399 | ||
| 400 | /*! | |
| 401 | * @define kOSMutableSegmentCopy | |
| 402 | * @abstract A boolean value indicating whether the kext requires a copy of | |
| 403 | * its mutable segments to be kept in memory, and then reset when the kext | |
| 404 | * unloads. This should be used with caution as it will increase the | |
| 405 | * amount of memory used by the kext. | |
| 406 | */ | |
| 407 | #define kOSMutableSegmentCopy "OSMutableSegmentCopy" | |
| 408 | ||
| 409 | ||
| 410 | #if PRAGMA_MARK | |
| 411 | /********************************************************************/ | |
| 412 | #pragma mark Kext/OSBundle Property Deprecated Keys | |
| 413 | /********************************************************************/ | |
| 414 | #endif | |
| 415 | /* | |
| 416 | * @define kOSBundleDebugLevelKey | |
| 417 | * @abstract | |
| 418 | * Deprecated (used on some releases of Mac OS X prior to 10.6 Snow Leopard). | |
| 419 | * Value is an integer from 1-6, corresponding to the verbose levels | |
| 420 | * of kext tools on those releases. | |
| 421 | * On 10.6 Snow Leopard, use <code>@link OSKextEnableKextLogging | |
| 422 | * OSKextEnableKextLogging@/link</code>. | |
| 423 | */ | |
| 424 | #define kOSBundleDebugLevelKey "OSBundleDebugLevel" | |
| 425 | ||
| 426 | /*! | |
| 427 | * @define kOSBundleSharedExecutableIdentifierKey | |
| 428 | * @abstract Deprecated (used on some releases of Mac OS X | |
| 429 | * prior to 10.6 Snow Leopard). | |
| 430 | * Value is the bundle identifier of the pseudokext | |
| 431 | * that contains an executable shared by this kext. | |
| 432 | */ | |
| 433 | #define kOSBundleSharedExecutableIdentifierKey "OSBundleSharedExecutableIdentifier" | |
| 434 | ||
| 435 | ||
| 436 | #if PRAGMA_MARK | |
| 437 | /********************************************************************/ | |
| 438 | #pragma mark Kext/OSBundle Property List Values | |
| 439 | /********************************************************************/ | |
| 440 | #endif | |
| 441 | ||
| 442 | /*! | |
| 443 | * @group Kext Property List Values | |
| 444 | * These constants encompass established values | |
| 445 | * for kernel extension bundle properties. | |
| 446 | */ | |
| 447 | ||
| 448 | /*! | |
| 449 | * @define kOSKextKernelIdentifier | |
| 450 | * @abstract | |
| 451 | * This is the CFBundleIdentifier user for the kernel itself. | |
| 452 | */ | |
| 453 | #define kOSKextKernelIdentifier "__kernel__" | |
| 454 | ||
| 455 | /*! | |
| 456 | * @define kOSKextBundlePackageTypeKext | |
| 457 | * @abstract | |
| 458 | * The bundle type value for Kernel Extensions. | |
| 459 | */ | |
| 460 | #define kOSKextBundlePackageTypeKext "KEXT" | |
| 461 | ||
| 462 | /*! | |
| 463 | * @define kOSKextBundlePackageTypeDriverKit | |
| 464 | * @abstract | |
| 465 | * The bundle type value for Driver Extensions. | |
| 466 | */ | |
| 467 | #define kOSKextBundlePackageTypeDriverKit "DEXT" | |
| 468 | ||
| 469 | /*! | |
| 470 | * @define kOSBundleRequiredRoot | |
| 471 | * @abstract | |
| 472 | * This <code>@link kOSBundleRequiredKey OSBundleRequired@/link</code> | |
| 473 | * value indicates that the kext may be needed to mount the root filesystem | |
| 474 | * whether starting from a local or a network volume. | |
| 475 | */ | |
| 476 | #define kOSBundleRequiredRoot "Root" | |
| 477 | ||
| 478 | /*! | |
| 479 | * @define kOSBundleRequiredLocalRoot | |
| 480 | * @abstract | |
| 481 | * This <code>@link kOSBundleRequiredKey OSBundleRequired@/link</code> | |
| 482 | * value indicates that the kext may be needed to mount the root filesystem | |
| 483 | * when starting from a local disk. | |
| 484 | */ | |
| 485 | #define kOSBundleRequiredLocalRoot "Local-Root" | |
| 486 | ||
| 487 | /*! | |
| 488 | * @define kOSBundleRequiredNetworkRoot | |
| 489 | * @abstract | |
| 490 | * This <code>@link kOSBundleRequiredKey OSBundleRequired@/link</code> | |
| 491 | * value indicates that the kext may be needed to mount the root filesystem | |
| 492 | * when starting over a network connection. | |
| 493 | */ | |
| 494 | #define kOSBundleRequiredNetworkRoot "Network-Root" | |
| 495 | ||
| 496 | /*! | |
| 497 | * @define kOSBundleRequiredSafeBoot | |
| 498 | * @abstract | |
| 499 | * This <code>@link kOSBundleRequiredKey OSBundleRequired@/link</code> | |
| 500 | * value indicates that the kext can be loaded during a safe startup. | |
| 501 | * This value does not normally cause the kext to be read by the booter | |
| 502 | * or included in startup kext caches. | |
| 503 | */ | |
| 504 | #define kOSBundleRequiredSafeBoot "Safe Boot" | |
| 505 | ||
| 506 | /*! | |
| 507 | * @define kOSBundleRequiredConsole | |
| 508 | * @abstract | |
| 509 | * This <code>@link kOSBundleRequiredKey OSBundleRequired@/link</code> | |
| 510 | * value indicates that the kext may be needed for console access | |
| 511 | * (specifically in a single-user startup when | |
| 512 | * <code>@link //apple_ref/doc/man/8/kextd kextd(8)@/link</code>. | |
| 513 | * does not run) | |
| 514 | * and should be loaded during early startup. | |
| 515 | */ | |
| 516 | #define kOSBundleRequiredConsole "Console" | |
| 517 | ||
| 518 | /*! | |
| 519 | * @define kOSBundleRequiredDriverKit | |
| 520 | * @abstract | |
| 521 | * This <code>@link kOSBundleRequiredKey OSBundleRequired@/link</code> | |
| 522 | * value indicates that the driver extension's (DriverKit driver's) | |
| 523 | * personalities must be present in the kernel at early boot (specifically | |
| 524 | * before <code>@link //apple_ref/doc/man/8/kextd kextd(8)@/link</code> starts) | |
| 525 | * in order to compete with kexts built into the prelinkedkernel. Note that | |
| 526 | * kextd is still required to launch the user space driver binary. The IOKit | |
| 527 | * matching will happen during early boot, and the actual driver launch | |
| 528 | * will happen after kextd starts. | |
| 529 | */ | |
| 530 | #define kOSBundleRequiredDriverKit "DriverKit" | |
| 531 | ||
| 532 | #if PRAGMA_MARK | |
| 533 | #pragma mark - | |
| 534 | /********************************************************************/ | |
| 535 | #pragma mark Kext Information | |
| 536 | /********************************************************************/ | |
| 537 | #endif | |
| 538 | /*! | |
| 539 | * @group Kext Information | |
| 540 | * Types, constants, and macros providing a kext with information | |
| 541 | * about itself. | |
| 542 | */ | |
| 543 | ||
| 544 | /*! | |
| 545 | * @typedef OSKextLoadTag | |
| 546 | * | |
| 547 | * @abstract | |
| 548 | * A unique identifier assigned to a loaded instanace of a kext. | |
| 549 | * | |
| 550 | * @discussion | |
| 551 | * If a kext is unloaded and later reloaded, the new instance | |
| 552 | * has a different load tag. | |
| 553 | * | |
| 554 | * A kext can get its own load tag in the <code>kmod_info_t</code> | |
| 555 | * structure passed into its module start routine, as the | |
| 556 | * <code>id</code> field (cast to this type). | |
| 557 | */ | |
| 558 | typedef uint32_t OSKextLoadTag; | |
| 559 | ||
| 560 | /*! | |
| 561 | * @define kOSKextInvalidLoadTag | |
| 562 | * | |
| 563 | * @abstract | |
| 564 | * A load tag value that will never be used for a loaded kext; | |
| 565 | * indicates kext not found. | |
| 566 | */ | |
| 567 | #define kOSKextInvalidLoadTag ((OSKextLoadTag)(-1)) | |
| 568 | ||
| 569 | ||
| 570 | __END_DECLS | |
| 571 | ||
| 572 | #endif /* _LIBKERN_OSKEXTLIB_H */ | |
| \ No newline at end of file |
lib/libc/include/any-macos.11-any/libproc.h created+187| ... | ... | @@ -0,0 +1,187 @@ |
| 1 | /* | |
| 2 | * Copyright (c) 2006, 2007, 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 | #ifndef _LIBPROC_H_ | |
| 24 | #define _LIBPROC_H_ | |
| 25 | ||
| 26 | #include <sys/cdefs.h> | |
| 27 | #include <sys/param.h> | |
| 28 | #include <sys/types.h> | |
| 29 | #include <sys/stat.h> | |
| 30 | #include <sys/mount.h> | |
| 31 | #include <sys/resource.h> | |
| 32 | #include <stdint.h> | |
| 33 | #include <stdbool.h> | |
| 34 | #include <mach/message.h> /* for audit_token_t */ | |
| 35 | ||
| 36 | #include <sys/proc_info.h> | |
| 37 | ||
| 38 | #include <Availability.h> | |
| 39 | #include <os/availability.h> | |
| 40 | ||
| 41 | /* | |
| 42 | * This header file contains private interfaces to obtain process information. | |
| 43 | * These interfaces are subject to change in future releases. | |
| 44 | */ | |
| 45 | ||
| 46 | /*! | |
| 47 | * @define PROC_LISTPIDSPATH_PATH_IS_VOLUME | |
| 48 | * @discussion This flag indicates that all processes that hold open | |
| 49 | * file references on the volume associated with the specified | |
| 50 | * path should be returned. | |
| 51 | */ | |
| 52 | #define PROC_LISTPIDSPATH_PATH_IS_VOLUME 1 | |
| 53 | ||
| 54 | ||
| 55 | /*! | |
| 56 | * @define PROC_LISTPIDSPATH_EXCLUDE_EVTONLY | |
| 57 | * @discussion This flag indicates that file references that were opened | |
| 58 | * with the O_EVTONLY flag should be excluded from the matching | |
| 59 | * criteria. | |
| 60 | */ | |
| 61 | #define PROC_LISTPIDSPATH_EXCLUDE_EVTONLY 2 | |
| 62 | ||
| 63 | __BEGIN_DECLS | |
| 64 | ||
| 65 | ||
| 66 | /*! | |
| 67 | * @function proc_listpidspath | |
| 68 | * @discussion A function which will search through the current | |
| 69 | * processes looking for open file references which match | |
| 70 | * a specified path or volume. | |
| 71 | * @param type types of processes to be searched (see proc_listpids) | |
| 72 | * @param typeinfo adjunct information for type | |
| 73 | * @param path file or volume path | |
| 74 | * @param pathflags flags to control which files should be considered | |
| 75 | * during the process search. | |
| 76 | * @param buffer a C array of int-sized values to be filled with | |
| 77 | * process identifiers that hold an open file reference | |
| 78 | * matching the specified path or volume. Pass NULL to | |
| 79 | * obtain the minimum buffer size needed to hold the | |
| 80 | * currently active processes. | |
| 81 | * @param buffersize the size (in bytes) of the provided buffer. | |
| 82 | * @result the number of bytes of data returned in the provided buffer; | |
| 83 | * -1 if an error was encountered; | |
| 84 | */ | |
| 85 | int proc_listpidspath(uint32_t type, | |
| 86 | uint32_t typeinfo, | |
| 87 | const char *path, | |
| 88 | uint32_t pathflags, | |
| 89 | void *buffer, | |
| 90 | int buffersize) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0); | |
| 91 | ||
| 92 | int proc_listpids(uint32_t type, uint32_t typeinfo, void *buffer, int buffersize) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0); | |
| 93 | int proc_listallpids(void * buffer, int buffersize) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_1); | |
| 94 | int proc_listpgrppids(pid_t pgrpid, void * buffer, int buffersize) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_1); | |
| 95 | int proc_listchildpids(pid_t ppid, void * buffer, int buffersize) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_1); | |
| 96 | int proc_pidinfo(int pid, int flavor, uint64_t arg, void *buffer, int buffersize) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0); | |
| 97 | int proc_pidfdinfo(int pid, int fd, int flavor, void * buffer, int buffersize) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0); | |
| 98 | int proc_pidfileportinfo(int pid, uint32_t fileport, int flavor, void *buffer, int buffersize) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3); | |
| 99 | int proc_name(int pid, void * buffer, uint32_t buffersize) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0); | |
| 100 | int proc_regionfilename(int pid, uint64_t address, void * buffer, uint32_t buffersize) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0); | |
| 101 | int proc_kmsgbuf(void * buffer, uint32_t buffersize) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0); | |
| 102 | int proc_pidpath(int pid, void * buffer, uint32_t buffersize) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0); | |
| 103 | int proc_pidpath_audittoken(audit_token_t *audittoken, void * buffer, uint32_t buffersize) API_AVAILABLE(macos(11.0), ios(14.0), watchos(7.0), tvos(14.0)); | |
| 104 | int proc_libversion(int *major, int * minor) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0); | |
| 105 | ||
| 106 | /* | |
| 107 | * Return resource usage information for the given pid, which can be a live process or a zombie. | |
| 108 | * | |
| 109 | * Returns 0 on success; or -1 on failure, with errno set to indicate the specific error. | |
| 110 | */ | |
| 111 | int proc_pid_rusage(int pid, int flavor, rusage_info_t *buffer) __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0); | |
| 112 | ||
| 113 | /* | |
| 114 | * A process can use the following api to set its own process control | |
| 115 | * state on resoure starvation. The argument can have one of the PROC_SETPC_XX values | |
| 116 | */ | |
| 117 | #define PROC_SETPC_NONE 0 | |
| 118 | #define PROC_SETPC_THROTTLEMEM 1 | |
| 119 | #define PROC_SETPC_SUSPEND 2 | |
| 120 | #define PROC_SETPC_TERMINATE 3 | |
| 121 | ||
| 122 | int proc_setpcontrol(const int control) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2); | |
| 123 | int proc_setpcontrol(const int control); | |
| 124 | ||
| 125 | int proc_track_dirty(pid_t pid, uint32_t flags); | |
| 126 | int proc_set_dirty(pid_t pid, bool dirty); | |
| 127 | int proc_get_dirty(pid_t pid, uint32_t *flags); | |
| 128 | int proc_clear_dirty(pid_t pid, uint32_t flags); | |
| 129 | ||
| 130 | int proc_terminate(pid_t pid, int *sig); | |
| 131 | ||
| 132 | /* | |
| 133 | * NO_SMT means that on an SMT CPU, this thread must be scheduled alone, | |
| 134 | * with the paired CPU idle. | |
| 135 | * | |
| 136 | * Set NO_SMT on the current proc (all existing and future threads) | |
| 137 | * This attribute is inherited on fork and exec | |
| 138 | */ | |
| 139 | int proc_set_no_smt(void) __API_AVAILABLE(macos(11.0)); | |
| 140 | ||
| 141 | /* Set NO_SMT on the current thread */ | |
| 142 | int proc_setthread_no_smt(void) __API_AVAILABLE(macos(11.0)); | |
| 143 | ||
| 144 | /* | |
| 145 | * CPU Security Mitigation APIs | |
| 146 | * | |
| 147 | * Set CPU security mitigation on the current proc (all existing and future threads) | |
| 148 | * This attribute is inherited on fork and exec | |
| 149 | */ | |
| 150 | int proc_set_csm(uint32_t flags) __API_AVAILABLE(macos(11.0)); | |
| 151 | ||
| 152 | /* Set CPU security mitigation on the current thread */ | |
| 153 | int proc_setthread_csm(uint32_t flags) __API_AVAILABLE(macos(11.0)); | |
| 154 | ||
| 155 | /* | |
| 156 | * flags for CPU Security Mitigation APIs | |
| 157 | * PROC_CSM_ALL should be used in most cases, | |
| 158 | * the individual flags are provided only for performance evaluation etc | |
| 159 | */ | |
| 160 | #define PROC_CSM_ALL 0x0001 /* Set all available mitigations */ | |
| 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 */ | |
| 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); | |
| 184 | ||
| 185 | __END_DECLS | |
| 186 | ||
| 187 | #endif /*_LIBPROC_H_ */ | |
| \ No newline at end of file |
lib/libc/include/any-macos.11-any/mach-o/loader.h-4| ... | ... | @@ -1274,8 +1274,6 @@ struct build_tool_version { |
| 1274 | 1274 | #define PLATFORM_WATCHOSSIMULATOR 9 |
| 1275 | 1275 | #define PLATFORM_DRIVERKIT 10 |
| 1276 | 1276 | |
| 1277 | ||
| 1278 | ||
| 1279 | 1277 | /* Known values for the tool field above. */ |
| 1280 | 1278 | #define TOOL_CLANG 1 |
| 1281 | 1279 | #define TOOL_SWIFT 2 |
| ... | ... | @@ -1458,8 +1456,6 @@ struct dyld_info_command { |
| 1458 | 1456 | #define EXPORT_SYMBOL_FLAGS_WEAK_DEFINITION			0x04 |
| 1459 | 1457 | #define EXPORT_SYMBOL_FLAGS_REEXPORT				0x08 |
| 1460 | 1458 | #define EXPORT_SYMBOL_FLAGS_STUB_AND_RESOLVER			0x10 |
| 1461 | #define EXPORT_SYMBOL_FLAGS_STATIC_RESOLVER			0x20 | |
| 1462 | ||
| 1463 | 1459 | |
| 1464 | 1460 | /* |
| 1465 | 1461 | * The linker_option_command contains linker options embedded in object files. |
lib/libc/include/any-macos.11-any/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/any-macos.11-any/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/any-macos.11-any/mach/exception_types.h created+206| ... | ... | @@ -0,0 +1,206 @@ |
| 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/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/any-macos.11-any/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/any-macos.11-any/mach/kern_return.h created+342| ... | ... | @@ -0,0 +1,342 @@ |
| 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/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/any-macos.11-any/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/any-macos.11-any/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/any-macos.11-any/mach/mach_init.h+2| ... | ... | @@ -64,7 +64,9 @@ |
| 64 | 64 | |
| 65 | 65 | #include <sys/cdefs.h> |
| 66 | 66 | |
| 67 | #ifndef KERNEL | |
| 67 | 68 | #include <Availability.h> |
| 69 | #endif | |
| 68 | 70 | |
| 69 | 71 | /* |
| 70 | 72 | *	Kernel-related ports; how a task/thread controls itself |
lib/libc/include/any-macos.11-any/mach/mach_port.h created+1808| ... | ... | @@ -0,0 +1,1808 @@ |
| 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,7 +218,6 @@ typedef exception_handler_t exception_port_t; |
| 218 | 218 | typedef exception_handler_array_t exception_port_arrary_t; |
| 219 | 219 | typedef char vfs_path_t[4096]; |
| 220 | 220 | typedef char nspace_path_t[1024]; /* 1024 == PATH_MAX */ |
| 221 | typedef char nspace_name_t[1024]; /* 1024 == PATH_MAX */ | |
| 222 | 221 | typedef char suid_cred_path_t[1024]; |
| 223 | 222 | typedef uint32_t suid_cred_uid_t; |
| 224 | 223 | |
| ... | ... | @@ -262,16 +261,12 @@ typedef unsigned int mach_task_flavor_t; |
| 262 | 261 | #define TASK_FLAVOR_INSPECT 2 /* a task_inspect_t */ |
| 263 | 262 | #define TASK_FLAVOR_NAME 3 /* a task_name_t */ |
| 264 | 263 | |
| 265 | #define TASK_FLAVOR_MAX TASK_FLAVOR_NAME | |
| 266 | ||
| 267 | 264 | /* capability strictly _DECREASING_ */ |
| 268 | 265 | typedef unsigned int mach_thread_flavor_t; |
| 269 | 266 | #define THREAD_FLAVOR_CONTROL 0 /* a thread_t */ |
| 270 | 267 | #define THREAD_FLAVOR_READ 1 /* a thread_read_t */ |
| 271 | 268 | #define THREAD_FLAVOR_INSPECT 2 /* a thread_inspect_t */ |
| 272 | 269 | |
| 273 | #define THREAD_FLAVOR_MAX THREAD_FLAVOR_INSPECT | |
| 274 | ||
| 275 | 270 | /* DEPRECATED */ |
| 276 | 271 | typedef natural_t ledger_item_t; |
| 277 | 272 | #define LEDGER_ITEM_INFINITY ((ledger_item_t) (~0)) |
lib/libc/include/any-macos.11-any/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/any-macos.11-any/mach/machine.h created+409| ... | ... | @@ -0,0 +1,409 @@ |
| 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 created+40| ... | ... | @@ -0,0 +1,40 @@ |
| 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 created+908| ... | ... | @@ -0,0 +1,908 @@ |
| 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/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/any-macos.11-any/mach/port.h created+445| ... | ... | @@ -0,0 +1,445 @@ |
| 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.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/any-macos.11-any/mach/processor_set.h created+585| ... | ... | @@ -0,0 +1,585 @@ |
| 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/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/any-macos.11-any/mach/task.h+48-106| ... | ... | @@ -49,10 +49,9 @@ typedef function_table_entry *function_table_t; |
| 49 | 49 | #endif /* AUTOTEST */ |
| 50 | 50 | |
| 51 | 51 | #ifndef	task_MSG_COUNT |
| 52 | #define	task_MSG_COUNT	63 | |
| 52 | #define	task_MSG_COUNT	61 | |
| 53 | 53 | #endif	/* task_MSG_COUNT */ |
| 54 | 54 | |
| 55 | #include <Availability.h> | |
| 56 | 55 | #include <mach/std_types.h> |
| 57 | 56 | #include <mach/mig.h> |
| 58 | 57 | #include <mach/mig.h> |
| ... | ... | @@ -112,7 +111,8 @@ mig_external |
| 112 | 111 | #else |
| 113 | 112 | extern |
| 114 | 113 | #endif	/* mig_external */ |
| 115 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED | |
| 114 | __WATCHOS_PROHIBITED | |
| 115 | __TVOS_PROHIBITED | |
| 116 | 116 | kern_return_t mach_ports_register |
| 117 | 117 | ( |
| 118 | 118 | 	task_t target_task, |
| ... | ... | @@ -126,7 +126,8 @@ mig_external |
| 126 | 126 | #else |
| 127 | 127 | extern |
| 128 | 128 | #endif	/* mig_external */ |
| 129 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED | |
| 129 | __WATCHOS_PROHIBITED | |
| 130 | __TVOS_PROHIBITED | |
| 130 | 131 | kern_return_t mach_ports_lookup |
| 131 | 132 | ( |
| 132 | 133 | 	task_t target_task, |
| ... | ... | @@ -154,7 +155,8 @@ mig_external |
| 154 | 155 | #else |
| 155 | 156 | extern |
| 156 | 157 | #endif	/* mig_external */ |
| 157 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED | |
| 158 | __WATCHOS_PROHIBITED | |
| 159 | __TVOS_PROHIBITED | |
| 158 | 160 | kern_return_t task_set_info |
| 159 | 161 | ( |
| 160 | 162 | 	task_t target_task, |
| ... | ... | @@ -169,7 +171,8 @@ mig_external |
| 169 | 171 | #else |
| 170 | 172 | extern |
| 171 | 173 | #endif	/* mig_external */ |
| 172 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED | |
| 174 | __WATCHOS_PROHIBITED | |
| 175 | __TVOS_PROHIBITED | |
| 173 | 176 | kern_return_t task_suspend |
| 174 | 177 | ( |
| 175 | 178 | 	task_read_t target_task |
| ... | ... | @@ -181,7 +184,8 @@ mig_external |
| 181 | 184 | #else |
| 182 | 185 | extern |
| 183 | 186 | #endif	/* mig_external */ |
| 184 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED | |
| 187 | __WATCHOS_PROHIBITED | |
| 188 | __TVOS_PROHIBITED | |
| 185 | 189 | kern_return_t task_resume |
| 186 | 190 | ( |
| 187 | 191 | 	task_read_t target_task |
| ... | ... | @@ -193,7 +197,8 @@ mig_external |
| 193 | 197 | #else |
| 194 | 198 | extern |
| 195 | 199 | #endif	/* mig_external */ |
| 196 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED | |
| 200 | __WATCHOS_PROHIBITED | |
| 201 | __TVOS_PROHIBITED | |
| 197 | 202 | kern_return_t task_get_special_port |
| 198 | 203 | ( |
| 199 | 204 | 	task_inspect_t task, |
| ... | ... | @@ -207,7 +212,8 @@ mig_external |
| 207 | 212 | #else |
| 208 | 213 | extern |
| 209 | 214 | #endif	/* mig_external */ |
| 210 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED | |
| 215 | __WATCHOS_PROHIBITED | |
| 216 | __TVOS_PROHIBITED | |
| 211 | 217 | kern_return_t task_set_special_port |
| 212 | 218 | ( |
| 213 | 219 | 	task_t task, |
| ... | ... | @@ -221,7 +227,8 @@ mig_external |
| 221 | 227 | #else |
| 222 | 228 | extern |
| 223 | 229 | #endif	/* mig_external */ |
| 224 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED | |
| 230 | __WATCHOS_PROHIBITED | |
| 231 | __TVOS_PROHIBITED | |
| 225 | 232 | kern_return_t thread_create |
| 226 | 233 | ( |
| 227 | 234 | 	task_t parent_task, |
| ... | ... | @@ -234,7 +241,8 @@ mig_external |
| 234 | 241 | #else |
| 235 | 242 | extern |
| 236 | 243 | #endif	/* mig_external */ |
| 237 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED | |
| 244 | __WATCHOS_PROHIBITED | |
| 245 | __TVOS_PROHIBITED | |
| 238 | 246 | kern_return_t thread_create_running |
| 239 | 247 | ( |
| 240 | 248 | 	task_t parent_task, |
| ... | ... | @@ -250,7 +258,8 @@ mig_external |
| 250 | 258 | #else |
| 251 | 259 | extern |
| 252 | 260 | #endif	/* mig_external */ |
| 253 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED | |
| 261 | __WATCHOS_PROHIBITED | |
| 262 | __TVOS_PROHIBITED | |
| 254 | 263 | kern_return_t task_set_exception_ports |
| 255 | 264 | ( |
| 256 | 265 | 	task_t task, |
| ... | ... | @@ -266,7 +275,8 @@ mig_external |
| 266 | 275 | #else |
| 267 | 276 | extern |
| 268 | 277 | #endif	/* mig_external */ |
| 269 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED | |
| 278 | __WATCHOS_PROHIBITED | |
| 279 | __TVOS_PROHIBITED | |
| 270 | 280 | kern_return_t task_get_exception_ports |
| 271 | 281 | ( |
| 272 | 282 | 	task_t task, |
| ... | ... | @@ -284,7 +294,8 @@ mig_external |
| 284 | 294 | #else |
| 285 | 295 | extern |
| 286 | 296 | #endif	/* mig_external */ |
| 287 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED | |
| 297 | __WATCHOS_PROHIBITED | |
| 298 | __TVOS_PROHIBITED | |
| 288 | 299 | kern_return_t task_swap_exception_ports |
| 289 | 300 | ( |
| 290 | 301 | 	task_t task, |
| ... | ... | @@ -357,7 +368,8 @@ mig_external |
| 357 | 368 | #else |
| 358 | 369 | extern |
| 359 | 370 | #endif	/* mig_external */ |
| 360 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED | |
| 371 | __WATCHOS_PROHIBITED | |
| 372 | __TVOS_PROHIBITED | |
| 361 | 373 | kern_return_t task_policy_set |
| 362 | 374 | ( |
| 363 | 375 | 	task_policy_set_t task, |
| ... | ... | @@ -372,7 +384,8 @@ mig_external |
| 372 | 384 | #else |
| 373 | 385 | extern |
| 374 | 386 | #endif	/* mig_external */ |
| 375 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED | |
| 387 | __WATCHOS_PROHIBITED | |
| 388 | __TVOS_PROHIBITED | |
| 376 | 389 | kern_return_t task_policy_get |
| 377 | 390 | ( |
| 378 | 391 | 	task_policy_get_t task, |
| ... | ... | @@ -470,7 +483,8 @@ mig_external |
| 470 | 483 | #else |
| 471 | 484 | extern |
| 472 | 485 | #endif	/* mig_external */ |
| 473 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED | |
| 486 | __WATCHOS_PROHIBITED | |
| 487 | __TVOS_PROHIBITED | |
| 474 | 488 | kern_return_t task_zone_info |
| 475 | 489 | ( |
| 476 | 490 | 	task_inspect_t target_task, |
| ... | ... | @@ -541,7 +555,8 @@ mig_external |
| 541 | 555 | #else |
| 542 | 556 | extern |
| 543 | 557 | #endif	/* mig_external */ |
| 544 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED | |
| 558 | __WATCHOS_PROHIBITED | |
| 559 | __TVOS_PROHIBITED | |
| 545 | 560 | kern_return_t task_get_state |
| 546 | 561 | ( |
| 547 | 562 | 	task_read_t task, |
| ... | ... | @@ -556,7 +571,8 @@ mig_external |
| 556 | 571 | #else |
| 557 | 572 | extern |
| 558 | 573 | #endif	/* mig_external */ |
| 559 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED | |
| 574 | __WATCHOS_PROHIBITED | |
| 575 | __TVOS_PROHIBITED | |
| 560 | 576 | kern_return_t task_set_state |
| 561 | 577 | ( |
| 562 | 578 | 	task_t task, |
| ... | ... | @@ -571,7 +587,8 @@ mig_external |
| 571 | 587 | #else |
| 572 | 588 | extern |
| 573 | 589 | #endif	/* mig_external */ |
| 574 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED | |
| 590 | __WATCHOS_PROHIBITED | |
| 591 | __TVOS_PROHIBITED | |
| 575 | 592 | kern_return_t task_set_phys_footprint_limit |
| 576 | 593 | ( |
| 577 | 594 | 	task_t task, |
| ... | ... | @@ -585,7 +602,8 @@ mig_external |
| 585 | 602 | #else |
| 586 | 603 | extern |
| 587 | 604 | #endif	/* mig_external */ |
| 588 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED | |
| 605 | __WATCHOS_PROHIBITED | |
| 606 | __TVOS_PROHIBITED | |
| 589 | 607 | kern_return_t task_suspend2 |
| 590 | 608 | ( |
| 591 | 609 | 	task_read_t target_task, |
| ... | ... | @@ -598,7 +616,8 @@ mig_external |
| 598 | 616 | #else |
| 599 | 617 | extern |
| 600 | 618 | #endif	/* mig_external */ |
| 601 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED | |
| 619 | __WATCHOS_PROHIBITED | |
| 620 | __TVOS_PROHIBITED | |
| 602 | 621 | kern_return_t task_resume2 |
| 603 | 622 | ( |
| 604 | 623 | 	task_suspension_token_t suspend_token |
| ... | ... | @@ -622,7 +641,8 @@ mig_external |
| 622 | 641 | #else |
| 623 | 642 | extern |
| 624 | 643 | #endif	/* mig_external */ |
| 625 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED | |
| 644 | __WATCHOS_PROHIBITED | |
| 645 | __TVOS_PROHIBITED | |
| 626 | 646 | kern_return_t task_get_mach_voucher |
| 627 | 647 | ( |
| 628 | 648 | 	task_read_t task, |
| ... | ... | @@ -636,7 +656,8 @@ mig_external |
| 636 | 656 | #else |
| 637 | 657 | extern |
| 638 | 658 | #endif	/* mig_external */ |
| 639 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED | |
| 659 | __WATCHOS_PROHIBITED | |
| 660 | __TVOS_PROHIBITED | |
| 640 | 661 | kern_return_t task_set_mach_voucher |
| 641 | 662 | ( |
| 642 | 663 | 	task_t task, |
| ... | ... | @@ -649,7 +670,8 @@ mig_external |
| 649 | 670 | #else |
| 650 | 671 | extern |
| 651 | 672 | #endif	/* mig_external */ |
| 652 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED | |
| 673 | __WATCHOS_PROHIBITED | |
| 674 | __TVOS_PROHIBITED | |
| 653 | 675 | kern_return_t task_swap_mach_voucher |
| 654 | 676 | ( |
| 655 | 677 | 	task_t task, |
| ... | ... | @@ -892,30 +914,6 @@ kern_return_t task_get_exception_ports_info |
| 892 | 914 | 	exception_flavor_array_t old_flavors |
| 893 | 915 | ); |
| 894 | 916 | |
| 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 | ||
| 919 | 917 | __END_DECLS |
| 920 | 918 | |
| 921 | 919 | /********************** Caution **************************/ |
| ... | ... | @@ -1714,32 +1712,6 @@ __END_DECLS |
| 1714 | 1712 | #ifdef __MigPackStructs |
| 1715 | 1713 | #pragma pack(pop) |
| 1716 | 1714 | #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 | |
| 1743 | 1715 | #endif /* !__Request__task_subsystem__defined */ |
| 1744 | 1716 | |
| 1745 | 1717 | /* union of all requests */ |
| ... | ... | @@ -1807,8 +1779,6 @@ union __RequestUnion__task_subsystem { |
| 1807 | 1779 | 	__Request__task_identity_token_get_task_port_t Request_task_identity_token_get_task_port; |
| 1808 | 1780 | 	__Request__task_dyld_process_info_notify_deregister_t Request_task_dyld_process_info_notify_deregister; |
| 1809 | 1781 | 	__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; | |
| 1812 | 1782 | }; |
| 1813 | 1783 | #endif /* !__RequestUnion__task_subsystem__defined */ |
| 1814 | 1784 | /* typedefs for all replies */ |
| ... | ... | @@ -2622,30 +2592,6 @@ union __RequestUnion__task_subsystem { |
| 2622 | 2592 | #ifdef __MigPackStructs |
| 2623 | 2593 | #pragma pack(pop) |
| 2624 | 2594 | #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 | |
| 2649 | 2595 | #endif /* !__Reply__task_subsystem__defined */ |
| 2650 | 2596 | |
| 2651 | 2597 | /* union of all replies */ |
| ... | ... | @@ -2713,8 +2659,6 @@ union __ReplyUnion__task_subsystem { |
| 2713 | 2659 | 	__Reply__task_identity_token_get_task_port_t Reply_task_identity_token_get_task_port; |
| 2714 | 2660 | 	__Reply__task_dyld_process_info_notify_deregister_t Reply_task_dyld_process_info_notify_deregister; |
| 2715 | 2661 | 	__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; | |
| 2718 | 2662 | }; |
| 2719 | 2663 | #endif /* !__RequestUnion__task_subsystem__defined */ |
| 2720 | 2664 | |
| ... | ... | @@ -2779,9 +2723,7 @@ union __ReplyUnion__task_subsystem { |
| 2779 | 2723 | { "task_create_identity_token", 3457 },\ |
| 2780 | 2724 | { "task_identity_token_get_task_port", 3458 },\ |
| 2781 | 2725 | { "task_dyld_process_info_notify_deregister", 3459 },\ |
| 2782 | { "task_get_exception_ports_info", 3460 },\ | |
| 2783 | { "task_test_sync_upcall", 3461 },\ | |
| 2784 | { "task_set_corpse_forking_behavior", 3462 } | |
| 2726 | { "task_get_exception_ports_info", 3460 } | |
| 2785 | 2727 | #endif |
| 2786 | 2728 | |
| 2787 | 2729 | #ifdef __AfterMigUserHeader |
lib/libc/include/any-macos.11-any/mach/task_info.h-10| ... | ... | @@ -494,7 +494,6 @@ typedef struct task_flags_info * task_flags_info_t; |
| 494 | 494 | typedef uint32_t task_exc_guard_behavior_t; |
| 495 | 495 | |
| 496 | 496 | /* EXC_GUARD optional delivery settings on a per-task basis */ |
| 497 | #define TASK_EXC_GUARD_NONE 0x00 | |
| 498 | 497 | #define TASK_EXC_GUARD_VM_DELIVER 0x01 /* Deliver virtual memory EXC_GUARD exceptions */ |
| 499 | 498 | #define TASK_EXC_GUARD_VM_ONCE 0x02 /* Deliver them only once */ |
| 500 | 499 | #define TASK_EXC_GUARD_VM_CORPSE 0x04 /* Deliver them via a forked corpse */ |
| ... | ... | @@ -510,15 +509,6 @@ typedef uint32_t task_exc_guard_behavior_t; |
| 510 | 509 | #define TASK_EXC_GUARD_ALL 0xff /* All optional deliver settings */ |
| 511 | 510 | |
| 512 | 511 | |
| 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 | ||
| 522 | 512 | /* |
| 523 | 513 | * Obsolete interfaces. |
| 524 | 514 | */ |
lib/libc/include/any-macos.11-any/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/any-macos.11-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 | #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 created+1435| ... | ... | @@ -0,0 +1,1435 @@ |
| 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/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/any-macos.11-any/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/any-macos.11-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 <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 created+153| ... | ... | @@ -0,0 +1,153 @@ |
| 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 created+552| ... | ... | @@ -0,0 +1,552 @@ |
| 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 created+97| ... | ... | @@ -0,0 +1,97 @@ |
| 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/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/any-macos.11-any/machine/_mcontext.h created+34| ... | ... | @@ -0,0 +1,34 @@ |
| 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 created+34| ... | ... | @@ -0,0 +1,34 @@ |
| 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 created+11| ... | ... | @@ -0,0 +1,11 @@ |
| 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 created+314| ... | ... | @@ -0,0 +1,314 @@ |
| 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+7-6| ... | ... | @@ -63,24 +63,21 @@ |
| 63 | 63 | #ifndef _NET_IF_H_ |
| 64 | 64 | #define _NET_IF_H_ |
| 65 | 65 | |
| 66 | #include <sys/cdefs.h> | |
| 67 | #include <net/net_kev.h> | |
| 68 | ||
| 66 | 69 | #define IF_NAMESIZE 16 |
| 67 | 70 | |
| 68 | 71 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) |
| 69 | #include <sys/cdefs.h> | |
| 70 | 72 | #include <sys/appleapiopts.h> |
| 71 | 73 | #ifdef __APPLE__ |
| 72 | 74 | |
| 73 | 75 | #include <net/if_var.h> |
| 74 | #include <net/net_kev.h> | |
| 75 | 76 | #include <sys/types.h> |
| 76 | 77 | #include <sys/socket.h> |
| 77 | 78 | |
| 78 | 79 | #endif |
| 79 | 80 | |
| 80 | #ifndef IFNAMSIZ | |
| 81 | #define IFNAMSIZ IF_NAMESIZE | |
| 82 | #endif | |
| 83 | ||
| 84 | 81 | struct if_clonereq { |
| 85 | 82 | 	int ifcr_total; /* total cloners (out) */ |
| 86 | 83 | 	int ifcr_count; /* room for this many in user buffer */ |
| ... | ... | @@ -288,6 +285,9 @@ struct ifkpi { |
| 288 | 285 | * remainder may be interface specific. |
| 289 | 286 | */ |
| 290 | 287 | struct ifreq { |
| 288 | #ifndef IFNAMSIZ | |
| 289 | #define IFNAMSIZ IF_NAMESIZE | |
| 290 | #endif | |
| 291 | 291 | 	char ifr_name[IFNAMSIZ]; /* if name, e.g. "en0" */ |
| 292 | 292 | 	union { |
| 293 | 293 | 		struct sockaddr ifru_addr; |
| ... | ... | @@ -371,6 +371,7 @@ struct ifmediareq { |
| 371 | 371 | #pragma pack() |
| 372 | 372 | |
| 373 | 373 | |
| 374 | ||
| 374 | 375 | #pragma pack(4) |
| 375 | 376 | struct ifdrv { |
| 376 | 377 | 	char ifd_name[IFNAMSIZ]; /* if name, e.g. "en0" */ |
lib/libc/include/any-macos.11-any/net/if_var.h+1-119| ... | ... | @@ -1,5 +1,5 @@ |
| 1 | 1 | /* |
| 2 | * Copyright (c) 2000-2021 Apple Inc. All rights reserved. | |
| 2 | * Copyright (c) 2000-2020 Apple Inc. All rights reserved. | |
| 3 | 3 | * |
| 4 | 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ |
| 5 | 5 | * |
| ... | ... | @@ -222,124 +222,6 @@ 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 | ||
| 343 | 225 | #pragma pack() |
| 344 | 226 | |
| 345 | 227 | /* |
lib/libc/include/any-macos.11-any/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/any-macos.11-any/netinet6/in6.h created+681| ... | ... | @@ -0,0 +1,681 @@ |
| 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/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/any-macos.11-any/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/any-macos.11-any/objc/objc-api.h created+304| ... | ... | @@ -0,0 +1,304 @@ |
| 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,6 +52,24 @@ typedef struct objc_category *Category; |
| 52 | 52 | /// An opaque type that represents an Objective-C declared property. |
| 53 | 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 | ||
| 55 | 73 | #endif |
| 56 | 74 | |
| 57 | 75 | #ifdef __OBJC__ |
| ... | ... | @@ -1859,8 +1877,154 @@ _objc_realizeClassFromSwift(Class _Nullable cls, void * _Nullable previously) |
| 1859 | 1877 | #define _C_VECTOR '!' |
| 1860 | 1878 | #define _C_CONST 'r' |
| 1861 | 1879 | |
| 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 | ||
| 1862 | 2023 | struct objc_method_list; |
| 1863 | 2024 | |
| 2025 | #endif | |
| 2026 | ||
| 2027 | ||
| 1864 | 2028 | /* Obsolete functions */ |
| 1865 | 2029 | |
| 1866 | 2030 | OBJC_EXPORT IMP _Nullable |
| ... | ... | @@ -1893,9 +2057,108 @@ OBJC_EXPORT id _Nullable |
| 1893 | 2057 | object_copyFromZone(id _Nullable anObject, size_t nBytes, void * _Nullable z) |
| 1894 | 2058 | OBJC_OSX_DEPRECATED_OTHERS_UNAVAILABLE(10.0, 10.5, "use object_copy instead"); |
| 1895 | 2059 | |
| 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 | ||
| 1896 | 2085 | OBJC_EXPORT id _Nullable |
| 1897 | 2086 | class_createInstanceFromZone(Class _Nullable, size_t idxIvars, |
| 1898 | 2087 | void * _Nullable z) |
| 1899 | 2088 | OBJC_OSX_DEPRECATED_OTHERS_UNAVAILABLE(10.0, 10.5, "use class_createInstance instead"); |
| 1900 | 2089 | |
| 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 | ||
| 1901 | 2164 | #endif |
| \ No newline at end of file |
lib/libc/include/any-macos.11-any/os/base.h created+322| ... | ... | @@ -0,0 +1,322 @@ |
| 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 created+592| ... | ... | @@ -0,0 +1,592 @@ |
| 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/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/any-macos.11-any/simd/common.h created+4458| ... | ... | @@ -0,0 +1,4458 @@ |
| 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 created+1966| ... | ... | @@ -0,0 +1,1966 @@ |
| 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 created+5380| ... | ... | @@ -0,0 +1,5380 @@ |
| 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/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/any-macos.11-any/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/any-macos.11-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 = 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/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/any-macos.11-any/stdio.h created+410| ... | ... | @@ -0,0 +1,410 @@ |
| 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 created+373| ... | ... | @@ -0,0 +1,373 @@ |
| 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,24 +341,6 @@ |
| 341 | 341 | #define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_14_5(x) |
| 342 | 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 | ||
| 362 | 344 | #if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1000 |
| 363 | 345 | #define __DARWIN_ALIAS_STARTING_MAC___MAC_10_0(x) x |
| 364 | 346 | #else |
| ... | ... | @@ -573,16 +555,4 @@ |
| 573 | 555 | #define __DARWIN_ALIAS_STARTING_MAC___MAC_11_3(x) x |
| 574 | 556 | #else |
| 575 | 557 | #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) | |
| 588 | 558 | #endif |
| \ No newline at end of file |
lib/libc/include/any-macos.11-any/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/any-macos.11-any/sys/attr.h+1-6| ... | ... | @@ -83,7 +83,6 @@ struct attrlist { |
| 83 | 83 | 	attrgroup_t fileattr; /* file attribute group */ |
| 84 | 84 | 	attrgroup_t forkattr; /* fork attribute group */ |
| 85 | 85 | }; |
| 86 | ||
| 87 | 86 | #define ATTR_BIT_MAP_COUNT 5 |
| 88 | 87 | |
| 89 | 88 | typedef struct attribute_set { |
| ... | ... | @@ -94,9 +93,6 @@ typedef struct attribute_set { |
| 94 | 93 | 	attrgroup_t forkattr; /* fork attribute group */ |
| 95 | 94 | } attribute_set_t; |
| 96 | 95 | |
| 97 | #define ATTRIBUTE_SET_INIT(a) do {(a)->commonattr = (a)->volattr = (a)->dirattr = (a)->fileattr = (a)->forkattr = 0; } while(0) | |
| 98 | ||
| 99 | ||
| 100 | 96 | typedef struct attrreference { |
| 101 | 97 | 	int32_t attr_dataoffset; |
| 102 | 98 | 	u_int32_t attr_length; |
| ... | ... | @@ -467,13 +463,12 @@ typedef struct vol_attributes_attr { |
| 467 | 463 | #define ATTR_VOL_ENCODINGSUSED 0x00010000 |
| 468 | 464 | #define ATTR_VOL_CAPABILITIES 0x00020000 |
| 469 | 465 | #define ATTR_VOL_UUID 0x00040000 |
| 470 | #define ATTR_VOL_SPACEUSED 0x00800000 | |
| 471 | 466 | #define ATTR_VOL_QUOTA_SIZE 0x10000000 |
| 472 | 467 | #define ATTR_VOL_RESERVED_SIZE 0x20000000 |
| 473 | 468 | #define ATTR_VOL_ATTRIBUTES 0x40000000 |
| 474 | 469 | #define ATTR_VOL_INFO 0x80000000 |
| 475 | 470 | |
| 476 | #define ATTR_VOL_VALIDMASK 0xF087FFFF | |
| 471 | #define ATTR_VOL_VALIDMASK 0xF007FFFF | |
| 477 | 472 | |
| 478 | 473 | /* |
| 479 | 474 | * The list of settable ATTR_VOL_* attributes include the following: |
lib/libc/include/any-macos.11-any/sys/cdefs.h+3-19| ... | ... | @@ -152,16 +152,8 @@ |
| 152 | 152 | #endif /* !NO_ANSI_KEYWORDS */ |
| 153 | 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 | */ | |
| 162 | 155 | #define __dead2 __attribute__((__noreturn__)) |
| 163 | 156 | #define __pure2 __attribute__((__const__)) |
| 164 | #define __stateful_pure __attribute__((__pure__)) | |
| 165 | 157 | |
| 166 | 158 | /* __unused denotes variables and functions that may not be used, preventing |
| 167 | 159 | * the compiler from warning about it if not used. |
| ... | ... | @@ -187,9 +179,9 @@ |
| 187 | 179 | * __exported_push/_exported_pop are pragmas used to delimit a range of |
| 188 | 180 | * symbols that should be exported even when symbols are hidden by default. |
| 189 | 181 | */ |
| 190 | #define __exported __attribute__((__visibility__("default"))) | |
| 191 | #define __exported_push _Pragma("GCC visibility push(default)") | |
| 192 | #define __exported_pop _Pragma("GCC visibility pop") | |
| 182 | #define __exported __attribute__((__visibility__("default"))) | |
| 183 | #define __exported_push _Pragma("GCC visibility push(default)") | |
| 184 | #define __exported_pop _Pragma("GCC visibility pop") | |
| 193 | 185 | |
| 194 | 186 | /* __deprecated causes the compiler to produce a warning when encountering |
| 195 | 187 | * code using the deprecated functionality. |
| ... | ... | @@ -825,7 +817,6 @@ |
| 825 | 817 | #define __XNU_PRIVATE_EXTERN __attribute__((visibility("hidden"))) |
| 826 | 818 | #endif |
| 827 | 819 | |
| 828 | ||
| 829 | 820 | /* |
| 830 | 821 | * Architecture validation for current SDK |
| 831 | 822 | */ |
| ... | ... | @@ -882,11 +873,4 @@ |
| 882 | 873 | 	 typedef _type _name; enum __VA_ARGS__ __enum_closed __enum_options |
| 883 | 874 | #endif |
| 884 | 875 | |
| 885 | ||
| 886 | ||
| 887 | #define __kernel_ptr_semantics | |
| 888 | #define __kernel_data_semantics | |
| 889 | #define __kernel_dual_semantics | |
| 890 | ||
| 891 | ||
| 892 | 876 | #endif /* !_CDEFS_H_ */ |
| \ No newline at end of file |
lib/libc/include/any-macos.11-any/sys/event.h+3-2| ... | ... | @@ -58,9 +58,7 @@ |
| 58 | 58 | |
| 59 | 59 | #include <machine/types.h> |
| 60 | 60 | #include <sys/cdefs.h> |
| 61 | #include <sys/queue.h> | |
| 62 | 61 | #include <stdint.h> |
| 63 | #include <sys/types.h> | |
| 64 | 62 | |
| 65 | 63 | /* |
| 66 | 64 | * Filter types |
| ... | ... | @@ -368,10 +366,13 @@ enum { |
| 368 | 366 | |
| 369 | 367 | |
| 370 | 368 | /* Temporay solution for BootX to use inode.h till kqueue moves to vfs layer */ |
| 369 | #include <sys/queue.h> | |
| 371 | 370 | struct knote; |
| 372 | 371 | SLIST_HEAD(klist, knote); |
| 373 | 372 | |
| 374 | 373 | |
| 374 | #include <sys/types.h> | |
| 375 | ||
| 375 | 376 | struct timespec; |
| 376 | 377 | |
| 377 | 378 | __BEGIN_DECLS |
lib/libc/include/any-macos.11-any/sys/fcntl.h+2-11| ... | ... | @@ -134,11 +134,8 @@ |
| 134 | 134 | #define O_NOCTTY 0x00020000 /* don't assign controlling terminal */ |
| 135 | 135 | |
| 136 | 136 | |
| 137 | #if __DARWIN_C_LEVEL >= 200809L | |
| 138 | #define O_DIRECTORY 0x00100000 | |
| 139 | #endif | |
| 140 | ||
| 141 | 137 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) |
| 138 | #define O_DIRECTORY 0x00100000 | |
| 142 | 139 | #define O_SYMLINK 0x00200000 /* allow open of a symlink */ |
| 143 | 140 | #endif |
| 144 | 141 | |
| ... | ... | @@ -259,13 +256,7 @@ |
| 259 | 256 | |
| 260 | 257 | #define F_LOG2PHYS_EXT 65 /* file offset to device offset, extended */ |
| 261 | 258 | |
| 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 | 	 */ | |
| 259 | #define F_GETLKPID 66 /* get record locking information, per-process */ | |
| 269 | 260 | |
| 270 | 261 | /* See F_DUPFD_CLOEXEC below for 67 */ |
| 271 | 262 |
lib/libc/include/any-macos.11-any/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/any-macos.11-any/sys/mount.h+1-1| ... | ... | @@ -388,6 +388,7 @@ struct netfs_status { |
| 388 | 388 | |
| 389 | 389 | |
| 390 | 390 | |
| 391 | ||
| 391 | 392 | /* |
| 392 | 393 | * Generic file handle |
| 393 | 394 | */ |
| ... | ... | @@ -402,7 +403,6 @@ struct fhandle { |
| 402 | 403 | typedef struct fhandle fhandle_t; |
| 403 | 404 | |
| 404 | 405 | |
| 405 | ||
| 406 | 406 | __BEGIN_DECLS |
| 407 | 407 | int fhopen(const struct fhandle *, int); |
| 408 | 408 | int fstatfs(int, struct statfs *) __DARWIN_INODE64(fstatfs); |
lib/libc/include/any-macos.11-any/sys/proc_info.h+6-5| ... | ... | @@ -620,11 +620,12 @@ struct kqueue_dyninfo { |
| 620 | 620 | }; |
| 621 | 621 | |
| 622 | 622 | /* keep in sync with KQ_* in sys/eventvar.h */ |
| 623 | #define PROC_KQUEUE_SELECT 0x0001 | |
| 624 | #define PROC_KQUEUE_SLEEP 0x0002 | |
| 625 | #define PROC_KQUEUE_32 0x0008 | |
| 626 | #define PROC_KQUEUE_64 0x0010 | |
| 627 | #define PROC_KQUEUE_QOS 0x0020 | |
| 623 | #define PROC_KQUEUE_SELECT 0x01 | |
| 624 | #define PROC_KQUEUE_SLEEP 0x02 | |
| 625 | #define PROC_KQUEUE_32 0x08 | |
| 626 | #define PROC_KQUEUE_64 0x10 | |
| 627 | #define PROC_KQUEUE_QOS 0x20 | |
| 628 | ||
| 628 | 629 | |
| 629 | 630 | struct kqueue_fdinfo { |
| 630 | 631 | 	struct proc_fileinfo pfi; |
lib/libc/include/any-macos.11-any/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/any-macos.11-any/sys/resource.h created+520| ... | ... | @@ -0,0 +1,520 @@ |
| 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 created+741| ... | ... | @@ -0,0 +1,741 @@ |
| 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 created+180| ... | ... | @@ -0,0 +1,180 @@ |
| 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+2-24| ... | ... | @@ -338,8 +338,8 @@ struct ctlname { |
| 338 | 338 | #define KERN_KDSET_TYPEFILTER 22 |
| 339 | 339 | #define KERN_KDBUFWAIT 23 |
| 340 | 340 | #define KERN_KDCPUMAP 24 |
| 341 | #define KERN_KDCPUMAP_EXT 25 | |
| 342 | /* 25 - 27 unused */ | |
| 341 | /* 25 - 26 unused */ | |
| 342 | #define KERN_KDWRITEMAP_V3 27 | |
| 343 | 343 | #define KERN_KDWRITETR_V3 28 |
| 344 | 344 | |
| 345 | 345 | #define CTL_KERN_NAMES { \ |
| ... | ... | @@ -668,28 +668,6 @@ extern struct loadavg averunnable; |
| 668 | 668 | * hw.l2cachesize - |
| 669 | 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 | * | |
| 693 | 671 | * hw.packages - Gives the number of processor packages. |
| 694 | 672 | * |
| 695 | 673 | * 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/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/any-macos.11-any/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/any-macos.11-any/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/any-macos.11-any/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/any-macos.11-any/xpc/availability.h created+124| ... | ... | @@ -0,0 +1,124 @@ |
| 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 created+213| ... | ... | @@ -0,0 +1,213 @@ |
| 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 created+748| ... | ... | @@ -0,0 +1,748 @@ |
| 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/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.12-any/dispatch/base.h created+333| ... | ... | @@ -0,0 +1,333 @@ |
| 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 | #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 | ||
| 157 | #define DISPATCH_LINUX_UNAVAILABLE() | |
| 158 | ||
| 159 | #ifdef __FreeBSD__ | |
| 160 | #define DISPATCH_FREEBSD_UNAVAILABLE() \ | |
| 161 | 		DISPATCH_UNAVAILABLE_MSG( \ | |
| 162 | 		"This interface is unavailable on FreeBSD systems") | |
| 163 | #else | |
| 164 | #define DISPATCH_FREEBSD_UNAVAILABLE() | |
| 165 | #endif | |
| 166 | ||
| 167 | #ifndef DISPATCH_ALIAS_V2 | |
| 168 | #if TARGET_OS_MAC | |
| 169 | #define DISPATCH_ALIAS_V2(sym)	 __asm__("_" #sym "$V2") | |
| 170 | #else | |
| 171 | #define DISPATCH_ALIAS_V2(sym) | |
| 172 | #endif | |
| 173 | #endif | |
| 174 | ||
| 175 | #if defined(_WIN32) | |
| 176 | #if defined(__cplusplus) | |
| 177 | #define DISPATCH_EXPORT extern "C" __declspec(dllimport) | |
| 178 | #else | |
| 179 | #define DISPATCH_EXPORT extern __declspec(dllimport) | |
| 180 | #endif | |
| 181 | #elif __GNUC__ | |
| 182 | #define DISPATCH_EXPORT extern __attribute__((visibility("default"))) | |
| 183 | #else | |
| 184 | #define DISPATCH_EXPORT extern | |
| 185 | #endif | |
| 186 | ||
| 187 | #if __GNUC__ | |
| 188 | #define DISPATCH_INLINE static __inline__ | |
| 189 | #else | |
| 190 | #define DISPATCH_INLINE static inline | |
| 191 | #endif | |
| 192 | ||
| 193 | #if __GNUC__ | |
| 194 | #define DISPATCH_EXPECT(x, v) __builtin_expect((x), (v)) | |
| 195 | #define dispatch_compiler_barrier() __asm__ __volatile__("" ::: "memory") | |
| 196 | #else | |
| 197 | #define DISPATCH_EXPECT(x, v) (x) | |
| 198 | #define dispatch_compiler_barrier() do { } while (0) | |
| 199 | #endif | |
| 200 | ||
| 201 | #if __has_attribute(not_tail_called) | |
| 202 | #define DISPATCH_NOT_TAIL_CALLED __attribute__((__not_tail_called__)) | |
| 203 | #else | |
| 204 | #define DISPATCH_NOT_TAIL_CALLED | |
| 205 | #endif | |
| 206 | ||
| 207 | #if __has_builtin(__builtin_assume) | |
| 208 | #define DISPATCH_COMPILER_CAN_ASSUME(expr) __builtin_assume(expr) | |
| 209 | #else | |
| 210 | #define DISPATCH_COMPILER_CAN_ASSUME(expr) ((void)(expr)) | |
| 211 | #endif | |
| 212 | ||
| 213 | #if __has_attribute(noescape) | |
| 214 | #define DISPATCH_NOESCAPE __attribute__((__noescape__)) | |
| 215 | #else | |
| 216 | #define DISPATCH_NOESCAPE | |
| 217 | #endif | |
| 218 | ||
| 219 | #if __has_attribute(cold) | |
| 220 | #define DISPATCH_COLD __attribute__((__cold__)) | |
| 221 | #else | |
| 222 | #define DISPATCH_COLD | |
| 223 | #endif | |
| 224 | ||
| 225 | #if __has_feature(assume_nonnull) | |
| 226 | #define DISPATCH_ASSUME_NONNULL_BEGIN _Pragma("clang assume_nonnull begin") | |
| 227 | #define DISPATCH_ASSUME_NONNULL_END _Pragma("clang assume_nonnull end") | |
| 228 | #else | |
| 229 | #define DISPATCH_ASSUME_NONNULL_BEGIN | |
| 230 | #define DISPATCH_ASSUME_NONNULL_END | |
| 231 | #endif | |
| 232 | ||
| 233 | #if !__has_feature(nullability) | |
| 234 | #ifndef _Nullable | |
| 235 | #define _Nullable | |
| 236 | #endif | |
| 237 | #ifndef _Nonnull | |
| 238 | #define _Nonnull | |
| 239 | #endif | |
| 240 | #ifndef _Null_unspecified | |
| 241 | #define _Null_unspecified | |
| 242 | #endif | |
| 243 | #endif | |
| 244 | ||
| 245 | #ifndef DISPATCH_RETURNS_RETAINED_BLOCK | |
| 246 | #if __has_attribute(ns_returns_retained) | |
| 247 | #define DISPATCH_RETURNS_RETAINED_BLOCK __attribute__((__ns_returns_retained__)) | |
| 248 | #else | |
| 249 | #define DISPATCH_RETURNS_RETAINED_BLOCK | |
| 250 | #endif | |
| 251 | #endif | |
| 252 | ||
| 253 | #if __has_attribute(enum_extensibility) | |
| 254 | #define __DISPATCH_ENUM_ATTR __attribute__((__enum_extensibility__(open))) | |
| 255 | #define __DISPATCH_ENUM_ATTR_CLOSED __attribute__((__enum_extensibility__(closed))) | |
| 256 | #else | |
| 257 | #define __DISPATCH_ENUM_ATTR | |
| 258 | #define __DISPATCH_ENUM_ATTR_CLOSED | |
| 259 | #endif // __has_attribute(enum_extensibility) | |
| 260 | ||
| 261 | #if __has_attribute(flag_enum) | |
| 262 | #define __DISPATCH_OPTIONS_ATTR __attribute__((__flag_enum__)) | |
| 263 | #else | |
| 264 | #define __DISPATCH_OPTIONS_ATTR | |
| 265 | #endif // __has_attribute(flag_enum) | |
| 266 | ||
| 267 | ||
| 268 | #if __has_feature(objc_fixed_enum) || __has_extension(cxx_strong_enums) || \ | |
| 269 | 		__has_extension(cxx_fixed_enum) || defined(_WIN32) | |
| 270 | #define DISPATCH_ENUM(name, type, ...) \ | |
| 271 | 		typedef enum : type { __VA_ARGS__ } __DISPATCH_ENUM_ATTR name##_t | |
| 272 | #define DISPATCH_OPTIONS(name, type, ...) \ | |
| 273 | 		typedef enum : type { __VA_ARGS__ } __DISPATCH_OPTIONS_ATTR __DISPATCH_ENUM_ATTR name##_t | |
| 274 | #else | |
| 275 | #define DISPATCH_ENUM(name, type, ...) \ | |
| 276 | 		enum { __VA_ARGS__ } __DISPATCH_ENUM_ATTR; typedef type name##_t | |
| 277 | #define DISPATCH_OPTIONS(name, type, ...) \ | |
| 278 | 		enum { __VA_ARGS__ } __DISPATCH_OPTIONS_ATTR __DISPATCH_ENUM_ATTR; typedef type name##_t | |
| 279 | #endif // __has_feature(objc_fixed_enum) ... | |
| 280 | ||
| 281 | ||
| 282 | ||
| 283 | #if __has_feature(enumerator_attributes) | |
| 284 | #define DISPATCH_ENUM_API_AVAILABLE(...) API_AVAILABLE(__VA_ARGS__) | |
| 285 | #define DISPATCH_ENUM_API_DEPRECATED(...) API_DEPRECATED(__VA_ARGS__) | |
| 286 | #define DISPATCH_ENUM_API_DEPRECATED_WITH_REPLACEMENT(...) \ | |
| 287 | 		API_DEPRECATED_WITH_REPLACEMENT(__VA_ARGS__) | |
| 288 | #else | |
| 289 | #define DISPATCH_ENUM_API_AVAILABLE(...) | |
| 290 | #define DISPATCH_ENUM_API_DEPRECATED(...) | |
| 291 | #define DISPATCH_ENUM_API_DEPRECATED_WITH_REPLACEMENT(...) | |
| 292 | #endif | |
| 293 | ||
| 294 | #ifdef __swift__ | |
| 295 | #define DISPATCH_SWIFT3_OVERLAY 1 | |
| 296 | #else // __swift__ | |
| 297 | #define DISPATCH_SWIFT3_OVERLAY 0 | |
| 298 | #endif // __swift__ | |
| 299 | ||
| 300 | #if __has_feature(attribute_availability_swift) | |
| 301 | #define DISPATCH_SWIFT_UNAVAILABLE(_msg) \ | |
| 302 | 		__attribute__((__availability__(swift, unavailable, message=_msg))) | |
| 303 | #else | |
| 304 | #define DISPATCH_SWIFT_UNAVAILABLE(_msg) | |
| 305 | #endif | |
| 306 | ||
| 307 | #if DISPATCH_SWIFT3_OVERLAY | |
| 308 | #define DISPATCH_SWIFT3_UNAVAILABLE(_msg) DISPATCH_SWIFT_UNAVAILABLE(_msg) | |
| 309 | #else | |
| 310 | #define DISPATCH_SWIFT3_UNAVAILABLE(_msg) | |
| 311 | #endif | |
| 312 | ||
| 313 | #if __has_attribute(swift_private) | |
| 314 | #define DISPATCH_REFINED_FOR_SWIFT __attribute__((__swift_private__)) | |
| 315 | #else | |
| 316 | #define DISPATCH_REFINED_FOR_SWIFT | |
| 317 | #endif | |
| 318 | ||
| 319 | #if __has_attribute(swift_name) | |
| 320 | #define DISPATCH_SWIFT_NAME(_name) __attribute__((__swift_name__(#_name))) | |
| 321 | #else | |
| 322 | #define DISPATCH_SWIFT_NAME(_name) | |
| 323 | #endif | |
| 324 | ||
| 325 | #ifndef __cplusplus | |
| 326 | #define DISPATCH_TRANSPARENT_UNION __attribute__((__transparent_union__)) | |
| 327 | #else | |
| 328 | #define DISPATCH_TRANSPARENT_UNION | |
| 329 | #endif | |
| 330 | ||
| 331 | typedef void (*dispatch_function_t)(void *_Nullable); | |
| 332 | ||
| 333 | #endif | |
| \ No newline at end of file |
lib/libc/include/any-macos.12-any/libproc.h created+172| ... | ... | @@ -0,0 +1,172 @@ |
| 1 | /* | |
| 2 | * Copyright (c) 2006, 2007, 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 | #ifndef _LIBPROC_H_ | |
| 24 | #define _LIBPROC_H_ | |
| 25 | ||
| 26 | #include <sys/cdefs.h> | |
| 27 | #include <sys/param.h> | |
| 28 | #include <sys/types.h> | |
| 29 | #include <sys/stat.h> | |
| 30 | #include <sys/mount.h> | |
| 31 | #include <sys/resource.h> | |
| 32 | #include <stdint.h> | |
| 33 | #include <stdbool.h> | |
| 34 | #include <mach/message.h> /* for audit_token_t */ | |
| 35 | ||
| 36 | #include <sys/proc_info.h> | |
| 37 | ||
| 38 | #include <Availability.h> | |
| 39 | #include <os/availability.h> | |
| 40 | ||
| 41 | /* | |
| 42 | * This header file contains private interfaces to obtain process information. | |
| 43 | * These interfaces are subject to change in future releases. | |
| 44 | */ | |
| 45 | ||
| 46 | /*! | |
| 47 | * @define PROC_LISTPIDSPATH_PATH_IS_VOLUME | |
| 48 | * @discussion This flag indicates that all processes that hold open | |
| 49 | * file references on the volume associated with the specified | |
| 50 | * path should be returned. | |
| 51 | */ | |
| 52 | #define PROC_LISTPIDSPATH_PATH_IS_VOLUME 1 | |
| 53 | ||
| 54 | ||
| 55 | /*! | |
| 56 | * @define PROC_LISTPIDSPATH_EXCLUDE_EVTONLY | |
| 57 | * @discussion This flag indicates that file references that were opened | |
| 58 | * with the O_EVTONLY flag should be excluded from the matching | |
| 59 | * criteria. | |
| 60 | */ | |
| 61 | #define PROC_LISTPIDSPATH_EXCLUDE_EVTONLY 2 | |
| 62 | ||
| 63 | __BEGIN_DECLS | |
| 64 | ||
| 65 | ||
| 66 | /*! | |
| 67 | * @function proc_listpidspath | |
| 68 | * @discussion A function which will search through the current | |
| 69 | * processes looking for open file references which match | |
| 70 | * a specified path or volume. | |
| 71 | * @param type types of processes to be searched (see proc_listpids) | |
| 72 | * @param typeinfo adjunct information for type | |
| 73 | * @param path file or volume path | |
| 74 | * @param pathflags flags to control which files should be considered | |
| 75 | * during the process search. | |
| 76 | * @param buffer a C array of int-sized values to be filled with | |
| 77 | * process identifiers that hold an open file reference | |
| 78 | * matching the specified path or volume. Pass NULL to | |
| 79 | * obtain the minimum buffer size needed to hold the | |
| 80 | * currently active processes. | |
| 81 | * @param buffersize the size (in bytes) of the provided buffer. | |
| 82 | * @result the number of bytes of data returned in the provided buffer; | |
| 83 | * -1 if an error was encountered; | |
| 84 | */ | |
| 85 | int proc_listpidspath(uint32_t type, | |
| 86 | uint32_t typeinfo, | |
| 87 | const char *path, | |
| 88 | uint32_t pathflags, | |
| 89 | void *buffer, | |
| 90 | int buffersize) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0); | |
| 91 | ||
| 92 | int proc_listpids(uint32_t type, uint32_t typeinfo, void *buffer, int buffersize) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0); | |
| 93 | int proc_listallpids(void * buffer, int buffersize) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_1); | |
| 94 | int proc_listpgrppids(pid_t pgrpid, void * buffer, int buffersize) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_1); | |
| 95 | int proc_listchildpids(pid_t ppid, void * buffer, int buffersize) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_1); | |
| 96 | int proc_pidinfo(int pid, int flavor, uint64_t arg, void *buffer, int buffersize) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0); | |
| 97 | int proc_pidfdinfo(int pid, int fd, int flavor, void * buffer, int buffersize) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0); | |
| 98 | int proc_pidfileportinfo(int pid, uint32_t fileport, int flavor, void *buffer, int buffersize) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3); | |
| 99 | int proc_name(int pid, void * buffer, uint32_t buffersize) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0); | |
| 100 | int proc_regionfilename(int pid, uint64_t address, void * buffer, uint32_t buffersize) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0); | |
| 101 | int proc_kmsgbuf(void * buffer, uint32_t buffersize) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0); | |
| 102 | int proc_pidpath(int pid, void * buffer, uint32_t buffersize) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0); | |
| 103 | int proc_pidpath_audittoken(audit_token_t *audittoken, void * buffer, uint32_t buffersize) API_AVAILABLE(macos(11.0), ios(14.0), watchos(7.0), tvos(14.0)); | |
| 104 | int proc_libversion(int *major, int * minor) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0); | |
| 105 | ||
| 106 | /* | |
| 107 | * Return resource usage information for the given pid, which can be a live process or a zombie. | |
| 108 | * | |
| 109 | * Returns 0 on success; or -1 on failure, with errno set to indicate the specific error. | |
| 110 | */ | |
| 111 | int proc_pid_rusage(int pid, int flavor, rusage_info_t *buffer) __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0); | |
| 112 | ||
| 113 | /* | |
| 114 | * A process can use the following api to set its own process control | |
| 115 | * state on resoure starvation. The argument can have one of the PROC_SETPC_XX values | |
| 116 | */ | |
| 117 | #define PROC_SETPC_NONE 0 | |
| 118 | #define PROC_SETPC_THROTTLEMEM 1 | |
| 119 | #define PROC_SETPC_SUSPEND 2 | |
| 120 | #define PROC_SETPC_TERMINATE 3 | |
| 121 | ||
| 122 | int proc_setpcontrol(const int control) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2); | |
| 123 | int proc_setpcontrol(const int control); | |
| 124 | ||
| 125 | int proc_track_dirty(pid_t pid, uint32_t flags); | |
| 126 | int proc_set_dirty(pid_t pid, bool dirty); | |
| 127 | int proc_get_dirty(pid_t pid, uint32_t *flags); | |
| 128 | int proc_clear_dirty(pid_t pid, uint32_t flags); | |
| 129 | ||
| 130 | int proc_terminate(pid_t pid, int *sig); | |
| 131 | ||
| 132 | /* | |
| 133 | * NO_SMT means that on an SMT CPU, this thread must be scheduled alone, | |
| 134 | * with the paired CPU idle. | |
| 135 | * | |
| 136 | * Set NO_SMT on the current proc (all existing and future threads) | |
| 137 | * This attribute is inherited on fork and exec | |
| 138 | */ | |
| 139 | int proc_set_no_smt(void) __API_AVAILABLE(macos(11.0)); | |
| 140 | ||
| 141 | /* Set NO_SMT on the current thread */ | |
| 142 | int proc_setthread_no_smt(void) __API_AVAILABLE(macos(11.0)); | |
| 143 | ||
| 144 | /* | |
| 145 | * CPU Security Mitigation APIs | |
| 146 | * | |
| 147 | * Set CPU security mitigation on the current proc (all existing and future threads) | |
| 148 | * This attribute is inherited on fork and exec | |
| 149 | */ | |
| 150 | int proc_set_csm(uint32_t flags) __API_AVAILABLE(macos(11.0)); | |
| 151 | ||
| 152 | /* Set CPU security mitigation on the current thread */ | |
| 153 | int proc_setthread_csm(uint32_t flags) __API_AVAILABLE(macos(11.0)); | |
| 154 | ||
| 155 | /* | |
| 156 | * flags for CPU Security Mitigation APIs | |
| 157 | * PROC_CSM_ALL should be used in most cases, | |
| 158 | * the individual flags are provided only for performance evaluation etc | |
| 159 | */ | |
| 160 | #define PROC_CSM_ALL 0x0001 /* Set all available mitigations */ | |
| 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 */ | |
| 163 | ||
| 164 | int proc_udata_info(int pid, int flavor, void *buffer, int buffersize); | |
| 165 | ||
| 166 | #if __has_include(<libproc_private.h>) | |
| 167 | #include <libproc_private.h> | |
| 168 | #endif | |
| 169 | ||
| 170 | __END_DECLS | |
| 171 | ||
| 172 | #endif /*_LIBPROC_H_ */ | |
| \ No newline at end of file |
lib/libc/include/any-macos.12-any/mach/clock.h created+246| ... | ... | @@ -0,0 +1,246 @@ |
| 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 created+200| ... | ... | @@ -0,0 +1,200 @@ |
| 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 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.12-any/mach/host_priv.h created+1164| ... | ... | @@ -0,0 +1,1164 @@ |
| 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 created+222| ... | ... | @@ -0,0 +1,222 @@ |
| 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/lock_set.h created+351| ... | ... | @@ -0,0 +1,351 @@ |
| 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 created+241| ... | ... | @@ -0,0 +1,241 @@ |
| 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 created+1289| ... | ... | @@ -0,0 +1,1289 @@ |
| 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_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.12-any/mach/mach_voucher_types.h created+246| ... | ... | @@ -0,0 +1,246 @@ |
| 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 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.12-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.12-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.12-any/mach/processor.h created+361| ... | ... | @@ -0,0 +1,361 @@ |
| 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 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.12-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.12-any/mach/thread_policy.h created+270| ... | ... | @@ -0,0 +1,270 @@ |
| 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 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.12-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.12-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.12-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.12-any/mach_debug/mach_debug_types.h created+199| ... | ... | @@ -0,0 +1,199 @@ |
| 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/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.12-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.12-any/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__ || 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 created+319| ... | ... | @@ -0,0 +1,319 @@ |
| 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 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.12-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.12-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.12-any/simd/base.h created+129| ... | ... | @@ -0,0 +1,129 @@ |
| 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/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.12-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.12-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.12-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.12-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.12-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.12-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.13-any/AvailabilityInternal.h+4-4| ... | ... | @@ -55,7 +55,7 @@ |
| 55 | 55 | #ifdef __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ |
| 56 | 56 | /* compiler sets __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ when -mtvos-version-min is used */ |
| 57 | 57 | #define __TV_OS_VERSION_MIN_REQUIRED __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ |
| 58 | #define __TV_OS_VERSION_MAX_ALLOWED __TVOS_16_1 | |
| 58 | #define __TV_OS_VERSION_MAX_ALLOWED __TVOS_16_2 | |
| 59 | 59 | /* for compatibility with existing code. New code should use platform specific checks */ |
| 60 | 60 | #define __IPHONE_OS_VERSION_MIN_REQUIRED 90000 |
| 61 | 61 | #endif |
| ... | ... | @@ -65,7 +65,7 @@ |
| 65 | 65 | #ifdef __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ |
| 66 | 66 | /* compiler sets __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ when -mwatchos-version-min is used */ |
| 67 | 67 | #define __WATCH_OS_VERSION_MIN_REQUIRED __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ |
| 68 | #define __WATCH_OS_VERSION_MAX_ALLOWED __WATCHOS_9_1 | |
| 68 | #define __WATCH_OS_VERSION_MAX_ALLOWED __WATCHOS_9_2 | |
| 69 | 69 | /* for compatibility with existing code. New code should use platform specific checks */ |
| 70 | 70 | #define __IPHONE_OS_VERSION_MIN_REQUIRED 90000 |
| 71 | 71 | #endif |
| ... | ... | @@ -90,14 +90,14 @@ |
| 90 | 90 | #ifdef __MAC_OS_X_VERSION_MIN_REQUIRED |
| 91 | 91 | /* make sure a default max version is set */ |
| 92 | 92 | #ifndef __MAC_OS_X_VERSION_MAX_ALLOWED |
| 93 | #define __MAC_OS_X_VERSION_MAX_ALLOWED __MAC_13_0 | |
| 93 | #define __MAC_OS_X_VERSION_MAX_ALLOWED __MAC_13_1 | |
| 94 | 94 | #endif |
| 95 | 95 | #endif /* __MAC_OS_X_VERSION_MIN_REQUIRED */ |
| 96 | 96 | |
| 97 | 97 | #ifdef __IPHONE_OS_VERSION_MIN_REQUIRED |
| 98 | 98 | /* make sure a default max version is set */ |
| 99 | 99 | #ifndef __IPHONE_OS_VERSION_MAX_ALLOWED |
| 100 | #define __IPHONE_OS_VERSION_MAX_ALLOWED __IPHONE_16_1 | |
| 100 | #define __IPHONE_OS_VERSION_MAX_ALLOWED __IPHONE_16_2 | |
| 101 | 101 | #endif |
| 102 | 102 | /* make sure a valid min is set */ |
| 103 | 103 | #if __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_2_0 |
lib/libc/include/any-macos.13-any/AvailabilityVersions.h+4| ... | ... | @@ -68,6 +68,7 @@ |
| 68 | 68 | #define __MAC_12_2 120200 |
| 69 | 69 | #define __MAC_12_3 120300 |
| 70 | 70 | #define __MAC_13_0 130000 |
| 71 | #define __MAC_13_1 130100 | |
| 71 | 72 | /* __MAC_NA is not defined to a value but is used as a token by macros to indicate that the API is unavailable */ |
| 72 | 73 | |
| 73 | 74 | #define __IPHONE_2_0 20000 |
| ... | ... | @@ -132,6 +133,7 @@ |
| 132 | 133 | #define __IPHONE_15_4 150400 |
| 133 | 134 | #define __IPHONE_16_0 160000 |
| 134 | 135 | #define __IPHONE_16_1 160100 |
| 136 | #define __IPHONE_16_2 160200 | |
| 135 | 137 | /* __IPHONE_NA is not defined to a value but is used as a token by macros to indicate that the API is unavailable */ |
| 136 | 138 | |
| 137 | 139 | #define __TVOS_9_0 90000 |
| ... | ... | @@ -169,6 +171,7 @@ |
| 169 | 171 | #define __TVOS_15_4 150400 |
| 170 | 172 | #define __TVOS_16_0 160000 |
| 171 | 173 | #define __TVOS_16_1 160100 |
| 174 | #define __TVOS_16_2 160200 | |
| 172 | 175 | |
| 173 | 176 | #define __WATCHOS_1_0 10000 |
| 174 | 177 | #define __WATCHOS_2_0 20000 |
| ... | ... | @@ -203,6 +206,7 @@ |
| 203 | 206 | #define __WATCHOS_8_5 80500 |
| 204 | 207 | #define __WATCHOS_9_0 90000 |
| 205 | 208 | #define __WATCHOS_9_1 90100 |
| 209 | #define __WATCHOS_9_2 90200 | |
| 206 | 210 | |
| 207 | 211 | /* |
| 208 | 212 | * Set up standard Mac OS X versions |
lib/libc/include/any-macos.13-any/net/if.h+1-1| ... | ... | @@ -152,7 +152,7 @@ struct if_clonereq { |
| 152 | 152 | #define IFNET_SLOWHZ 1 /* granularity is 1 second */ |
| 153 | 153 | #define IFQ_DEF_C_TARGET_DELAY (10ULL * 1000 * 1000) /* 10 ms */ |
| 154 | 154 | #define IFQ_DEF_C_UPDATE_INTERVAL (100ULL * 1000 * 1000) /* 100 ms */ |
| 155 | #define IFQ_DEF_L4S_TARGET_DELAY (10ULL * 1000 * 1000) /* 10 ms */ | |
| 155 | #define IFQ_DEF_L4S_TARGET_DELAY (2ULL * 1000 * 1000) /* 2 ms */ | |
| 156 | 156 | #define IFQ_DEF_L4S_UPDATE_INTERVAL (100ULL * 1000 * 1000) /* 100 ms */ |
| 157 | 157 | #define IFQ_LL_C_TARGET_DELAY (10ULL * 1000 * 1000) /* 10 ms */ |
| 158 | 158 | #define IFQ_LL_C_UPDATE_INTERVAL (100ULL * 1000 * 1000) /* 100 ms */ |
lib/libc/include/any-macos.13-any/sys/_symbol_aliasing.h+12| ... | ... | @@ -383,6 +383,12 @@ |
| 383 | 383 | #define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_16_1(x) |
| 384 | 384 | #endif |
| 385 | 385 | |
| 386 | #if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 160200 | |
| 387 | #define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_16_2(x) x | |
| 388 | #else | |
| 389 | #define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_16_2(x) | |
| 390 | #endif | |
| 391 | ||
| 386 | 392 | #if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1000 |
| 387 | 393 | #define __DARWIN_ALIAS_STARTING_MAC___MAC_10_0(x) x |
| 388 | 394 | #else |
| ... | ... | @@ -633,4 +639,10 @@ |
| 633 | 639 | #define __DARWIN_ALIAS_STARTING_MAC___MAC_13_0(x) x |
| 634 | 640 | #else |
| 635 | 641 | #define __DARWIN_ALIAS_STARTING_MAC___MAC_13_0(x) |
| 642 | #endif | |
| 643 | ||
| 644 | #if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 130100 | |
| 645 | #define __DARWIN_ALIAS_STARTING_MAC___MAC_13_1(x) x | |
| 646 | #else | |
| 647 | #define __DARWIN_ALIAS_STARTING_MAC___MAC_13_1(x) | |
| 636 | 648 | #endif |
| \ No newline at end of file |
lib/libc/include/any-macos.13-any/sys/constrained_ctypes.h+76-30| ... | ... | @@ -31,9 +31,8 @@ |
| 31 | 31 | |
| 32 | 32 | #include <sys/cdefs.h> |
| 33 | 33 | |
| 34 | /* This file introduces macros for constraining pointer | |
| 35 | * types to specific contracts: | |
| 36 | * | |
| 34 | /* | |
| 35 | * Constraining pointer types based on contracts. | |
| 37 | 36 | * |
| 38 | 37 | * 1. List of supported constrained pointers. |
| 39 | 38 | * |
| ... | ... | @@ -184,12 +183,19 @@ |
| 184 | 183 | * `basetag`: the prefix of the constrained type. |
| 185 | 184 | * |
| 186 | 185 | * This macro acts differently in the user-space and the kernel-space |
| 187 | * code. When used in the former, it will only declare types which are | |
| 188 | * ABI-safe. See `ABI Compatibility Considerations' below for more details. | |
| 186 | * code. | |
| 187 | * When used in the user-space code, the macro will declare | |
| 188 | * types which are ABI-safe. See `ABI Compatibility Considerations' | |
| 189 | * below for more details on ABI-safety. In the user-space code, | |
| 190 | * the macro is guarded by the `__CCT_ENABLE_USER_SPACE' compilation | |
| 191 | * flag. | |
| 192 | * When used in the kernel-space code, the macro will declare | |
| 193 | * the common constrained types. | |
| 189 | 194 | * |
| 190 | 195 | * Examples: |
| 191 | 196 | * |
| 192 | * (1) When used from the user space, | |
| 197 | * (1) When used from the user space, and `__CCT_ENABLE_USER_SPACE' | |
| 198 | * is defined, the expression | |
| 193 | 199 | * `__CCT_DECLARE_CONSTRAINED_PTR_TYPES(struct socket, socket);' |
| 194 | 200 | * will declare types: |
| 195 | 201 | * |
| ... | ... | @@ -224,16 +230,32 @@ |
| 224 | 230 | * |
| 225 | 231 | * `basetype`: the pointee type. |
| 226 | 232 | * `basetag`: the prefix of the constrained type. |
| 227 | * `...`: list of `REF', `CREF', `BPTR' or `PTR', which represent | |
| 228 | * the desired constraints. | |
| 233 | * `...`: list of constraints: | |
| 234 | * - `__CCT_REF' for the "reference" contract; | |
| 235 | * - `__CCT_CREF' for the "const reference" contract; | |
| 236 | * - `__CCT_PTR' for the "checked pointer" contract; or | |
| 237 | * - `__CCT_BPTR' for the "bidirectional pointer" contract. | |
| 229 | 238 | * |
| 230 | 239 | * Examples: |
| 231 | 240 | * |
| 232 | * (1) `__CCT_DECLARE_CONSTRAINED_PTR_TYPE(struct socket, socket, REF)' | |
| 233 | * will declare the type `socket_ref_t`: | |
| 241 | * (1) `__CCT_DECLARE_CONSTRAINED_PTR_TYPE(struct socket, socket, __CCT_REF)' | |
| 242 | * will declare the type | |
| 243 | * `reference' pointer to `struct socket' | |
| 244 | * and call this type by `socket_ref_t' | |
| 234 | 245 | * |
| 235 | * (2) `__CCT_DECLARE_CONSTRAINED_PTR_TYPE(struct socket, socket, REF, PTR, REF)' | |
| 236 | * will declare the type `socket_ref_ptr_ref_t`: | |
| 246 | * (2) `__CCT_DECLARE_CONSTRAINED_PTR_TYPE(struct socket, socket, __CCT_REF, __CCT_PTR)' | |
| 247 | * will declare the type | |
| 248 | * `checked' pointer to `socket_ref_t' | |
| 249 | * which in turn is equivalent to the type | |
| 250 | * `checked' pointer to `reference' pointer to `struct socket' | |
| 251 | * | |
| 252 | * (3) `__CCT_DECLARE_CONSTRAINED_PTR_TYPE(struct socket, socket, __CCT_REF, __CCT_PTR, __CCT_REF)' | |
| 253 | * will declare the type | |
| 254 | * `reference' pointer to `socket_ref_ptr_t' | |
| 255 | * which is equivalent to the type | |
| 256 | * `reference' pointer to `checked' pointer to `socket_ref_t' | |
| 257 | * which in turn is equivalent to the type | |
| 258 | * `reference' pointer to `checked' pointer to `reference' pointer to `struct socket' | |
| 237 | 259 | * |
| 238 | 260 | * |
| 239 | 261 | * 3. Using constrained pointer types. |
| ... | ... | @@ -513,27 +535,28 @@ |
| 513 | 535 | * Support for other compilers will be added after the introduction of support |
| 514 | 536 | * for pointer tagging on those compilers. |
| 515 | 537 | */ |
| 538 | #if defined(KERNEL) || defined(__CCT_ENABLE_USER_SPACE) | |
| 516 | 539 | #if defined(__clang__) |
| 517 | #define __CCT_CONTRACT_ATTR_REF __single | |
| 518 | #define __CCT_CONTRACT_ATTR_CREF const __single | |
| 540 | #define __CCT_CONTRACT_ATTR___CCT_REF __single | |
| 541 | #define __CCT_CONTRACT_ATTR___CCT_CREF const __single | |
| 519 | 542 | #if __has_ptrcheck |
| 520 | #define __CCT_CONTRACT_ATTR_BPTR __bidi_indexable | |
| 521 | #define __CCT_CONTRACT_ATTR_PTR __indexable | |
| 543 | #define __CCT_CONTRACT_ATTR___CCT_BPTR __bidi_indexable | |
| 544 | #define __CCT_CONTRACT_ATTR___CCT_PTR __indexable | |
| 522 | 545 | #else /* __clang__ + __has_ptrcheck */ |
| 523 | #define __CCT_CONTRACT_ATTR_BPTR | |
| 524 | #define __CCT_CONTRACT_ATTR_PTR | |
| 546 | #define __CCT_CONTRACT_ATTR___CCT_BPTR | |
| 547 | #define __CCT_CONTRACT_ATTR___CCT_PTR | |
| 525 | 548 | #endif /* __clang__ + !__has_ptrcheck */ |
| 526 | 549 | #else /* !__clang__ */ |
| 527 | #define __CCT_CONTRACT_ATTR_REF | |
| 528 | #define __CCT_CONTRACT_ATTR_CREF const | |
| 529 | #define __CCT_CONTRACT_ATTR_BPTR | |
| 530 | #define __CCT_CONTRACT_ATTR_PTR | |
| 550 | #define __CCT_CONTRACT_ATTR___CCT_REF | |
| 551 | #define __CCT_CONTRACT_ATTR___CCT_CREF const | |
| 552 | #define __CCT_CONTRACT_ATTR___CCT_BPTR | |
| 553 | #define __CCT_CONTRACT_ATTR___CCT_PTR | |
| 531 | 554 | #endif /* __clang__ */ |
| 532 | 555 | |
| 533 | #define __CCT_CONTRACT_TAG_REF _ref | |
| 534 | #define __CCT_CONTRACT_TAG_CREF _cref | |
| 535 | #define __CCT_CONTRACT_TAG_BPTR _bptr | |
| 536 | #define __CCT_CONTRACT_TAG_PTR _ptr | |
| 556 | #define __CCT_CONTRACT_TAG___CCT_REF _ref | |
| 557 | #define __CCT_CONTRACT_TAG___CCT_CREF _cref | |
| 558 | #define __CCT_CONTRACT_TAG___CCT_BPTR _bptr | |
| 559 | #define __CCT_CONTRACT_TAG___CCT_PTR _ptr | |
| 537 | 560 | |
| 538 | 561 | /* Helper macros */ |
| 539 | 562 | #define __CCT_DEFER(F, ...) F(__VA_ARGS__) |
| ... | ... | @@ -572,20 +595,43 @@ typedef basetype * __CCT_CONTRACT_TO_ATTR(kind1) |
| 572 | 595 | 	 * __CCT_CONTRACT_TO_ATTR(kind2) \ |
| 573 | 596 | 	 * __CCT_CONTRACT_TO_ATTR(kind3) \ |
| 574 | 597 | 	__CCT_DEFER(__CONCAT, basetag, __CCT_CONTRACT_LIST_TO_TAGGED_SUFFIX_3(kind1, kind2, kind3)) |
| 598 | #endif /* defined(KERNEL) || defined(__CCT_ENABLE_USER_SPACE) */ | |
| 575 | 599 | |
| 576 | 600 | /* |
| 577 | 601 | * Lower level type constructor. |
| 578 | 602 | */ |
| 603 | #if defined(KERNEL) || defined(__CCT_ENABLE_USER_SPACE) | |
| 579 | 604 | #define __CCT_DECLARE_CONSTRAINED_PTR_TYPE(basetype, basetag, ...) \ |
| 580 | 605 | 	__CCT_DISPATCH(__CCT_DECLARE_CONSTRAINED_PTR_TYPE, basetype, basetag, __VA_ARGS__) |
| 606 | #else /* !defined(KERNEL) && !defined(__CCT_ENABLE_USER_SPACE) */ | |
| 607 | #if defined(__clang__) | |
| 608 | #pragma clang diagnostic push | |
| 609 | #pragma clang diagnostic ignored "-Wextra-semi" | |
| 610 | #endif /* defined(__clang__) */ | |
| 611 | #define __CCT_DECLARE_CONSTRAINED_PTR_TYPE(basetype, basetag, ...) | |
| 612 | #if defined(__clang__) | |
| 613 | #pragma clang diagnostic pop | |
| 614 | #endif /* defined(__clang__) */ | |
| 615 | #endif /* !defined(KERNEL) && !defined(__CCT_ENABLE_USER_SPACE) */ | |
| 581 | 616 | |
| 582 | 617 | /* |
| 583 | 618 | * Higher level type constructors. |
| 584 | * The constrained types that can potentially break the ABI are not exposed | |
| 585 | * into the user-space. | |
| 586 | 619 | */ |
| 620 | #if defined(__CCT_ENABLE_USER_SPACE) | |
| 621 | /* Limiting the higher-level constructor to the ABI-preserving constructs. */ | |
| 587 | 622 | #define __CCT_DECLARE_CONSTRAINED_PTR_TYPES(basetype, basetag) \ |
| 588 | __CCT_DECLARE_CONSTRAINED_PTR_TYPE(basetype, basetag, REF); \ | |
| 589 | __CCT_DECLARE_CONSTRAINED_PTR_TYPE(basetype, basetag, REF, REF) | |
| 623 | 	__CCT_DECLARE_CONSTRAINED_PTR_TYPE(basetype, basetag, __CCT_REF); \ | |
| 624 | 	__CCT_DECLARE_CONSTRAINED_PTR_TYPE(basetype, basetag, __CCT_REF, __CCT_REF) | |
| 625 | #else /* !defined(__CCT_ENABLE_USER_SPACE) */ | |
| 626 | /* Disabling the higher-level constructor */ | |
| 627 | #if defined(__clang__) | |
| 628 | #pragma clang diagnostic push | |
| 629 | #pragma clang diagnostic ignored "-Wextra-semi" | |
| 630 | #endif /* defined(__clang__) */ | |
| 631 | #define __CCT_DECLARE_CONSTRAINED_PTR_TYPES(basetype, basetag) | |
| 632 | #if defined(__clang__) | |
| 633 | #pragma clang diagnostic pop | |
| 634 | #endif /* defined(__clang__) */ | |
| 635 | #endif /* !defined(__CCT_ENABLE_USER_SPACE) */ | |
| 590 | 636 | |
| 591 | 637 | #endif /* __CONSTRAINED_CTYPES__ */ |
| \ No newline at end of file |
lib/libc/include/any-macos.13-any/vis.h created+143| ... | ... | @@ -0,0 +1,143 @@ |
| 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 | /*	$NetBSD: vis.h,v 1.25 2017/04/23 01:57:36 christos Exp $	*/ | |
| 24 | /*	$FreeBSD$	*/ | |
| 25 | ||
| 26 | /*- | |
| 27 | * Copyright (c) 1990, 1993 | |
| 28 | *	The Regents of the University of California. All rights reserved. | |
| 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. Neither the name of the University nor the names of its contributors | |
| 39 | * may be used to endorse or promote products derived from this software | |
| 40 | * without specific prior written permission. | |
| 41 | * | |
| 42 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | |
| 43 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |
| 44 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | |
| 45 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | |
| 46 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
| 47 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
| 48 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
| 49 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
| 50 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
| 51 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
| 52 | * SUCH DAMAGE. | |
| 53 | * | |
| 54 | *	@(#)vis.h	8.1 (Berkeley) 6/2/93 | |
| 55 | */ | |
| 56 | ||
| 57 | #ifndef _VIS_H_ | |
| 58 | #define	_VIS_H_ | |
| 59 | ||
| 60 | #include <_types.h> | |
| 61 | #include <sys/_types/_size_t.h> | |
| 62 | ||
| 63 | /* | |
| 64 | * to select alternate encoding format | |
| 65 | */ | |
| 66 | #define	VIS_OCTAL	0x0001	/* use octal \ddd format */ | |
| 67 | #define	VIS_CSTYLE	0x0002	/* use \[nrft0..] where appropiate */ | |
| 68 | ||
| 69 | /* | |
| 70 | * to alter set of characters encoded (default is to encode all | |
| 71 | * non-graphic except space, tab, and newline). | |
| 72 | */ | |
| 73 | #define	VIS_SP		0x0004	/* also encode space */ | |
| 74 | #define	VIS_TAB		0x0008	/* also encode tab */ | |
| 75 | #define	VIS_NL		0x0010	/* also encode newline */ | |
| 76 | #define	VIS_WHITE	(VIS_SP | VIS_TAB | VIS_NL) | |
| 77 | #define	VIS_SAFE	0x0020	/* only encode "unsafe" characters */ | |
| 78 | #define	VIS_DQ		0x8000	/* also encode double quotes */ | |
| 79 | ||
| 80 | /* | |
| 81 | * other | |
| 82 | */ | |
| 83 | #define	VIS_NOSLASH	0x0040	/* inhibit printing '\' */ | |
| 84 | #define	VIS_HTTP1808	0x0080	/* http-style escape % hex hex */ | |
| 85 | #define	VIS_HTTPSTYLE	0x0080	/* http-style escape % hex hex */ | |
| 86 | #define	VIS_GLOB	0x0100	/* encode glob(3) magic characters */ | |
| 87 | #define	VIS_MIMESTYLE	0x0200	/* mime-style escape = HEX HEX */ | |
| 88 | #define	VIS_HTTP1866	0x0400	/* http-style &#num; or &string; */ | |
| 89 | #define	VIS_NOESCAPE	0x0800	/* don't decode `\' */ | |
| 90 | #define	_VIS_END	0x1000	/* for unvis */ | |
| 91 | #define	VIS_SHELL	0x2000	/* encode shell special characters [not glob] */ | |
| 92 | #define	VIS_META	(VIS_WHITE | VIS_GLOB | VIS_SHELL) | |
| 93 | #define	VIS_NOLOCALE	0x4000	/* encode using the C locale */ | |
| 94 | ||
| 95 | /* | |
| 96 | * unvis return codes | |
| 97 | */ | |
| 98 | #define	UNVIS_VALID	 1	/* character valid */ | |
| 99 | #define	UNVIS_VALIDPUSH	 2	/* character valid, push back passed char */ | |
| 100 | #define	UNVIS_NOCHAR	 3	/* valid sequence, no character produced */ | |
| 101 | #define	UNVIS_SYNBAD	-1	/* unrecognized escape sequence */ | |
| 102 | #define	UNVIS_ERROR	-2	/* decoder in unknown state (unrecoverable) */ | |
| 103 | ||
| 104 | /* | |
| 105 | * unvis flags | |
| 106 | */ | |
| 107 | #define	UNVIS_END	_VIS_END	/* no more characters */ | |
| 108 | ||
| 109 | #include <sys/cdefs.h> | |
| 110 | ||
| 111 | __BEGIN_DECLS | |
| 112 | char	*vis(char *, int, int, int); | |
| 113 | char	*nvis(char *, size_t, int, int, int); | |
| 114 | ||
| 115 | char	*svis(char *, int, int, int, const char *); | |
| 116 | char	*snvis(char *, size_t, int, int, int, const char *); | |
| 117 | ||
| 118 | int	strvis(char *, const char *, int); | |
| 119 | int	stravis(char **, const char *, int); | |
| 120 | int	strnvis(char *, size_t, const char *, int); | |
| 121 | ||
| 122 | int	strsvis(char *, const char *, int, const char *); | |
| 123 | int	strsnvis(char *, size_t, const char *, int, const char *); | |
| 124 | ||
| 125 | int	strvisx(char *, const char *, size_t, int); | |
| 126 | int	strnvisx(char *, size_t, const char *, size_t, int); | |
| 127 | int 	strenvisx(char *, size_t, const char *, size_t, int, int *); | |
| 128 | ||
| 129 | int	strsvisx(char *, const char *, size_t, int, const char *); | |
| 130 | int	strsnvisx(char *, size_t, const char *, size_t, int, const char *); | |
| 131 | int	strsenvisx(char *, size_t, const char *, size_t , int, const char *, | |
| 132 | int *); | |
| 133 | ||
| 134 | int	strunvis(char *, const char *); | |
| 135 | int	strnunvis(char *, size_t, const char *); | |
| 136 | ||
| 137 | int	strunvisx(char *, const char *, int); | |
| 138 | int	strnunvisx(char *, size_t, const char *, int); | |
| 139 | ||
| 140 | int	unvis(char *, int, int *, int); | |
| 141 | __END_DECLS | |
| 142 | ||
| 143 | #endif /* !_VIS_H_ */ | |
| \ No newline at end of file |
lib/libc/include/x86_64-macos.11-none/i386/_limits.h-4| ... | ... | @@ -22,10 +22,6 @@ |
| 22 | 22 | #ifndef _I386__LIMITS_H_ |
| 23 | 23 | #define _I386__LIMITS_H_ |
| 24 | 24 | |
| 25 | #if defined (__i386__) || defined (__x86_64__) | |
| 26 | ||
| 27 | 25 | #define __DARWIN_CLK_TCK 100 /* ticks per second */ |
| 28 | 26 | |
| 29 | #endif /* defined (__i386__) || defined (__x86_64__) */ | |
| 30 | ||
| 31 | 27 | #endif /* _I386__LIMITS_H_ */ |
| \ No newline at end of file |
lib/libc/include/x86_64-macos.11-none/i386/_mcontext.h-4| ... | ... | @@ -29,8 +29,6 @@ |
| 29 | 29 | #ifndef __I386_MCONTEXT_H_ |
| 30 | 30 | #define __I386_MCONTEXT_H_ |
| 31 | 31 | |
| 32 | #if defined (__i386__) || defined (__x86_64__) | |
| 33 | ||
| 34 | 32 | #include <sys/cdefs.h> /* __DARWIN_UNIX03 */ |
| 35 | 33 | #include <sys/appleapiopts.h> |
| 36 | 34 | #include <mach/machine/_structs.h> |
| ... | ... | @@ -211,6 +209,4 @@ typedef _STRUCT_MCONTEXT32 *mcontext_t; |
| 211 | 209 | #endif |
| 212 | 210 | #endif /* _MCONTEXT_T */ |
| 213 | 211 | |
| 214 | #endif /* defined (__i386__) || defined (__x86_64__) */ | |
| 215 | ||
| 216 | 212 | #endif /* __I386_MCONTEXT_H_ */ |
| \ No newline at end of file |
lib/libc/include/x86_64-macos.11-none/i386/_param.h-3| ... | ... | @@ -29,8 +29,6 @@ |
| 29 | 29 | #ifndef _I386__PARAM_H_ |
| 30 | 30 | #define _I386__PARAM_H_ |
| 31 | 31 | |
| 32 | #if defined (__i386__) || defined (__x86_64__) | |
| 33 | ||
| 34 | 32 | #include <i386/_types.h> |
| 35 | 33 | |
| 36 | 34 | /* |
| ... | ... | @@ -44,6 +42,5 @@ |
| 44 | 42 | #define __DARWIN_ALIGNBYTES32 (sizeof(__uint32_t) - 1) |
| 45 | 43 | #define __DARWIN_ALIGN32(p) ((__darwin_size_t)((__darwin_size_t)(p) + __DARWIN_ALIGNBYTES32) &~ __DARWIN_ALIGNBYTES32) |
| 46 | 44 | |
| 47 | #endif /* defined (__i386__) || defined (__x86_64__) */ | |
| 48 | 45 | |
| 49 | 46 | #endif /* _I386__PARAM_H_ */ |
| \ No newline at end of file |
lib/libc/include/x86_64-macos.11-none/i386/_types.h-4| ... | ... | @@ -28,8 +28,6 @@ |
| 28 | 28 | #ifndef _BSD_I386__TYPES_H_ |
| 29 | 29 | #define _BSD_I386__TYPES_H_ |
| 30 | 30 | |
| 31 | #if defined (__i386__) || defined (__x86_64__) | |
| 32 | ||
| 33 | 31 | /* |
| 34 | 32 | * This header file contains integer types. It's intended to also contain |
| 35 | 33 | * flotaing point and other arithmetic types, as needed, later. |
| ... | ... | @@ -121,6 +119,4 @@ typedef __uint32_t __darwin_socklen_t; /* socklen_t (duh) */ |
| 121 | 119 | typedef long __darwin_ssize_t; /* byte count or error */ |
| 122 | 120 | typedef long __darwin_time_t; /* time() */ |
| 123 | 121 | |
| 124 | #endif /* defined (__i386__) || defined (__x86_64__) */ | |
| 125 | ||
| 126 | 122 | #endif /* _BSD_I386__TYPES_H_ */ |
| \ No newline at end of file |
lib/libc/include/x86_64-macos.11-none/i386/eflags.h-4| ... | ... | @@ -59,8 +59,6 @@ |
| 59 | 59 | #ifndef _I386_EFLAGS_H_ |
| 60 | 60 | #define _I386_EFLAGS_H_ |
| 61 | 61 | |
| 62 | #if defined (__i386__) || defined (__x86_64__) | |
| 63 | ||
| 64 | 62 | /* |
| 65 | 63 | *	i386 flags register |
| 66 | 64 | */ |
| ... | ... | @@ -93,6 +91,4 @@ |
| 93 | 91 | #define EFL_USER_SET (EFL_IF) |
| 94 | 92 | #define EFL_USER_CLEAR (EFL_IOPL|EFL_NT|EFL_RF) |
| 95 | 93 | |
| 96 | #endif /* defined (__i386__) || defined (__x86_64__) */ | |
| 97 | ||
| 98 | 94 | #endif /* _I386_EFLAGS_H_ */ |
| \ No newline at end of file |
lib/libc/include/x86_64-macos.11-none/i386/endian.h-3| ... | ... | @@ -66,8 +66,6 @@ |
| 66 | 66 | #ifndef _I386__ENDIAN_H_ |
| 67 | 67 | #define _I386__ENDIAN_H_ |
| 68 | 68 | |
| 69 | #if defined (__i386__) || defined (__x86_64__) | |
| 70 | ||
| 71 | 69 | #include <sys/cdefs.h> |
| 72 | 70 | /* |
| 73 | 71 | * Define _NOQUAD if the compiler does NOT support 64-bit integers. |
| ... | ... | @@ -101,5 +99,4 @@ |
| 101 | 99 | #include <sys/_endian.h> |
| 102 | 100 | |
| 103 | 101 | #endif /* defined(KERNEL) || (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) */ |
| 104 | #endif /* defined (__i386__) || defined (__x86_64__) */ | |
| 105 | 102 | #endif /* !_I386__ENDIAN_H_ */ |
| \ No newline at end of file |
lib/libc/include/x86_64-macos.11-none/i386/limits.h-4| ... | ... | @@ -36,8 +36,6 @@ |
| 36 | 36 | #ifndef _I386_LIMITS_H_ |
| 37 | 37 | #define _I386_LIMITS_H_ |
| 38 | 38 | |
| 39 | #if defined (__i386__) || defined (__x86_64__) | |
| 40 | ||
| 41 | 39 | #include <sys/cdefs.h> |
| 42 | 40 | #include <i386/_limits.h> |
| 43 | 41 | |
| ... | ... | @@ -106,6 +104,4 @@ |
| 106 | 104 | #endif /* (!_POSIX_C_SOURCE && !_XOPEN_SOURCE) || _DARWIN_C_SOURCE */ |
| 107 | 105 | #endif /* !_ANSI_SOURCE */ |
| 108 | 106 | |
| 109 | #endif /* defined (__i386__) || defined (__x86_64__) */ | |
| 110 | ||
| 111 | 107 | #endif /* _I386_LIMITS_H_ */ |
| \ No newline at end of file |
lib/libc/include/x86_64-macos.11-none/i386/param.h-4| ... | ... | @@ -72,8 +72,6 @@ |
| 72 | 72 | #ifndef _I386_PARAM_H_ |
| 73 | 73 | #define _I386_PARAM_H_ |
| 74 | 74 | |
| 75 | #if defined (__i386__) || defined (__x86_64__) | |
| 76 | ||
| 77 | 75 | #include <i386/_param.h> |
| 78 | 76 | |
| 79 | 77 | /* |
| ... | ... | @@ -170,6 +168,4 @@ |
| 170 | 168 | #define DELAY(n) { int N = (n); while (--N > 0); } |
| 171 | 169 | #endif /* defined(KERNEL) || defined(STANDALONE) */ |
| 172 | 170 | |
| 173 | #endif /* defined (__i386__) || defined (__x86_64__) */ | |
| 174 | ||
| 175 | 171 | #endif /* _I386_PARAM_H_ */ |
| \ No newline at end of file |
lib/libc/include/x86_64-macos.11-none/i386/signal.h-4| ... | ... | @@ -33,8 +33,6 @@ |
| 33 | 33 | #ifndef _I386_SIGNAL_H_ |
| 34 | 34 | #define _I386_SIGNAL_H_ 1 |
| 35 | 35 | |
| 36 | #if defined (__i386__) || defined (__x86_64__) | |
| 37 | ||
| 38 | 36 | #include <sys/cdefs.h> |
| 39 | 37 | |
| 40 | 38 | #ifndef _ANSI_SOURCE |
| ... | ... | @@ -42,6 +40,4 @@ typedef int sig_atomic_t; |
| 42 | 40 | |
| 43 | 41 | #endif /* ! _ANSI_SOURCE */ |
| 44 | 42 | |
| 45 | #endif /* defined (__i386__) || defined (__x86_64__) */ | |
| 46 | ||
| 47 | 43 | #endif /* _I386_SIGNAL_H_ */ |
| \ No newline at end of file |
lib/libc/include/x86_64-macos.11-none/i386/types.h+2-6| ... | ... | @@ -63,12 +63,9 @@ |
| 63 | 63 | *	@(#)types.h	8.3 (Berkeley) 1/5/94 |
| 64 | 64 | */ |
| 65 | 65 | |
| 66 | #ifndef _I386_MACHTYPES_H_ | |
| 67 | #define _I386_MACHTYPES_H_ | |
| 66 | #ifndef _MACHTYPES_H_ | |
| 68 | 67 | #define _MACHTYPES_H_ |
| 69 | 68 | |
| 70 | #if defined (__i386__) || defined (__x86_64__) | |
| 71 | ||
| 72 | 69 | #ifndef __ASSEMBLER__ |
| 73 | 70 | #include <i386/_types.h> |
| 74 | 71 | #include <sys/cdefs.h> |
| ... | ... | @@ -114,5 +111,4 @@ typedef int64_t user_off_t; |
| 114 | 111 | typedef u_int64_t syscall_arg_t; |
| 115 | 112 | |
| 116 | 113 | #endif /* __ASSEMBLER__ */ |
| 117 | #endif /* defined (__i386__) || defined (__x86_64__) */ | |
| 118 | #endif /* _I386_MACHTYPES_H_ */ | |
| \ No newline at end of file | ||
| 114 | #endif /* _MACHTYPES_H_ */ | |
| \ No newline at end of file |
lib/libc/include/x86_64-macos.11-none/mach/i386/_structs.h-4| ... | ... | @@ -32,8 +32,6 @@ |
| 32 | 32 | #ifndef	_MACH_I386__STRUCTS_H_ |
| 33 | 33 | #define	_MACH_I386__STRUCTS_H_ |
| 34 | 34 | |
| 35 | #if defined (__i386__) || defined (__x86_64__) | |
| 36 | ||
| 37 | 35 | #include <sys/cdefs.h> /* __DARWIN_UNIX03 */ |
| 38 | 36 | #include <machine/types.h> /* __uint8_t */ |
| 39 | 37 | |
| ... | ... | @@ -1311,6 +1309,4 @@ _STRUCT_X86_CPMU_STATE64 |
| 1311 | 1309 | }; |
| 1312 | 1310 | #endif /* !__DARWIN_UNIX03 */ |
| 1313 | 1311 | |
| 1314 | #endif /* defined (__i386__) || defined (__x86_64__) */ | |
| 1315 | ||
| 1316 | 1312 | #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,14 +65,10 @@ |
| 65 | 65 | #ifndef _MACH_I386_BOOLEAN_H_ |
| 66 | 66 | #define _MACH_I386_BOOLEAN_H_ |
| 67 | 67 | |
| 68 | #if defined (__i386__) || defined (__x86_64__) | |
| 69 | ||
| 70 | 68 | #if defined(__x86_64__) && !defined(KERNEL) |
| 71 | 69 | typedef unsigned int boolean_t; |
| 72 | 70 | #else |
| 73 | 71 | typedef int boolean_t; |
| 74 | 72 | #endif |
| 75 | 73 | |
| 76 | #endif /* defined (__i386__) || defined (__x86_64__) */ | |
| 77 | ||
| 78 | 74 | #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,8 +59,6 @@ |
| 59 | 59 | #ifndef _MACH_I386_EXCEPTION_H_ |
| 60 | 60 | #define _MACH_I386_EXCEPTION_H_ |
| 61 | 61 | |
| 62 | #if defined (__i386__) || defined (__x86_64__) | |
| 63 | ||
| 64 | 62 | /* |
| 65 | 63 | * No machine dependent types for the 80386 |
| 66 | 64 | */ |
| ... | ... | @@ -134,6 +132,4 @@ |
| 134 | 132 | */ |
| 135 | 133 | #define EXC_MASK_MACHINE 0 |
| 136 | 134 | |
| 137 | #endif /* defined (__i386__) || defined (__x86_64__) */ | |
| 138 | ||
| 139 | 135 | #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,8 +59,6 @@ |
| 59 | 59 | #ifndef _I386_FP_SAVE_H_ |
| 60 | 60 | #define _I386_FP_SAVE_H_ |
| 61 | 61 | |
| 62 | #if defined (__i386__) || defined (__x86_64__) | |
| 63 | ||
| 64 | 62 | /* |
| 65 | 63 | * Control register |
| 66 | 64 | */ |
| ... | ... | @@ -117,6 +115,4 @@ |
| 117 | 115 | #define FP_387 3 /* 80387 or 80486 */ |
| 118 | 116 | #define FP_FXSR 4 /* Fast save/restore SIMD Extension */ |
| 119 | 117 | |
| 120 | #endif /* defined (__i386__) || defined (__x86_64__) */ | |
| 121 | ||
| 122 | 118 | #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,12 +67,8 @@ |
| 67 | 67 | #ifndef _MACH_I386_KERN_RETURN_H_ |
| 68 | 68 | #define _MACH_I386_KERN_RETURN_H_ |
| 69 | 69 | |
| 70 | #if defined (__i386__) || defined (__x86_64__) | |
| 71 | ||
| 72 | 70 | #ifndef ASSEMBLER |
| 73 | 71 | typedef int kern_return_t; |
| 74 | 72 | #endif /* ASSEMBLER */ |
| 75 | 73 | |
| 76 | #endif /* defined (__i386__) || defined (__x86_64__) */ | |
| 77 | ||
| 78 | 74 | #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,8 +34,4 @@ |
| 34 | 34 | #ifndef _MACH_I386_PROCESSOR_INFO_H_ |
| 35 | 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 | ||
| 41 | 37 | #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,8 +32,4 @@ |
| 32 | 32 | #ifndef _MACH_I386_RPC_H_ |
| 33 | 33 | #define _MACH_I386_RPC_H_ |
| 34 | 34 | |
| 35 | #if defined (__i386__) || defined (__x86_64__) | |
| 36 | ||
| 37 | #endif /* defined (__i386__) || defined (__x86_64__) */ | |
| 38 | ||
| 39 | 35 | #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 | 32 | #ifndef _MACH_I386_THREAD_STATE_H_ |
| 33 | 33 | #define _MACH_I386_THREAD_STATE_H_ |
| 34 | 34 | |
| 35 | #if defined (__i386__) || defined (__x86_64__) | |
| 36 | ||
| 37 | 35 | /* Size of maximum exported thread state in 32-bit words */ |
| 38 | 36 | #define I386_THREAD_STATE_MAX (614) /* Size of biggest state possible */ |
| 39 | 37 | |
| 40 | #endif /* defined (__i386__) || defined (__x86_64__) */ | |
| 38 | #if defined (__i386__) || defined(__x86_64__) | |
| 39 | #define THREAD_STATE_MAX I386_THREAD_STATE_MAX | |
| 40 | #endif | |
| 41 | 41 | |
| 42 | 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+1-5| ... | ... | @@ -67,12 +67,10 @@ |
| 67 | 67 | #ifndef _MACH_I386_THREAD_STATUS_H_ |
| 68 | 68 | #define _MACH_I386_THREAD_STATUS_H_ |
| 69 | 69 | |
| 70 | #if defined (__i386__) || defined (__x86_64__) | |
| 71 | ||
| 72 | 70 | #include <mach/machine/_structs.h> |
| 73 | #include <mach/machine/thread_state.h> | |
| 74 | 71 | #include <mach/message.h> |
| 75 | 72 | #include <mach/i386/fp_reg.h> |
| 73 | #include <mach/i386/thread_state.h> | |
| 76 | 74 | #include <i386/eflags.h> |
| 77 | 75 | |
| 78 | 76 | |
| ... | ... | @@ -361,6 +359,4 @@ typedef struct x86_avx512_state x86_avx512_state_t; |
| 361 | 359 | #define MACHINE_THREAD_STATE_COUNT x86_THREAD_STATE_COUNT |
| 362 | 360 | |
| 363 | 361 | |
| 364 | #endif /* defined (__i386__) || defined (__x86_64__) */ | |
| 365 | ||
| 366 | 362 | #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+2-8| ... | ... | @@ -90,8 +90,6 @@ |
| 90 | 90 | #ifndef _MACH_I386_VM_PARAM_H_ |
| 91 | 91 | #define _MACH_I386_VM_PARAM_H_ |
| 92 | 92 | |
| 93 | #if defined (__i386__) || defined (__x86_64__) | |
| 94 | ||
| 95 | 93 | #if !defined(KERNEL) && !defined(__ASSEMBLER__) |
| 96 | 94 | |
| 97 | 95 | #include <mach/vm_page_size.h> |
| ... | ... | @@ -124,11 +122,9 @@ |
| 124 | 122 | |
| 125 | 123 | #define VM_MIN_ADDRESS64 ((user_addr_t) 0x0000000000000000ULL) |
| 126 | 124 | /* |
| 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. | |
| 125 | * default top of user stack... it grows down from here | |
| 130 | 126 | */ |
| 131 | #define VM_USRSTACK64 ((user_addr_t) (0x00007FF7C0000000ull - (1024 * 1024))) | |
| 127 | #define VM_USRSTACK64 ((user_addr_t) 0x00007FFEEFC00000ULL) | |
| 132 | 128 | |
| 133 | 129 | /* |
| 134 | 130 | * XXX TODO: Obsolete? |
| ... | ... | @@ -158,6 +154,4 @@ |
| 158 | 154 | |
| 159 | 155 | |
| 160 | 156 | |
| 161 | #endif /* defined (__i386__) || defined (__x86_64__) */ | |
| 162 | ||
| 163 | 157 | #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+6-11| ... | ... | @@ -67,13 +67,10 @@ |
| 67 | 67 | #ifndef _MACH_I386_VM_TYPES_H_ |
| 68 | 68 | #define _MACH_I386_VM_TYPES_H_ |
| 69 | 69 | |
| 70 | #if defined (__i386__) || defined (__x86_64__) | |
| 71 | ||
| 72 | 70 | #ifndef ASSEMBLER |
| 73 | 71 | |
| 74 | 72 | #include <i386/_types.h> |
| 75 | 73 | #include <stdint.h> |
| 76 | #include <sys/cdefs.h> | |
| 77 | 74 | |
| 78 | 75 | /* |
| 79 | 76 | * natural_t and integer_t are Mach's legacy types for machine- |
| ... | ... | @@ -100,9 +97,9 @@ typedef int integer_t; |
| 100 | 97 | * e.g. an offset into a virtual memory space. |
| 101 | 98 | */ |
| 102 | 99 | #ifdef __LP64__ |
| 103 | typedef uintptr_t vm_offset_t __kernel_ptr_semantics; | |
| 100 | typedef uintptr_t vm_offset_t; | |
| 104 | 101 | #else /* __LP64__ */ |
| 105 | typedef natural_t vm_offset_t __kernel_ptr_semantics; | |
| 102 | typedef natural_t vm_offset_t; | |
| 106 | 103 | #endif /* __LP64__ */ |
| 107 | 104 | |
| 108 | 105 | /* |
| ... | ... | @@ -123,12 +120,12 @@ typedef natural_t vm_size_t; |
| 123 | 120 | * where the size of the map is not known - or we don't |
| 124 | 121 | * want to have to distinguish. |
| 125 | 122 | */ |
| 126 | typedef uint64_t mach_vm_address_t __kernel_ptr_semantics; | |
| 127 | typedef uint64_t mach_vm_offset_t __kernel_ptr_semantics; | |
| 123 | typedef uint64_t mach_vm_address_t; | |
| 124 | typedef uint64_t mach_vm_offset_t; | |
| 128 | 125 | typedef uint64_t mach_vm_size_t; |
| 129 | 126 | |
| 130 | typedef uint64_t vm_map_offset_t __kernel_ptr_semantics; | |
| 131 | typedef uint64_t vm_map_address_t __kernel_ptr_semantics; | |
| 127 | typedef uint64_t vm_map_offset_t; | |
| 128 | typedef uint64_t vm_map_address_t; | |
| 132 | 129 | typedef uint64_t vm_map_size_t; |
| 133 | 130 | |
| 134 | 131 | typedef mach_vm_address_t mach_port_context_t; |
| ... | ... | @@ -141,6 +138,4 @@ typedef mach_vm_address_t mach_port_context_t; |
| 141 | 138 | */ |
| 142 | 139 | #define MACH_MSG_TYPE_INTEGER_T MACH_MSG_TYPE_INTEGER_32 |
| 143 | 140 | |
| 144 | #endif /* defined (__i386__) || defined (__x86_64__) */ | |
| 145 | ||
| 146 | 141 | #endif /* _MACH_I386_VM_TYPES_H_ */ |
| \ No newline at end of file |