[
  {
    "path": ".gitattributes",
    "content": "*.zig text eol=lf\n*.md text eol=lf\n*.patch text eol=lf\nV8_REVISION text eol=lf\n\ncross-macos/** linguist-vendored\n"
  },
  {
    "path": ".github/workflows/build-single.yml",
    "content": "name: Build V8 (Single)\n\non: \n  workflow_dispatch:\n    inputs:\n      host:\n        type: choice\n        description: Host\n        options:\n          - ubuntu-22.04\n          - macos-12\n          - windows-2019\n      target:\n        type: choice\n        description: Target\n        options:\n          - x86_64-linux-gnu\n          - x86_64-macos-none\n          - x86_64-windows-msvc\n          - x86_64-windows-gnu\n          - aarch64-macos-none\n      mode:\n        type: choice\n        description: Mode\n        options:\n          - release\n      toolchain:\n        type: choice\n        description: Toolchain\n        options:\n          - v8\n          - zig\n\njobs:\n  build:\n    name: host=${{ github.event.inputs.host }} target=${{ github.event.inputs.target }} mode=${{ github.event.inputs.mode }} tc=${{ github.event.inputs.toolchain }}\n    runs-on: ${{ github.event.inputs.host }}\n    env:\n      ARCH_OS: >-\n        ${{ fromJson('{\n          \"x86_64-windows-gnu\": \"x86_64-windows\",\n          \"x86_64-windows-msvc\": \"x86_64-windows\",\n          \"x86_64-linux-gnu\": \"x86_64-linux\",\n          \"x86_64-macos-none\": \"x86_64-macos\",\n          \"aarch64-macos-none\": \"aarch64-macos\",\n        }')[github.event.inputs.target] }}\n      ZIG_TARGET_FLAG: >-\n        ${{ fromJson('{\n          \"x86_64-windows-gnu\": \"-Dtarget=x86_64-windows-gnu -Dcpu=baseline\",\n          \"x86_64-windows-msvc\": \"-Dtarget=x86_64-windows-msvc -Dcpu=baseline\",\n          \"x86_64-linux-gnu\": \"-Dtarget=x86_64-linux-gnu -Dcpu=baseline\",\n          \"x86_64-macos-none\": \"-Dtarget=x86_64-macos.12-none -Dcpu=baseline\",\n          \"aarch64-macos-none\": \"-Dtarget=aarch64-macos.12-none -Dcpu=baseline\",\n        }')[github.event.inputs.target] }}\n      LIB_NAME: ${{ contains(github.event.inputs.target, 'windows') && 'c_v8' || 'libc_v8' }}\n      LIB_EXT: ${{ contains(github.event.inputs.target, 'windows') && 'lib' || 'a' }}\n      BUILD_HOST: ${{ matrix.config.host }}\n      BUILD_TARGET: ${{ github.event.inputs.target }}\n      BUILD_MODE: ${{ github.event.inputs.mode }}\n      BUILD_TOOLCHAIN: ${{ github.event.inputs.toolchain }}\n    steps:\n      - name: Clone repo.\n        uses: actions/checkout@v2\n        with:\n          fetch-depth: 1\n          submodules: recursive\n\n      - name: Get build tag.\n        shell: bash\n        # Need single quotes or path sep becomes escapes on windows host. xargs does trimming.\n        run: echo \"BUILD_TAG=$(cat '${{ github.workspace }}/V8_REVISION' | xargs)\" >> $GITHUB_ENV\n\n      - name: Create/Update tag.\n        uses: actions/github-script@v5\n        with:\n          script: |\n            const ref = 'tags/${{ env.BUILD_TAG }}';\n            const res = await github.rest.git.listMatchingRefs({\n              owner: context.repo.owner,\n              repo: context.repo.repo,\n              ref: 'tags/${{ env.BUILD_TAG }}',\n            });\n            if (res.data.length > 0) {\n              await github.rest.git.updateRef({\n                owner: context.repo.owner,\n                repo: context.repo.repo,\n                ref: 'tags/${{ env.BUILD_TAG }}',\n                sha: context.sha,\n              });\n            } else {\n              await github.rest.git.createRef({\n                owner: context.repo.owner,\n                repo: context.repo.repo,\n                // Only create needs full path\n                ref: 'refs/tags/${{ env.BUILD_TAG }}',\n                sha: context.sha,\n              });\n            }\n\n      - name: Install zig.\n        if: env.BUILD_HOST == 'ubuntu-22.04'\n        run: |\n          wget -c https://ziglang.org/builds/zig-linux-x86_64-0.11.0-dev.944+a193ec432.tar.xz -O - | tar -xJ --strip-components=1 -C /usr/local/bin\n\n      - name: Install zig.\n        if: env.BUILD_HOST == 'macos-12'\n        run: |\n          wget -c https://ziglang.org/builds/zig-macos-x86_64-0.11.0-dev.944+a193ec432.tar.xz -O - | tar -xJ --strip-components=1 -C /usr/local/bin\n          xcode-select --print-path\n\n      - name: Cache.\n        if: env.BUILD_TOOLCHAIN == 'zig'\n        uses: actions/cache@v2\n        with:\n          path: |-\n            ~/.cache/zig\n          key:\n            c_v8-${{ env.BUILD_TARGET }}-${{ env.BUILD_MODE }}-zig2\n          restore-keys:\n            c_v8-${{ env.BUILD_TARGET }}-${{ env.BUILD_MODE }}-zig2\n\n      - name: Cache.\n        if: env.BUILD_TOOLCHAIN == 'v8'\n        uses: actions/cache@v2\n        with:\n          # Restore sccache so subsequent runs can reuse the cache.\n          # TODO: Might be useful to restore some of v8 source deps so get-v8 does less work.\n          path: |-\n            sccache\n          key:\n            # The cache can behave unexpectedly (usually happens when we change the path), so we just increase a simple id counter to create a new cache.\n            c_v8-${{ env.BUILD_TARGET }}-${{ env.BUILD_MODE }}-2\n          restore-keys:\n            # Reuse a previous cache.\n            c_v8-${{ env.BUILD_TARGET }}-${{ env.BUILD_MODE }}-\n\n      - name: Install and start sccache.\n        if: env.BUILD_TOOLCHAIN == 'v8'\n        shell: pwsh\n        env:\n          SCCACHE_DIR: ${{ github.workspace }}/sccache\n          # Compiling all of v8 takes up about 100M for debug builds so this is a good starting point.\n          SCCACHE_CACHE_SIZE: 128M\n          SCCACHE_IDLE_TIMEOUT: 0\n        run: |\n          $version = \"v0.2.15\"\n          $platform =\n            @{ \"macOS\"   = \"x86_64-apple-darwin\"\n               \"Linux\"   = \"x86_64-unknown-linux-musl\"\n               \"Windows\" = \"x86_64-pc-windows-msvc\"\n             }.${{ runner.os }}\n          $basename = \"sccache-$version-$platform\"\n          $url = \"https://github.com/mozilla/sccache/releases/download/\" +\n                 \"$version/$basename.tar.gz\"\n          cd ~\n          curl -LO $url\n          tar -xzvf \"$basename.tar.gz\"\n          chmod a+x $basename/sccache\n          . $basename/sccache --start-server\n          echo \"$(pwd)/$basename\" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append\n\n      - name: Get V8 Tools.\n        run: zig build get-tools\n\n      - name: Get V8 Source.\n        run: zig build get-v8\n\n      - name: Build release.\n        if: env.BUILD_MODE == 'release' && env.BUILD_TOOLCHAIN == 'v8'\n        run: zig build -Drelease-safe ${{ env.ZIG_TARGET_FLAG }}\n\n      - name: Build release.\n        if: env.BUILD_MODE == 'release' && env.BUILD_TOOLCHAIN == 'zig'\n        run: zig build -Drelease-safe ${{ env.ZIG_TARGET_FLAG }} -Dzig-toolchain\n\n      - name: Build debug.\n        if: env.BUILD_MODE == 'debug'\n        run: zig build\n\n      - name: Copy binary.\n        if: env.BUILD_TARGET != 'x86_64-windows-gnu'\n        continue-on-error: true\n        run: cp\n          v8-build/${{ env.ARCH_OS }}/${{ env.BUILD_MODE }}/ninja/obj/zig/${{ env.LIB_NAME }}.${{ env.LIB_EXT }}\n          v8-build/${{ env.LIB_NAME }}_${{ env.BUILD_TARGET }}_${{ env.BUILD_MODE }}_${{ env.BUILD_TAG }}.${{ env.LIB_EXT }}\n\n      - name: Copy binary.\n        if: env.BUILD_TARGET == 'x86_64-windows-gnu'\n        continue-on-error: true\n        run: cp\n          v8-build/${{ env.ARCH_OS }}/${{ env.BUILD_MODE }}/ninja/obj/zig/libc_v8.a\n          v8-build/${{ env.LIB_NAME }}_${{ env.BUILD_TARGET }}_${{ env.BUILD_MODE }}_${{ env.BUILD_TAG }}.${{ env.LIB_EXT }}\n\n      - name: Github Release.\n        uses: softprops/action-gh-release@v0.1.14\n        # Github requires tags for releases.\n        #if: startsWith(github.ref, 'refs/tags/')\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n        with:\n          body: Release\n          name: ${{ env.BUILD_TAG }}\n          tag_name: ${{ env.BUILD_TAG }}\n          files: v8-build/${{ env.LIB_NAME }}_${{ env.BUILD_TARGET }}_${{ env.BUILD_MODE }}_${{ env.BUILD_TAG }}.${{ env.LIB_EXT }}\n\n      - name: Stop sccache.\n        if: env.BUILD_TOOLCHAIN == 'v8' && always()\n        run: |\n          sccache --show-stats\n          sccache --stop-server\n"
  },
  {
    "path": ".github/workflows/build.yml",
    "content": "name: Build V8\n\non: [workflow_dispatch, push]\n\nconcurrency:\n  group: my-group\n  cancel-in-progress: true\n\njobs:\n  build:\n    name: host=${{ matrix.config.host }} target=${{ matrix.config.target }} mode=${{ matrix.config.mode }} tc=${{ matrix.config.toolchain }}\n    runs-on: ${{ matrix.config.host }}\n    strategy:\n      fail-fast: true\n      matrix:\n        config:\n          - host: ubuntu-22.04\n            target: x86_64-linux-gnu\n            mode: release\n            toolchain: zig\n          - host: macos-12\n            target: x86_64-macos-none\n            mode: release\n            toolchain: v8\n          - host: ubuntu-22.04\n            target: x86_64-windows-gnu\n            mode: release\n            toolchain: zig\n          - host: ubuntu-22.04\n            target: aarch64-macos-none\n            mode: release\n            toolchain: zig\n    env:\n      ARCH_OS: >-\n        ${{ fromJson('{\n          \"x86_64-windows-gnu\": \"x86_64-windows\",\n          \"x86_64-linux-gnu\": \"x86_64-linux\",\n          \"x86_64-macos-none\": \"x86_64-macos\",\n          \"aarch64-macos-none\": \"aarch64-macos\",\n        }')[matrix.config.target] }}\n      ZIG_TARGET_FLAG: >-\n        ${{ fromJson('{\n          \"x86_64-windows-gnu\": \"-Dtarget=x86_64-windows-gnu -Dcpu=baseline\",\n          \"x86_64-linux-gnu\": \"-Dtarget=x86_64-linux-gnu -Dcpu=baseline\",\n          \"x86_64-macos-gnu\": \"-Dtarget=x86_64-macos.12-none -Dcpu=baseline\",\n          \"aarch64-macos-gnu\": \"-Dtarget=aarch64-macos.12-none -Dcpu=baseline\",\n        }')[matrix.config.target] }}\n      BUILD_HOST: ${{ matrix.config.host }}\n      BUILD_TARGET: ${{ matrix.config.target }}\n      BUILD_MODE: ${{ matrix.config.mode }}\n      BUILD_TOOLCHAIN: ${{ matrix.config.toolchain }}\n      LIB_NAME: ${{ contains(matrix.config.target, 'windows') && 'c_v8' || 'libc_v8' }}\n      LIB_EXT: ${{ contains(matrix.config.target, 'windows') && 'lib' || 'a' }}\n    steps:\n      - name: Clone repo.\n        uses: actions/checkout@v2\n        with:\n          fetch-depth: 1\n          submodules: recursive\n\n      - name: Get build tag.\n        shell: bash\n        # Need single quotes or path sep becomes escapes on windows host. xargs does trimming.\n        run: echo \"BUILD_TAG=$(cat '${{ github.workspace }}/V8_REVISION' | xargs)\" >> $GITHUB_ENV\n\n      - name: Create/Update tag.\n        uses: actions/github-script@v5\n        with:\n          script: |\n            const ref = 'tags/${{ env.BUILD_TAG }}';\n            const res = await github.rest.git.listMatchingRefs({\n              owner: context.repo.owner,\n              repo: context.repo.repo,\n              ref: 'tags/${{ env.BUILD_TAG }}',\n            });\n            if (res.data.length > 0) {\n              await github.rest.git.updateRef({\n                owner: context.repo.owner,\n                repo: context.repo.repo,\n                ref: 'tags/${{ env.BUILD_TAG }}',\n                sha: context.sha,\n              });\n            } else {\n              await github.rest.git.createRef({\n                owner: context.repo.owner,\n                repo: context.repo.repo,\n                // Only create needs full path\n                ref: 'refs/tags/${{ env.BUILD_TAG }}',\n                sha: context.sha,\n              });\n            }\n\n      - name: Install zig.\n        if: env.BUILD_HOST == 'ubuntu-22.04'\n        run: |\n          wget -c https://ziglang.org/builds/zig-linux-x86_64-0.11.0-dev.1797+d3c9bfada.tar.xz -O - | tar -xJ --strip-components=1 -C /usr/local/bin\n\n      - name: Install zig.\n        if: env.BUILD_HOST == 'macos-12'\n        run: |\n          wget -c https://ziglang.org/builds/zig-macos-x86_64-0.11.0-dev.1797+d3c9bfada.tar.xz -O - | tar -xJ --strip-components=1 -C /usr/local/bin\n          xcode-select --print-path\n\n      - name: Cache.\n        if: env.BUILD_TOOLCHAIN == 'zig'\n        uses: actions/cache@v2\n        with:\n          path: |-\n            ~/.cache/zig\n          key:\n            c_v8-${{ env.BUILD_TARGET }}-${{ env.BUILD_MODE }}-zig2\n          restore-keys:\n            c_v8-${{ env.BUILD_TARGET }}-${{ env.BUILD_MODE }}-zig2\n\n      - name: Cache.\n        if: env.BUILD_TOOLCHAIN == 'v8'\n        uses: actions/cache@v2\n        with:\n          # Restore sccache so subsequent runs can reuse the cache.\n          # TODO: Might be useful to restore some of v8 source deps so get-v8 does less work.\n          path: |-\n            sccache\n          key:\n            # The cache can behave unexpectedly (usually happens when we change the path), so we just increase a simple id counter to create a new cache.\n            c_v8-${{ env.BUILD_TARGET }}-${{ env.BUILD_MODE }}-2\n          restore-keys:\n            # Reuse a previous cache.\n            c_v8-${{ env.BUILD_TARGET }}-${{ env.BUILD_MODE }}-\n\n      - name: Install and start sccache.\n        if: env.BUILD_TOOLCHAIN == 'v8'\n        shell: pwsh\n        env:\n          SCCACHE_DIR: ${{ github.workspace }}/sccache\n          # Compiling all of v8 takes up about 100M for debug builds so this is a good starting point.\n          SCCACHE_CACHE_SIZE: 128M\n          SCCACHE_IDLE_TIMEOUT: 0\n        run: |\n          $version = \"v0.2.15\"\n          $platform =\n            @{ \"macOS\"   = \"x86_64-apple-darwin\"\n               \"Linux\"   = \"x86_64-unknown-linux-musl\"\n               \"Windows\" = \"x86_64-pc-windows-msvc\"\n             }.${{ runner.os }}\n          $basename = \"sccache-$version-$platform\"\n          $url = \"https://github.com/mozilla/sccache/releases/download/\" +\n                 \"$version/$basename.tar.gz\"\n          cd ~\n          curl -LO $url\n          tar -xzvf \"$basename.tar.gz\"\n          chmod a+x $basename/sccache\n          . $basename/sccache --start-server\n          echo \"$(pwd)/$basename\" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append\n\n      - name: Get V8 Tools.\n        run: zig build get-tools\n\n      - name: Get V8 Source.\n        run: zig build get-v8\n\n      - name: Build release.\n        if: env.BUILD_MODE == 'release' && env.BUILD_TOOLCHAIN == 'v8'\n        run: zig build -Doptimize=ReleaseSafe ${{ env.ZIG_TARGET_FLAG }}\n\n      - name: Build release.\n        if: env.BUILD_MODE == 'release' && env.BUILD_TOOLCHAIN == 'zig'\n        run: zig build -Doptimize=ReleaseSafe ${{ env.ZIG_TARGET_FLAG }} -Dzig-toolchain\n\n      - name: Build debug.\n        if: env.BUILD_MODE == 'debug'\n        run: zig build\n\n      - name: Copy binary.\n        if: env.BUILD_TARGET != 'x86_64-windows-gnu'\n        continue-on-error: true\n        run: cp\n          v8-build/${{ env.ARCH_OS }}/${{ env.BUILD_MODE }}/ninja/obj/zig/${{ env.LIB_NAME }}.${{ env.LIB_EXT }}\n          v8-build/${{ env.LIB_NAME }}_${{ env.BUILD_TARGET }}_${{ env.BUILD_MODE }}_${{ env.BUILD_TAG }}.${{ env.LIB_EXT }}\n\n      - name: Copy binary.\n        if: env.BUILD_TARGET == 'x86_64-windows-gnu'\n        continue-on-error: true\n        run: cp\n          v8-build/${{ env.ARCH_OS }}/${{ env.BUILD_MODE }}/ninja/obj/zig/libc_v8.a\n          v8-build/${{ env.LIB_NAME }}_${{ env.BUILD_TARGET }}_${{ env.BUILD_MODE }}_${{ env.BUILD_TAG }}.${{ env.LIB_EXT }}\n\n      - name: Github Release.\n        uses: softprops/action-gh-release@v0.1.14\n        # Github requires tags for releases.\n        #if: startsWith(github.ref, 'refs/tags/')\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n        with:\n          body: Release\n          name: ${{ env.BUILD_TAG }}\n          tag_name: ${{ env.BUILD_TAG }}\n          files: v8-build/${{ env.LIB_NAME }}_${{ env.BUILD_TARGET }}_${{ env.BUILD_MODE }}_${{ env.BUILD_TAG }}.${{ env.LIB_EXT }}\n\n      - name: Stop sccache.\n        if: env.BUILD_TOOLCHAIN == 'v8' && always()\n        run: |\n          sccache --show-stats\n          sccache --stop-server\n"
  },
  {
    "path": ".gitignore",
    "content": "/zig-cache/\n/tools/ninja_gn_binaries*\n/v8-build/\n/gclient/\n/v8/\n/zig-out/\n/vendor\n/libc_v8.a\n/tools/\n"
  },
  {
    "path": ".gn",
    "content": "# This file is used by the GN meta build system to find the root of the source\n# tree and to set startup options. For documentation on the values set in this\n# file, run \"gn help dotfile\" at the command line.\n\n# Use the default python3 so gn succeeds. Not sure why deno requires python2 atm.\nscript_executable = \"python3\"\n\n# The location of the build configuration file.\nbuildconfig = \"//build/config/BUILDCONFIG.gn\"\n\n# These are the targets to check headers for by default. The files in targets\n# matching these patterns (see \"gn help label_pattern\" for format) will have\n# their includes checked for proper dependencies when you run either\n# \"gn check\" or \"gn gen --check\".\ncheck_targets = []\n\n# The secondary source root is a parallel directory tree where\n# GN build files are placed when they can not be placed directly\n# in the source tree, e.g. for third party source trees.\n#secondary_source = \"//gclient/v8\"\n\ndefault_args = {\n  linux_use_bundled_binutils = false\n  use_sysroot = false\n\n  use_dummy_lastchange = true\n  treat_warnings_as_errors = true\n  v8_enable_shared_ro_heap = false\n  v8_imminent_deprecation_warnings = false\n  clang_use_chrome_plugins = false\n  v8_monolithic = false\n  v8_use_external_startup_data = false\n  \n  v8_use_snapshot = true\n  is_component_build = false\n  win_crt_flavor_agnostic = true\n}\n"
  },
  {
    "path": "BUILD.gclient.gn",
    "content": "# Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.\n# Based on https://github.com/denoland/rusty_v8/blob/main/BUILD.gn\nimport(\"//build/config/host_byteorder.gni\")\n\nstatic_library(\"c_v8\") {\n  complete_static_lib = true\n  sources = [ \"../../../src/binding.cpp\" ]\n  deps = [\n    \"//build/config:shared_library_deps\",\n    \"//:v8\",\n    \"//:v8_libbase\",\n    \"//:v8_libplatform\",\n  ]\n  configs -= [\n    \"//build/config/compiler:default_init_stack_vars\",\n    \"//build/config/compiler:thin_archive\",\n  ]\n  configs += [ \":c_v8_config\" ]\n}\n\nconfig(\"c_v8_config\") {\n  configs = [\n    \"//:external_config\",\n    \"//:toolchain\",\n    \"//:features\",\n  ]\n  cflags = []\n\n  # We need these directories in the search path to be able to include some\n  # internal V8 headers.\n  include_dirs = [\n    \"v8\",\n    \"$target_gen_dir/v8\",\n  ]\n\n  if (is_debug) {\n    defines = [ \"DEBUG\" ]\n  }\n\n  if (is_clang) {\n    cflags += [\n      \"-fcolor-diagnostics\",\n      \"-fansi-escape-codes\",\n    ]\n  }\n\n  if (is_debug && is_clang && !is_win) {\n    cflags += [ \"-glldb\" ]\n  }\n}"
  },
  {
    "path": "BUILD.gn",
    "content": "# Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.\n# Based on https://github.com/denoland/rusty_v8/blob/main/BUILD.gn\nimport(\"//build/config/host_byteorder.gni\")\nimport(\"//build/toolchain/gcc_toolchain.gni\")\nimport(\"//build/config/c++/c++.gni\")\n\nstatic_library(\"c_v8\") {\n  complete_static_lib = true\n\n  sources = [ \"../../src/binding.cpp\" ]\n  deps = [\n    \"//build/config:shared_library_deps\",\n    \"//:v8\",\n    \"//:v8_libbase\",\n    \"//:v8_libplatform\",\n  ]\n  configs -= [\n    \"//build/config/compiler:default_init_stack_vars\",\n    \"//build/config/compiler:thin_archive\",\n  ]\n  configs += [ \":c_v8_config\" ]\n}\n\nconfig(\"c_v8_config\") {\n  configs = [\n    \"//:external_config\",\n    \"//:toolchain\",\n    \"//:features\",\n  ]\n  cflags = []\n\n  # We need these directories in the search path to be able to include some\n  # internal V8 headers.\n  include_dirs = [\n    \"v8\",\n    \"$target_gen_dir/v8\",\n  ]\n\n  if (is_debug) {\n    defines = [ \"DEBUG\" ]\n  }\n\n  if (is_clang) {\n    cflags += [\n      \"-fcolor-diagnostics\",\n      \"-fansi-escape-codes\",\n    ]\n  }\n\n  if (is_debug && is_clang && !is_win) {\n    cflags += [ \"-glldb\" ]\n  }\n}\n\n# Based on template(\"clang_toolchain\") in build/toolchain/gcc_toolchain.gni\ntemplate(\"zig_toolchain\") {\n  gcc_toolchain(target_name) {\n    prefix = rebase_path(\"$clang_base_path/bin\", root_build_dir)\n    readelf = \"${prefix}/llvm-readelf\"\n    # Is this even used?\n    nm = \"${prefix}/llvm-nm\"\n\n    if (current_cpu == \"x64\" && current_os == \"linux\") {\n      # From //build/toolchain/linux:clang_x64\n\n      # Output linker map files for binary size analysis.\n      enable_linker_map = true\n    }\n\n    forward_variables_from(invoker,\n      [\n        \"strip\",\n        \"default_shlib_subdir\",\n        \"dwp\",\n        \"enable_linker_map\",\n        \"loadable_module_extension\",\n        \"use_unstripped_as_runtime_outputs\",\n        \"cc\",\n        \"cxx\",\n        \"ld\",\n        \"ar\",\n        \"extra_cppflags\",\n      ])\n\n    toolchain_args = {\n      if (defined(invoker.toolchain_args)) {\n        forward_variables_from(invoker.toolchain_args, \"*\")\n      }\n      is_clang = true\n    }\n  }\n}\n\n# Used to compile the v8 library.\nzig_toolchain(\"main_zig_toolchain\") {\n  cc = zig_cc\n  cxx = zig_cxx\n  # ld commands in v8 use cxx with -fuse-ld\n  ld = cxx\n  #ar = \"${prefix}/llvm-ar\"\n  ar = \"zig ar\"\n\n  extra_cppflags = \"-Wno-unused-but-set-variable\"\n\n  toolchain_args = {\n    current_cpu = target_cpu\n    current_os = target_os\n  }\n}\n\n# Used to compile v8 snapshots/generators to run locally.\n# v8_current_cpu indicates that we are still targeting a different arch but must compile tools to run on host machine.\n# See gni/snapshot_toolchain.gni\nzig_toolchain(\"v8_zig_toolchain\") {\n  cc = host_zig_cc\n  cxx = host_zig_cxx\n  # ld commands in v8 use cxx with -fuse-ld\n  ld = cxx\n  #ar = \"${prefix}/llvm-ar\"\n  ar = \"zig ar\"\n\n  extra_cppflags = \"-Wno-unused-but-set-variable\"\n\n  toolchain_args = {\n    current_os = host_os\n    current_cpu = host_cpu\n    v8_current_cpu = target_cpu\n  }\n}\n"
  },
  {
    "path": "LICENSE",
    "content": "MIT License\n\nCopyright (c) 2021 fubark\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "README.md",
    "content": "# zig-v8\n\nBuilds V8 from official source and provides C bindings and a Zig API. This would be used for embedding the V8 runtime into your Zig or C ABI compatible projects.\n\nV8 is the JS/WASM runtime that powers Google Chrome and Microsoft Edge.\n\n## Project Status\nStatic libs are built and released with [Github Actions](https://github.com/fubark/zig-v8/actions).\n| Native | Cross Compile | Target | Demo Binary ([shell.zig](https://github.com/fubark/zig-v8/blob/master/src/shell.zig))* |\n| ------ | ------ | -------- | -------- |\n| ✅ | | Linux x64 | shell - 19 M |\n| ✅ | ✅ | Windows x64 | shell.exe - 14 M |\n| ✅ | | macOS x64 | shell - 24 M |\n| ✅ | ✅ | macOS arm64 | shell - 21 M |\n\n\\* shell.zig is a JS repl and statically linked with v8. Compiled with -Doptimize=ReleaseSafe. The V8 dependency can be further reduced in size if you don't need all the features (eg. disable WASM runtime).\n\n| Toolchain | Fresh Build* | Cached Build* |\n| ------ | ------ | ------ |\n| gclient, full feature + v8 toolchain | 1.5-2 hrs | with sccache: 10-20min |\n| minimal feature + v8 toolchain | 40-50 min | with sccache: 5-10min |\n| minimal feature + zig c++ toolchain |  | with zig caching:  |\n\n\\* Time is measured on standard Github instances.\n\n## System Requirements\n- Zig compiler (0.11.0). You can get that [here](https://ziglang.org/download/).\n- Python 3 (2.7 seems to work as well)\n- For native macOS builds:\n  - XCode (You won't need this when using zig's c++ toolchain!)<br/>\nif you come across this error:<br />\n`xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance`<br />\n  run `sudo xcode-select -s /Applications/Xcode.app/Contents/Developer`\n\n## Build\nBy default UseGclient=false in build.zig. This will pull the minimum sources and deps needed to build v8 and reduce build times.\n\nIf you want to include everything, set UseGclient=true. Build times can be quite long using gclient but afterwards rerunning \"zig build\" should be incremental. You can also use sccache for better incremental build times.\n\n```sh\n# Clone the repo.\ngit clone https://github.com/fubark/zig-v8.git\ncd zig-v8\n\n# Pull prebuilt GN/Ninja. If UseGclient=true, it also pulls depot_tools.\nzig build get-tools\n\n# Pull v8 source\nzig build get-v8\n\n# Build, resulting static library should be at:\n# v8-build/{target}/{debug/release}/ninja/obj/zig/libc_v8.a\n# On windows, use msvc: zig build -Doptimize=ReleaseSafe -Dtarget=x86_64-windows-msvc\nzig build -Doptimize=ReleaseSafe\n```\n## Demo\n```sh\n# shell.zig is a simple JS repl.\n# Assumes you've already built v8.\nzig build run -Dpath=\"src/shell.zig\" -Doptimize=ReleaseSafe\n\n# If you built v8 using the zig toolchain, you'll need to add the flag here as well.\nzig build run -Dpath=\"src/shell.zig\" -Doptimize=ReleaseSafe -Dzig-toolchain\n```\n\n## Cross Compiling\nWith Zig's toolchain, we can build V8 from libstdc++ that's bundled with zig and cross compile to foreign targets/cpus! Simply amazing. Eventually, this will also replace the default V8 toolchain for native builds after further testing.\n### Linux x64 (Host) to MacOS arm64 (Target)\n```sh\n# Assumes you've fetched tools and v8 sources. See above build steps.\n# Resulting static lib will be at:\n# v8-build/aarch64-macos/release/ninja/obj/zig/libc_v8.a\nzig build -Doptimize=ReleaseSafe -Dtarget=aarch64-macos-gnu -Dzig-toolchain\n```\n\n### Cross compile to Windows with gnu (mingw64)\nZig comes with mingw64 source and headers so you'll be able to target Windows without MSVC.\n```sh\nzig build -Doptimize=ReleaseSafe -Dtarget=x86_64-windows-gnu -Dzig-toolchain\n```\n\n## Usage\n\nSee src/shell.zig or test/test.zig on how to use the library with the Zig API as well as build.zig (fn linkV8) on how to link with the built V8 static library.\n\n## Contributing\n\nThe C bindings is incomplete but it should be relatively easy to add more as we need them.\n\nC API naming convention should closely follow the V8 C++ API.\n\n## Troubleshooting\n\nIf you get an error saying that it can't find any of the following:\n\n```\n\npkg-config\nglib-2.0\ngmodule-2.0\ngobject-2.0\ngthread-2.0\n\n```\n\nYou'll need to run the following command before continuing:\n\n```\nsudo apt install -y pkg-config libglib2.0-dev\n```\nOr your distro's equivalent\n"
  },
  {
    "path": "V8_REVISION",
    "content": "11.1.134\n"
  },
  {
    "path": "build.zig",
    "content": "const std = @import(\"std\");\nconst json = std.json;\nconst Builder = std.Build;\nconst Step = std.Build.Step;\nconst print = std.debug.print;\nconst builtin = @import(\"builtin\");\nconst Pkg = std.build.Pkg;\n\nconst fs = std.fs;\n\npub fn build(b: *Builder) !void {\n    // Options.\n    //const build_v8 = b.option(bool, \"build_v8\", \"Whether to build from v8 source\") orelse false;\n    const path = b.option([]const u8, \"path\", \"Path to main file, for: build, run\") orelse \"\";\n    const use_zig_tc = b.option(bool, \"zig-toolchain\", \"Experimental: Use zig cc/c++/ld to build v8.\") orelse false;\n\n    const mode = b.standardOptimizeOption(.{}); //FIXED\n    const target = b.standardTargetOptions(.{});\n\n    _ = createGetTools(b);\n    _ = createGetV8(b);\n\n    const v8 = try createV8_Build(b, target, mode, use_zig_tc);\n\n    const tests = createTest(b, target, mode, use_zig_tc);\n    tests.step.dependOn(v8);\n\n    const test_step = b.addRunArtifact(tests);\n    b.step(\"test\", \"Run unit tests\").dependOn(&test_step.step);\n\n    const build_exe = createBuildExeStep(b, path, target, mode, use_zig_tc);\n\n    const run_exe = b.addRunArtifact(build_exe);\n    b.step(\"run\", \"Run with main file at -Dpath\").dependOn(&run_exe.step);\n\n    b.default_step.dependOn(v8);\n}\n\n// When this is true, we'll strip V8 features down to a minimum so the resulting library is smaller.\n// eg. i18n will be excluded.\nconst MinimalV8 = true;\n\n// gclient is comprehensive and will pull everything for the v8 project.\n// Set this to false to pull the minimal required src by parsing v8/DEPS and whitelisting deps we care about.\nconst UseGclient = false;\n\n// V8's build process is complex and porting it to zig could take quite awhile.\n// It would be nice if there was a way to import .gn files into the zig build system.\n// For now we just use gn/ninja like rusty_v8 does: https://github.com/denoland/rusty_v8/blob/main/build.rs\nfn createV8_Build(b: *Builder, target: std.Build.ResolvedTarget, mode: std.builtin.OptimizeMode, use_zig_tc: bool) !*std.Build.Step {\n    const step = b.step(\"v8\", \"Build v8 c binding lib.\");\n\n    if (UseGclient) {\n        const mkpath = MakePathStep.create(b, \"./gclient/v8/zig\");\n        step.dependOn(&mkpath.step);\n\n        const cp = CopyFileStep.create(b, b.pathFromRoot(\"BUILD.gclient.gn\"), b.pathFromRoot(\"gclient/v8/zig/BUILD.gn\"));\n        step.dependOn(&cp.step);\n    } else {\n        const mkpath = MakePathStep.create(b, \"./v8/zig\");\n        step.dependOn(&mkpath.step);\n\n        const cp = CopyFileStep.create(b, b.pathFromRoot(\"BUILD.gn\"), b.pathFromRoot(\"v8/zig/BUILD.gn\"));\n        step.dependOn(&cp.step);\n    }\n\n    var gn_args = std.ArrayList([]const u8).init(b.allocator);\n\n    switch (target.result.os.tag) {\n        .macos => try gn_args.append(\"target_os=\\\"mac\\\"\"),\n        .windows => {\n            try gn_args.append(\"target_os=\\\"win\\\"\");\n            if (!UseGclient) {\n                // Don't use depot_tools.\n                try b.graph.env_map.put(\"DEPOT_TOOLS_WIN_TOOLCHAIN\", \"0\");\n            }\n        },\n        .linux => try gn_args.append(\"target_os=\\\"linux\\\"\"),\n        else => {},\n    }\n    switch (target.result.cpu.arch) {\n        .x86_64 => try gn_args.append(\"target_cpu=\\\"x64\\\"\"),\n        .aarch64 => try gn_args.append(\"target_cpu=\\\"arm64\\\"\"),\n        else => {},\n    }\n\n    var zig_cc = std.ArrayList([]const u8).init(b.allocator);\n    var zig_cxx = std.ArrayList([]const u8).init(b.allocator);\n    var host_zig_cc = std.ArrayList([]const u8).init(b.allocator);\n    var host_zig_cxx = std.ArrayList([]const u8).init(b.allocator);\n\n    if (mode == .Debug) {\n        try gn_args.append(\"is_debug=true\");\n        // full debug info (symbol_level=2).\n        // Setting symbol_level=1 will produce enough information for stack traces, but not line-by-line debugging.\n        // Setting symbol_level=0 will include no debug symbols at all. Either will speed up the build compared to full symbols.\n        // This will eventually pass down to v8_symbol_level.\n        try gn_args.append(\"symbol_level=1\");\n    } else {\n        try gn_args.append(\"is_debug=false\");\n        try gn_args.append(\"symbol_level=0\");\n\n        // is_official_build is meant to ship chrome.\n        // It might be interesting to see how far we can get with it (previously saw illegal instruction in Zone::NewExpand during mksnapshot_default since stacktraces were removed)\n        // but a better approach for now is to set to false and slowly enable optimizations. eg. We probably still want to unwind stack traces.\n        try gn_args.append(\"is_official_build=false\");\n        // is_official_build will do pgo optimization by default for chrome specific builds that require gclient to fetch profile data.\n        // https://groups.google.com/a/chromium.org/g/chromium-dev/c/-0t4s0RlmOI\n        // Disable that with this:\n        //try gn_args.append(\"chrome_pgo_phase=0\");\n        //if (use_zig_tc) {\n        // is_official_build will enable cfi but zig does not come with the default cfi_ignorelist.\n        //try zig_cppflags.append(\"-fno-sanitize-ignorelist\");\n        //}\n\n        // TODO: Might want to turn V8_ENABLE_CHECKS off to remove asserts.\n    }\n\n    if (MinimalV8) {\n        // Don't add i18n for now. It has a large dependency on third_party/icu.\n        try gn_args.append(\"v8_enable_i18n_support=false\");\n    }\n\n    if (mode != .Debug) {\n        // TODO: document\n        try gn_args.append(\"v8_enable_handle_zapping=false\");\n    }\n\n    // Fix GN's host_cpu detection when using x86_64 bins on Apple Silicon\n    if (builtin.os.tag == .macos and builtin.cpu.arch == .aarch64) {\n        try gn_args.append(\"host_cpu=\\\"arm64\\\"\");\n    }\n\n    if (use_zig_tc) {\n        // Set target and cpu for building the lib.\n        // TODO: If mcpu is equavalent to -Dcpu then use that instead\n        try zig_cc.append(b.fmt(\"zig cc --target={s} -mcpu=baseline\", .{try target.result.zigTriple(b.allocator)}));\n        try zig_cxx.append(b.fmt(\"zig c++ --target={s} -mcpu=baseline\", .{try target.result.zigTriple(b.allocator)}));\n\n        try host_zig_cc.append(\"zig cc --target=native\");\n        try host_zig_cxx.append(\"zig c++ --target=native\");\n\n        // Ignore \"a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]\"\n        try zig_cc.append(\"-Wno-deprecated-non-prototype\");\n        try zig_cxx.append(\"-Wno-deprecated-non-prototype\");\n        try host_zig_cc.append(\"-Wno-deprecated-non-prototype\");\n        try host_zig_cxx.append(\"-Wno-deprecated-non-prototype\");\n\n        // For zlib.\n        try zig_cc.append(\"-mcrc32\");\n        try zig_cxx.append(\"-mcrc32\");\n\n        if (target.result.os.tag == .windows and target.result.abi == .gnu) {\n            // V8 expects __declspec(dllexport) to not expand in it's test in src/base/export-template.h but it does when compiling with mingw.\n            try zig_cxx.append(\"-DEXPORT_TEMPLATE_TEST_MSVC_HACK_DEFAULT\\\\(...\\\\)=true\");\n        }\n        if (target.result.os.tag == .windows and builtin.os.tag != .windows) {\n            // Cross building to windows probably is case sensitive to header files, so provide them in include.\n            // Note: Directory is relative to ninja build folder.\n            try zig_cxx.append(\"-I../../../../cross-windows\");\n\n            // Make src/base/bits.h include win32-headers.h\n            try zig_cxx.append(\"-DV8_OS_WIN32=1\");\n\n            // Use wchar_t unicode functions.\n            try zig_cxx.append(\"-DUNICODE=1\");\n\n            // clang doesn't seem to recognize guard(nocf) even with -fdeclspec. It might be because mingw has a macro for __declspec.\n            try zig_cxx.append(\"-Wno-error=unknown-attributes\");\n\n            // include/v8config.h doesn't set mingw flags if __clang__ is defined.\n            try zig_cxx.append(\"-DV8_CC_MINGW32=1\");\n            try zig_cxx.append(\"-DV8_CC_MINGW64=1\");\n            try zig_cxx.append(\"-DV8_CC_MINGW=1\");\n\n            // Windows version. See build/config/win/BUILD.gn\n            try zig_cxx.append(\"-DNTDDI_VERSION=NTDDI_WIN10_VB\");\n            try zig_cxx.append(\"-D_WIN32_WINNT=0x0A00\");\n            try zig_cxx.append(\"-DWINVER=0x0A00\");\n\n            // Enable support for MSVC pragmas.\n            try zig_cxx.append(\"-fms-extensions\");\n\n            // Disable instrumentation since mingw doesn't have TraceLoggingProvider.h\n            try gn_args.append(\"v8_enable_system_instrumentation=false\");\n            try gn_args.append(\"v8_enable_etw_stack_walking=false\");\n        }\n\n        // Use zig's libcxx instead.\n        // If there are problems we can see what types of flags are enabled when this is true.\n        try gn_args.append(\"use_custom_libcxx=false\");\n\n        // custom_toolchain is how we can set zig as the cc/cxx compiler and linker.\n        try gn_args.append(\"custom_toolchain=\\\"//zig:main_zig_toolchain\\\"\");\n\n        if (target.result.os.tag == .linux and target.result.cpu.arch == .x86_64) {\n            // Should add target flags that matches: //build/config/compiler:compiler_cpu_abi\n            try zig_cc.append(\"-m64\");\n            try zig_cxx.append(\"-m64\");\n        } else if (target.result.os.tag == .macos) {\n            if (!target.query.isNative()) {\n                // Cross compiling.\n                const sysroot_abs = b.pathFromRoot(\"./cross-macos/sysroot/macos-12/usr/include\");\n                try zig_cc.append(\"-isystem\");\n                try zig_cc.append(sysroot_abs);\n                try zig_cxx.append(\"-isystem\");\n                try zig_cxx.append(sysroot_abs);\n            }\n        }\n        if (builtin.cpu.arch != target.result.cpu.arch or builtin.os.tag != target.result.os.tag) {\n            try gn_args.append(\"v8_snapshot_toolchain=\\\"//zig:v8_zig_toolchain\\\"\");\n        }\n\n        // Just warn for now. TODO: Check to remove after next clang update.\n        // https://bugs.chromium.org/p/chromium/issues/detail?id=1016945\n        try zig_cxx.append(\"-Wno-error=builtin-assume-aligned-alignment\");\n        try host_zig_cxx.append(\"-Wno-error=builtin-assume-aligned-alignment\");\n\n        try gn_args.append(\"use_zig_tc=true\");\n        try gn_args.append(\"cxx_use_ld=\\\"zig ld.lld\\\"\");\n\n        // Build zig cc strings.\n        var arg = b.fmt(\"zig_cc=\\\"{s}\\\"\", .{try std.mem.join(b.allocator, \" \", zig_cc.items)});\n        try gn_args.append(arg);\n        arg = b.fmt(\"zig_cxx=\\\"{s}\\\"\", .{try std.mem.join(b.allocator, \" \", zig_cxx.items)});\n        try gn_args.append(arg);\n        arg = b.fmt(\"host_zig_cc=\\\"{s}\\\"\", .{try std.mem.join(b.allocator, \" \", host_zig_cc.items)});\n        try gn_args.append(arg);\n        arg = b.fmt(\"host_zig_cxx=\\\"{s}\\\"\", .{try std.mem.join(b.allocator, \" \", host_zig_cxx.items)});\n        try gn_args.append(arg);\n    } else {\n        if (builtin.os.tag != .windows) {\n            try gn_args.append(\"cxx_use_ld=\\\"lld\\\"\");\n        }\n    }\n\n    // sccache, currently does not work with zig cc\n    if (!use_zig_tc) {\n        if (b.graph.env_map.get(\"SCCACHE\")) |path| {\n            const cc_wrapper = try std.fmt.allocPrint(b.allocator, \"cc_wrapper=\\\"{s}\\\"\", .{path});\n            try gn_args.append(cc_wrapper);\n        } else {\n            if (builtin.os.tag == .windows) {\n                // findProgram look for \"PATH\" case sensitive.\n                try b.graph.env_map.put(\"PATH\", b.graph.env_map.get(\"Path\") orelse \"\");\n            }\n            if (b.findProgram(&.{\"sccache\"}, &.{})) |_| {\n                const cc_wrapper = try std.fmt.allocPrint(b.allocator, \"cc_wrapper=\\\"{s}\\\"\", .{\"sccache\"});\n                try gn_args.append(cc_wrapper);\n            } else |err| {\n                if (err != error.FileNotFound) {\n                    unreachable;\n                }\n            }\n            if (builtin.os.tag == .windows) {\n                // After creating PATH for windows so findProgram can find sccache, we need to delete it\n                // or a gn tool (build/toolchain/win/setup_toolchain.py) will complain about not finding cl.exe.\n                b.graph.env_map.remove(\"PATH\");\n            }\n        }\n    }\n\n    // var check_deps = CheckV8DepsStep.create(b);\n    // step.step.dependOn(&check_deps.step);\n\n    const mode_str: []const u8 = if (mode == .Debug) \"debug\" else \"release\";\n    // GN will generate ninja build files in ninja_out_path which will also contain the artifacts after running ninja.\n    const ninja_out_path = try std.fmt.allocPrint(b.allocator, \"v8-build/{s}/{s}/ninja\", .{\n        getTargetId(b.allocator, target),\n        mode_str,\n    });\n\n    const gn = getGnPath(b);\n    const arg_items = try std.mem.join(b.allocator, \" \", gn_args.items);\n    const args = try std.mem.join(b.allocator, \"\", &.{ \"--args=\", arg_items });\n    // Currently we have to use gclient/v8 as the source root since all those nested gn files expects it, (otherwise, we'll run into duplicate argument declaration errors.)\n    // --dotfile lets us use a different .gn outside of the source root.\n    // --root-target is a directory that must be inside the source root where we can have a custom BUILD.gn.\n    //      Since gclient/v8 is not part of our repo, we copy over BUILD.gn to gclient/v8/zig/BUILD.gn before we run gn.\n    // To see v8 dependency tree:\n    // cd gclient/v8 && gn desc ../../v8-build/x86_64-linux/release/ninja/ :v8 --tree\n    // We can't see our own config because gn desc doesn't accept a --root-target.\n    // One idea is to append our BUILD.gn to the v8 BUILD.gn instead of putting it in a subdirectory.\n    if (UseGclient) {\n        var run_gn = b.addSystemCommand(&.{ gn, \"--root=gclient/v8\", \"--root-target=//zig\", \"--dotfile=.gn\", \"gen\", ninja_out_path, args });\n        step.dependOn(&run_gn.step);\n    } else {\n        // To see available args for gn: cd v8 && gn args --list ../v8-build/{target}/release/ninja/\n        var run_gn = b.addSystemCommand(&.{ gn, \"--root=v8\", \"--root-target=//zig\", \"--dotfile=.gn\", \"gen\", ninja_out_path, args });\n        step.dependOn(&run_gn.step);\n    }\n\n    const ninja = getNinjaPath(b);\n    // Only build our target. If no target is specified, ninja will build all the targets which includes developer tools, tests, etc.\n    var run_ninja = b.addSystemCommand(&.{ ninja, \"-C\", ninja_out_path, \"c_v8\" });\n    step.dependOn(&run_ninja.step);\n\n    return step;\n}\n\nfn getArchOs(alloc: std.mem.Allocator, arch: std.Target.Cpu.Arch, os: std.Target.Os.Tag) []const u8 {\n    return std.fmt.allocPrint(alloc, \"{s}-{s}-gnu\", .{ @tagName(arch), @tagName(os) }) catch unreachable;\n}\n\nfn getTargetId(alloc: std.mem.Allocator, target: std.Build.ResolvedTarget) []const u8 {\n    return std.fmt.allocPrint(alloc, \"{s}-{s}\", .{ @tagName(target.result.cpu.arch), @tagName(target.result.os.tag) }) catch unreachable;\n}\n\nconst CheckV8DepsStep = struct {\n    const Self = @This();\n\n    step: Step,\n    b: *Builder,\n\n    fn create(b: *Builder) *Self {\n        const step = b.allocator.create(Self) catch unreachable;\n        step.* = .{\n            .step = Step.init(.custom, \"check_v8_deps\", b.allocator, make),\n            .b = b,\n        };\n        return step;\n    }\n\n    fn make(step: *Step) !void {\n        const self: *Self = @fieldParentPtr(\"step\", step);\n\n        const output = try self.b.execFromStep(&.{ \"clang\", \"--version\" }, step);\n        print(\"clang: {s}\", .{output});\n\n        // TODO: Find out the actual minimum and check against other clang flavors.\n        if (std.mem.startsWith(u8, output, \"Homebrew clang version \")) {\n            const i = std.mem.indexOfScalar(u8, output, '.').?;\n            const major_v = try std.fmt.parseInt(u8, output[\"Homebrew clang version \".len..i], 10);\n            if (major_v < 13) {\n                return error.BadClangVersion;\n            }\n        }\n    }\n};\n\nfn createGetV8(b: *Builder) *std.Build.Step {\n    const step = b.step(\"get-v8\", \"Gets v8 source using gclient.\");\n\n    if (UseGclient) {\n        const mkpath = MakePathStep.create(b, \"./gclient\");\n        step.dependOn(&mkpath.step);\n\n        // About depot_tools: https://commondatastorage.googleapis.com/chrome-infra-docs/flat/depot_tools/docs/html/depot_tools_tutorial.html#_setting_up\n        const cmd = b.addSystemCommand(&.{ b.pathFromRoot(\"./tools/depot_tools/fetch\"), \"v8\" });\n        cmd.cwd = \"./gclient\";\n        cmd.addPathDir(b.pathFromRoot(\"./tools/depot_tools\"));\n        step.dependOn(&cmd.step);\n    } else {\n        const get = GetV8SourceStep.create(b);\n        step.dependOn(&get.step);\n    }\n    return step;\n}\n\nfn createGetTools(b: *Builder) *std.Build.Step {\n    const step = b.step(\"get-tools\", \"Gets the build tools.\");\n\n    //var sub_step = b.addSystemCommand(&.{ \"python\", \"./tools/get_ninja_gn_binaries.py\", \"--dir\", \"./tools\" });\n    var sub_step = b.addSystemCommand(&.{ \"git\", \"clone\", \"https://github.com/denoland/ninja_gn_binaries.git\", \"./tools\" });\n    step.dependOn(&sub_step.step);\n\n    if (UseGclient) {\n        // Pull depot_tools for fetch tool.\n        sub_step = b.addSystemCommand(&.{ \"git\", \"clone\", \"--depth=1\", \"https://chromium.googlesource.com/chromium/tools/depot_tools.git\", \"tools/depot_tools\" });\n        step.dependOn(&sub_step.step);\n    }\n\n    return step;\n}\n\nfn getNinjaPath(b: *Builder) []const u8 {\n    const platform = switch (builtin.os.tag) {\n        .windows => \"win\",\n        .linux => \"linux\",\n        .macos => \"mac\",\n        else => unreachable,\n    };\n    const arch = switch (builtin.cpu.arch) {\n        .x86_64 => \"amd64\",\n        .aarch64 => \"arm64\",\n        else => unreachable,\n    };\n    const ext = if (builtin.os.tag == .windows) \".exe\" else \"\";\n    const bin = std.mem.concat(b.allocator, u8, &.{ \"ninja\", ext }) catch unreachable;\n    const subFolder = std.mem.concat(b.allocator, u8, &.{ platform, \"-\", arch }) catch unreachable;\n    return std.fs.path.resolve(b.allocator, &.{ \"./tools\", subFolder, bin }) catch unreachable;\n}\n\nfn getGnPath(b: *Builder) []const u8 {\n    const platform = switch (builtin.os.tag) {\n        .windows => \"win\",\n        .linux => \"linux\",\n        .macos => \"mac\",\n        else => unreachable,\n    };\n    const arch = switch (builtin.cpu.arch) {\n        .x86_64 => \"amd64\",\n        .aarch64 => \"arm64\",\n        else => unreachable,\n    };\n    const ext = if (builtin.os.tag == .windows) \".exe\" else \"\";\n    const bin = std.mem.concat(b.allocator, u8, &.{ \"gn\", ext }) catch unreachable;\n    const subFolder = std.mem.concat(b.allocator, u8, &.{ platform, \"-\", arch }) catch unreachable;\n    return std.fs.path.resolve(b.allocator, &.{ \"./tools\", subFolder, bin }) catch unreachable;\n}\n\nconst MakePathStep = struct {\n    const Self = @This();\n\n    step: std.Build.Step,\n    b: *Builder,\n    path: []const u8,\n\n    fn create(b: *Builder, root_path: []const u8) *Self {\n        const new = b.allocator.create(Self) catch unreachable;\n        new.* = .{\n            .step = std.Build.Step.init(.{\n                .id = .custom,\n                .name = b.fmt(\"make-path\", .{}),\n                .owner = b,\n                .makeFn = make,\n            }),\n            .b = b,\n            .path = root_path,\n        };\n        return new;\n    }\n    fn make(step: *std.Build.Step, prog_node: std.Progress.Node) anyerror!void {\n        _ = prog_node;\n        const self: *Self = @fieldParentPtr(\"step\", step);\n        const cwd = fs.cwd();\n\n        const stat = try statPathFromRoot(self.b, self.path);\n        if (stat == .NotExist) {\n            try cwd.makeDir(self.path);\n        }\n    }\n};\n\nconst CopyFileStep = struct {\n    const Self = @This();\n\n    step: std.Build.Step,\n    b: *Builder,\n    src_path: []const u8,\n    dst_path: []const u8,\n\n    fn create(b: *Builder, src_path: []const u8, dst_path: []const u8) *Self {\n        const new = b.allocator.create(Self) catch unreachable;\n        new.* = .{\n            .step = std.Build.Step.init(.{\n                .id = .custom,\n                .name = b.fmt(\"cp\", .{}),\n                .owner = b,\n                .makeFn = make,\n            }),\n            .b = b,\n            .src_path = src_path,\n            .dst_path = dst_path,\n        };\n        return new;\n    }\n\n    fn make(step: *std.Build.Step, prog_node: std.Progress.Node) anyerror!void {\n        _ = prog_node;\n        const self: *Self = @fieldParentPtr(\"step\", step);\n        try std.fs.copyFileAbsolute(self.src_path, self.dst_path, .{});\n    }\n};\n\n// TODO: Make this usable from external project.\nfn linkV8(b: *Builder, step: *std.Build.Step.Compile, mode: std.builtin.OptimizeMode, target: std.Build.ResolvedTarget, use_zig_tc: bool) void {\n    const mode_str: []const u8 = if (mode == .Debug) \"debug\" else \"release\";\n    const lib: []const u8 = if (target.result.os.tag == .windows and target.result.abi == .msvc) \"c_v8.lib\" else \"libc_v8.a\";\n    const lib_path = std.fmt.allocPrint(b.allocator, \"./v8-build/{s}/{s}/ninja/obj/zig/{s}\", .{\n        getTargetId(b.allocator, target),\n        mode_str,\n        lib,\n    }) catch unreachable;\n    step.addAssemblyFile(b.path(lib_path));\n    if (builtin.os.tag == .linux) {\n        if (use_zig_tc) {\n            // TODO: This should be linked already when we built v8.\n            step.linkLibCpp();\n        }\n        step.linkSystemLibrary(\"unwind\");\n    } else if (target.result.os.tag == .windows) {\n        if (target.result.abi == .gnu) {\n            step.linkLibCpp();\n        } else {\n            step.linkSystemLibrary(\"Dbghelp\");\n            step.linkSystemLibrary(\"Winmm\");\n            step.linkSystemLibrary(\"Advapi32\");\n\n            // We need libcpmt to statically link with c++ stl for exception_ptr references from V8.\n            // Zig already adds the SDK path to the linker but doesn't sync it to the internal libs array which linkSystemLibrary checks against.\n            // For now we'll hardcode the MSVC path here.\n            step.addLibraryPath(b.path(\"C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/lib/x64\"));\n            step.linkSystemLibrary(\"libcpmt\");\n        }\n    }\n}\n\nfn createTest(b: *Builder, target: std.Build.ResolvedTarget, mode: std.builtin.OptimizeMode, use_zig_tc: bool) *std.Build.Step.Compile {\n    const step = b.addTest(.{\n        .root_source_file = b.path(\"src/test.zig\"),\n        .target = target,\n        .optimize = mode,\n    }); //FIXED\n\n    step.addIncludePath(b.path(\"src\"));\n    step.linkLibC();\n\n    linkV8(b, step, mode, target, use_zig_tc);\n\n    return step;\n}\n\nconst DepEntry = struct {\n    const Self = @This();\n\n    alloc: std.mem.Allocator,\n    repo_url: []const u8,\n    repo_rev: []const u8,\n\n    pub fn deinit(self: Self) void {\n        self.alloc.free(self.repo_url);\n        self.alloc.free(self.repo_rev);\n    }\n};\n\nfn getV8Rev(b: *Builder) ![]const u8 {\n    var file: std.fs.File = undefined;\n    if (comptime isMinZigVersion()) {\n        file = try std.fs.openFileAbsolute(b.pathFromRoot(\"V8_REVISION\"), .{ .read = true, .write = false });\n    } else {\n        file = try std.fs.openFileAbsolute(b.pathFromRoot(\"V8_REVISION\"), .{ .mode = std.fs.File.OpenMode.read_write });\n    }\n    defer file.close();\n    return std.mem.trim(u8, try file.readToEndAlloc(b.allocator, 1e9), \"\\n\\r \");\n}\n\npub const GetV8SourceStep = struct {\n    const Self = @This();\n\n    step: Step,\n    b: *Builder,\n\n    pub fn create(b: *Builder) *Self {\n        const self = b.allocator.create(Self) catch unreachable;\n        self.* = .{\n            .b = b,\n            .step = Step.init(.{\n                .id = .run,\n                .name = \"Get V8 Sources.\",\n                .owner = b,\n                .makeFn = make,\n            }),\n        };\n        return self;\n    }\n\n    fn parseDep(self: Self, deps: json.Value, key: []const u8) !DepEntry {\n        const val = deps.object.get(key).?;\n\n        const i = std.mem.lastIndexOfScalar(u8, val.string, '@').?;\n        const repo_rev = try self.b.allocator.dupe(u8, val.string[i + 1 ..]);\n\n        const repo_url = try std.mem.replaceOwned(u8, self.b.allocator, val.string[0..i], \"@chromium_url\", \"https://chromium.googlesource.com\");\n        return DepEntry{\n            .alloc = self.b.allocator,\n            .repo_url = repo_url,\n            .repo_rev = repo_rev,\n        };\n    }\n\n    fn getDep(self: *Self, deps: json.Value, key: []const u8, local_path: []const u8) !void {\n        const dep = try self.parseDep(deps, key);\n        defer dep.deinit();\n\n        const stat = try statPathFromRoot(self.b, local_path);\n        if (stat == .NotExist) {\n            _ = self.b.run(&.{ \"git\", \"clone\", dep.repo_url, local_path });\n        }\n        _ = self.b.run(&.{ \"git\", \"-C\", local_path, \"checkout\", dep.repo_rev });\n        if (stat == .NotExist) {\n            // Apply patch for v8/build\n            if (std.mem.eql(u8, key, \"build\")) {\n                _ = self.b.run(&.{ \"git\", \"apply\", \"--ignore-space-change\", \"--ignore-whitespace\", \"patches/v8_build.patch\", \"--directory=v8/build\" });\n            }\n        }\n    }\n\n    fn runHook(self: *Self, hooks: json.Value, name: []const u8) !void {\n        var gpa = std.heap.GeneralPurposeAllocator(.{}){};\n        const alloc = gpa.allocator();\n\n        defer _ = gpa.deinit();\n\n        for (hooks.array.items) |hook| {\n            if (std.mem.eql(u8, name, hook.object.get(\"name\").?.string)) {\n                const cmd = hook.object.get(\"action\").?.array;\n                var args = std.ArrayList([]const u8).init(self.b.allocator);\n                defer args.deinit();\n                for (cmd.items) |it| {\n                    try args.append(it.string);\n                }\n                const cwd = self.b.pathFromRoot(\"v8\");\n\n                const cmd_path = try std.fmt.allocPrint(alloc, \"{s}/{s}\", .{ cwd, args.items[1] });\n                defer alloc.free(cmd_path);\n\n                _ = self.b.run(&.{ args.items[0], cmd_path });\n                break;\n            }\n        }\n    }\n\n    fn make(step: *Step, prog_node: std.Progress.Node) !void {\n        _ = prog_node;\n        const self: *Self = @fieldParentPtr(\"step\", step);\n\n        // Pull the minimum source we need by looking at DEPS.\n        // TODO: Check if we have the right branches, otherwise reclone.\n\n        // Get revision/tag to checkout.\n        const v8_rev = try getV8Rev(self.b);\n\n        // Clone V8.\n        const stat = try statPathFromRoot(self.b, \"v8\");\n        if (stat == .NotExist) {\n            _ = self.b.run(&.{ \"git\", \"clone\", \"--depth=1\", \"--branch\", v8_rev, \"https://chromium.googlesource.com/v8/v8.git\", \"v8\" });\n            // Apply patch for v8 root.\n            _ = self.b.run(&.{ \"git\", \"apply\", \"--ignore-space-change\", \"--ignore-whitespace\", \"patches/v8.patch\", \"--directory=v8\" });\n        }\n\n        // Get DEPS in json.\n        const deps_json = self.b.run(&.{ \"python3\", \"parse_deps.py\", \"v8/DEPS\" });\n        defer self.b.allocator.free(deps_json);\n\n        var tree = try json.parseFromSlice(json.Value, self.b.allocator, deps_json, .{});\n        defer tree.deinit();\n\n        const deps = tree.value.object.get(\"deps\").?;\n        const hooks = tree.value.object.get(\"hooks\").?;\n\n        // build\n        try self.getDep(deps, \"build\", \"v8/build\");\n\n        // Add an empty gclient_args.gni so gn is happy. gclient also creates an empty file.\n        const file = try std.fs.createFileAbsolute(self.b.pathFromRoot(\"v8/build/config/gclient_args.gni\"), .{ .read = false, .truncate = true });\n        try file.writeAll(\"# Generated from build.zig\");\n\n        file.close();\n\n        // buildtools\n        try self.getDep(deps, \"buildtools\", \"v8/buildtools\");\n\n        // libc++\n        try self.getDep(deps, \"buildtools/third_party/libc++/trunk\", \"v8/buildtools/third_party/libc++/trunk\");\n\n        // tools/clang\n        try self.getDep(deps, \"tools/clang\", \"v8/tools/clang\");\n\n        try self.runHook(hooks, \"clang\");\n\n        // third_party/zlib\n        try self.getDep(deps, \"third_party/zlib\", \"v8/third_party/zlib\");\n\n        // libc++abi\n        try self.getDep(deps, \"buildtools/third_party/libc++abi/trunk\", \"v8/buildtools/third_party/libc++abi/trunk\");\n\n        // googletest\n        try self.getDep(deps, \"third_party/googletest/src\", \"v8/third_party/googletest/src\");\n\n        // trace_event\n        try self.getDep(deps, \"base/trace_event/common\", \"v8/base/trace_event/common\");\n\n        // jinja2\n        try self.getDep(deps, \"third_party/jinja2\", \"v8/third_party/jinja2\");\n\n        // markupsafe\n        try self.getDep(deps, \"third_party/markupsafe\", \"v8/third_party/markupsafe\");\n\n        // For windows.\n        if (builtin.os.tag == .windows) {\n            // lastchange.py is flaky when it tries to do git commands from subprocess.Popen. Will sometimes get [WinError 50].\n            // For now we'll just do it in zig.\n            // try self.runHook(hooks, \"lastchange\");\n\n            const merge_base_sha = \"HEAD\";\n            const commit_filter = \"^Change-Id:\";\n            const grep_arg = try std.fmt.allocPrint(self.b.allocator, \"--grep={s}\", .{commit_filter});\n            const version_info = try self.b.execFromStep(&.{ \"git\", \"-C\", \"v8/build\", \"log\", \"-1\", \"--format=%H %ct\", grep_arg, merge_base_sha }, &self.step);\n            const idx = std.mem.indexOfScalar(u8, version_info, ' ').?;\n            const commit_timestamp = version_info[idx + 1 ..];\n\n            // build/timestamp.gni expects the file to be just the unix timestamp.\n            const write = std.fs.createFileAbsolute(self.b.pathFromRoot(\"v8/build/util/LASTCHANGE.committime\"), .{ .truncate = true }) catch unreachable;\n            defer write.close();\n            write.writeAll(commit_timestamp) catch unreachable;\n        }\n    }\n};\n\nfn createBuildExeStep(b: *Builder, path: []const u8, target: std.Build.ResolvedTarget, mode: std.builtin.OptimizeMode, use_zig_tc: bool) *std.Build.Step.Compile {\n    _ = b.step(\"exe\", \"Build exe with main file at -Dpath\");\n\n    const basename = std.fs.path.basename(path);\n    const i = std.mem.indexOf(u8, basename, \".zig\") orelse basename.len;\n    const name = basename[0..i];\n\n    const step = b.addExecutable(.{\n        .target = target,\n        .root_source_file = b.path(path),\n        .name = name,\n        .optimize = mode,\n    }); //FIXED\n    //step.setBuildMode(mode);\n    //step.setTarget(target);\n\n    step.linkLibC();\n    step.addIncludePath(b.path(\"src\"));\n\n    if (mode == .ReleaseSafe) {\n        step.root_module.strip = true;\n    }\n\n    linkV8(b, step, mode, target, use_zig_tc);\n\n    return step;\n}\n\nconst PathStat = enum {\n    NotExist,\n    Directory,\n    File,\n    SymLink,\n    Unknown,\n};\n\nfn statPathFromRoot(b: *Builder, path_rel: []const u8) !PathStat {\n    const path_abs = b.pathFromRoot(path_rel);\n    var file: std.fs.File = undefined;\n    if (comptime isMinZigVersion()) {\n        file = std.fs.openFileAbsolute(path_abs, .{ .read = false, .write = false }) catch |err| {\n            if (err == error.FileNotFound) {\n                return .NotExist;\n            } else if (err == error.IsDir) {\n                return .Directory;\n            } else {\n                return err;\n            }\n        };\n    } else {\n        file = std.fs.openFileAbsolute(path_abs, .{ .mode = std.fs.File.OpenMode.read_only }) catch |err| {\n            if (err == error.FileNotFound) {\n                return .NotExist;\n            } else if (err == error.IsDir) {\n                return .Directory;\n            } else {\n                return err;\n            }\n        };\n    }\n    defer file.close();\n\n    const stat = try file.stat();\n    switch (stat.kind) {\n        .sym_link => return .SymLink,\n        .directory => return .Directory,\n        .file => return .File,\n        else => return .Unknown,\n    }\n}\n\nfn isMinZigVersion() bool {\n    return builtin.zig_version.major == 0 and builtin.zig_version.minor == 9;\n}\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/libkern/OSAtomic.h",
    "content": "/*\n * Copyright (c) 2004-2016 Apple Inc. All rights reserved.\n *\n * @APPLE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this\n * file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_LICENSE_HEADER_END@\n */\n\n#ifndef _OSATOMIC_H_\n#define _OSATOMIC_H_\n\n/*! @header\n * These are deprecated legacy interfaces for atomic and synchronization\n * operations.\n *\n * Define OSATOMIC_USE_INLINED=1 to get inline implementations of the\n * OSAtomic interfaces in terms of the <stdatomic.h> primitives.\n *\n * Define OSSPINLOCK_USE_INLINED=1 to get inline implementations of the\n * OSSpinLock interfaces in terms of the <os/lock.h> primitives.\n *\n * These are intended as a transition convenience, direct use of those\n * primitives should be preferred.\n */\n\n#include <sys/cdefs.h>\n\n#include \"OSAtomicDeprecated.h\"\n#include \"OSSpinLockDeprecated.h\"\n#include \"OSAtomicQueue.h\"\n\n#endif /* _OSATOMIC_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/libkern/OSAtomicDeprecated.h",
    "content": "/*\n * Copyright (c) 2004-2016 Apple Inc. All rights reserved.\n *\n * @APPLE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this\n * file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_LICENSE_HEADER_END@\n */\n\n#ifndef _OSATOMIC_DEPRECATED_H_\n#define _OSATOMIC_DEPRECATED_H_\n\n/*! @header\n * These are deprecated legacy interfaces for atomic operations.\n * The C11 interfaces in <stdatomic.h> resp. C++11 interfaces in <atomic>\n * should be used instead.\n *\n * Define OSATOMIC_USE_INLINED=1 to get inline implementations of these\n * interfaces in terms of the <stdatomic.h> resp. <atomic> primitives.\n * This is intended as a transition convenience, direct use of those primitives\n * is preferred.\n */\n\n#include    <Availability.h>\n\n#if !(defined(OSATOMIC_USE_INLINED) && OSATOMIC_USE_INLINED)\n\n#include    <sys/cdefs.h>\n#include    <stddef.h>\n#include    <stdint.h>\n#include    <stdbool.h>\n\n#ifndef OSATOMIC_DEPRECATED\n#define OSATOMIC_DEPRECATED 1\n#ifndef __cplusplus\n#define OSATOMIC_BARRIER_DEPRECATED_MSG(_r) \\\n\t\t\"Use \" #_r \"() from <stdatomic.h> instead\"\n#define OSATOMIC_DEPRECATED_MSG(_r) \\\n\t\t\"Use \" #_r \"_explicit(memory_order_relaxed) from <stdatomic.h> instead\"\n#else\n#define OSATOMIC_BARRIER_DEPRECATED_MSG(_r) \\\n\t\t\"Use std::\" #_r \"() from <atomic> instead\"\n#define OSATOMIC_DEPRECATED_MSG(_r) \\\n\t\t\"Use std::\" #_r \"_explicit(std::memory_order_relaxed) from <atomic> instead\"\n#endif\n#define OSATOMIC_BARRIER_DEPRECATED_REPLACE_WITH(_r) \\\n\t__OS_AVAILABILITY_MSG(macosx, deprecated=10.12, OSATOMIC_BARRIER_DEPRECATED_MSG(_r)) \\\n\t__OS_AVAILABILITY_MSG(ios, deprecated=10.0, OSATOMIC_BARRIER_DEPRECATED_MSG(_r)) \\\n\t__OS_AVAILABILITY_MSG(tvos, deprecated=10.0, OSATOMIC_BARRIER_DEPRECATED_MSG(_r)) \\\n\t__OS_AVAILABILITY_MSG(watchos, deprecated=3.0, OSATOMIC_BARRIER_DEPRECATED_MSG(_r))\n#define OSATOMIC_DEPRECATED_REPLACE_WITH(_r) \\\n\t__OS_AVAILABILITY_MSG(macosx, deprecated=10.12, OSATOMIC_DEPRECATED_MSG(_r)) \\\n\t__OS_AVAILABILITY_MSG(ios, deprecated=10.0, OSATOMIC_DEPRECATED_MSG(_r)) \\\n\t__OS_AVAILABILITY_MSG(tvos, deprecated=10.0, OSATOMIC_DEPRECATED_MSG(_r)) \\\n\t__OS_AVAILABILITY_MSG(watchos, deprecated=3.0, OSATOMIC_DEPRECATED_MSG(_r))\n#else\n#undef OSATOMIC_DEPRECATED\n#define OSATOMIC_DEPRECATED 0\n#define OSATOMIC_BARRIER_DEPRECATED_REPLACE_WITH(_r)\n#define OSATOMIC_DEPRECATED_REPLACE_WITH(_r)\n#endif\n\n/*\n * WARNING: all addresses passed to these functions must be \"naturally aligned\",\n * i.e. <code>int32_t</code> pointers must be 32-bit aligned (low 2 bits of\n * address are zeroes), and <code>int64_t</code> pointers must be 64-bit\n * aligned (low 3 bits of address are zeroes.).\n * Note that this is not the default alignment of the <code>int64_t</code> type\n * in the iOS ARMv7 ABI, see\n * {@link //apple_ref/doc/uid/TP40009021-SW8 iPhoneOSABIReference}\n *\n * Note that some versions of the atomic functions incorporate memory barriers\n * and some do not.  Barriers strictly order memory access on weakly-ordered\n * architectures such as ARM.  All loads and stores that appear (in sequential\n * program order) before the barrier are guaranteed to complete before any\n * load or store that appears after the barrier.\n *\n * The barrier operation is typically a no-op on uniprocessor systems and\n * fully enabled on multiprocessor systems. On some platforms, such as ARM,\n * the barrier can be quite expensive.\n *\n * Most code should use the barrier functions to ensure that memory shared\n * between threads is properly synchronized.  For example, if you want to\n * initialize a shared data structure and then atomically increment a variable\n * to indicate that the initialization is complete, you must use\n * {@link OSAtomicIncrement32Barrier} to ensure that the stores to your data\n * structure complete before the atomic increment.\n *\n * Likewise, the consumer of that data structure must use\n * {@link OSAtomicDecrement32Barrier},\n * in order to ensure that their loads of the structure are not executed before\n * the atomic decrement.  On the other hand, if you are simply incrementing a\n * global counter, then it is safe and potentially faster to use\n * {@link OSAtomicIncrement32}.\n *\n * If you are unsure which version to use, prefer the barrier variants as they\n * are safer.\n *\n * For the kernel-space version of this header, see\n * {@link //apple_ref/doc/header/OSAtomic.h OSAtomic.h (Kernel Framework)}\n *\n * @apiuid //apple_ref/doc/header/user_space_OSAtomic.h\n */\n\n__BEGIN_DECLS\n\n/*! @typedef OSAtomic_int64_aligned64_t\n * 64-bit aligned <code>int64_t</code> type.\n * Use for variables whose addresses are passed to OSAtomic*64() functions to\n * get the compiler to generate the required alignment.\n */\n\n#if __has_attribute(aligned)\ntypedef int64_t __attribute__((__aligned__((sizeof(int64_t)))))\n\t\tOSAtomic_int64_aligned64_t;\n#else\ntypedef int64_t OSAtomic_int64_aligned64_t;\n#endif\n\n/*! @group Arithmetic functions\n    All functions in this group return the new value.\n */\n\n/*! @abstract Atomically adds two 32-bit values.\n    @discussion\n\tThis function adds the value given by <code>__theAmount</code> to the\n\tvalue in the memory location referenced by <code>__theValue</code>,\n \tstoring the result back to that memory location atomically.\n    @result Returns the new value.\n */\nOSATOMIC_DEPRECATED_REPLACE_WITH(atomic_fetch_add)\n__OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0)\nint32_t\tOSAtomicAdd32( int32_t __theAmount, volatile int32_t *__theValue );\n\n\n/*! @abstract Atomically adds two 32-bit values.\n    @discussion\n\tThis function adds the value given by <code>__theAmount</code> to the\n\tvalue in the memory location referenced by <code>__theValue</code>,\n\tstoring the result back to that memory location atomically.\n\n\tThis function is equivalent to {@link OSAtomicAdd32}\n\texcept that it also introduces a barrier.\n    @result Returns the new value.\n */\nOSATOMIC_BARRIER_DEPRECATED_REPLACE_WITH(atomic_fetch_add)\n__OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0)\nint32_t\tOSAtomicAdd32Barrier( int32_t __theAmount, volatile int32_t *__theValue );\n\n\n#if __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_10 || __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_7_1 || TARGET_OS_DRIVERKIT\n\n/*! @abstract Atomically increments a 32-bit value.\n    @result Returns the new value.\n */\nOSATOMIC_DEPRECATED_REPLACE_WITH(atomic_fetch_add)\n__OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_1)\nint32_t\tOSAtomicIncrement32( volatile int32_t *__theValue );\n\n\n/*! @abstract Atomically increments a 32-bit value with a barrier.\n    @discussion\n\tThis function is equivalent to {@link OSAtomicIncrement32}\n\texcept that it also introduces a barrier.\n    @result Returns the new value.\n */\nOSATOMIC_BARRIER_DEPRECATED_REPLACE_WITH(atomic_fetch_add)\n__OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_1)\nint32_t\tOSAtomicIncrement32Barrier( volatile int32_t *__theValue );\n\n\n/*! @abstract Atomically decrements a 32-bit value.\n    @result Returns the new value.\n */\nOSATOMIC_DEPRECATED_REPLACE_WITH(atomic_fetch_sub)\n__OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_1)\nint32_t\tOSAtomicDecrement32( volatile int32_t *__theValue );\n\n\n/*! @abstract Atomically decrements a 32-bit value with a barrier.\n    @discussion\n\tThis function is equivalent to {@link OSAtomicDecrement32}\n\texcept that it also introduces a barrier.\n    @result Returns the new value.\n */\nOSATOMIC_BARRIER_DEPRECATED_REPLACE_WITH(atomic_fetch_sub)\n__OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_1)\nint32_t\tOSAtomicDecrement32Barrier( volatile int32_t *__theValue );\n\n#else\n__inline static\nint32_t\tOSAtomicIncrement32( volatile int32_t *__theValue )\n            { return OSAtomicAdd32(  1, __theValue); }\n\n__inline static\nint32_t\tOSAtomicIncrement32Barrier( volatile int32_t *__theValue )\n            { return OSAtomicAdd32Barrier(  1, __theValue); }\n\n__inline static\nint32_t\tOSAtomicDecrement32( volatile int32_t *__theValue )\n            { return OSAtomicAdd32( -1, __theValue); }\n\n__inline static\nint32_t\tOSAtomicDecrement32Barrier( volatile int32_t *__theValue )\n            { return OSAtomicAdd32Barrier( -1, __theValue); }\n#endif\n\n\n/*! @abstract Atomically adds two 64-bit values.\n    @discussion\n\tThis function adds the value given by <code>__theAmount</code> to the\n\tvalue in the memory location referenced by <code>__theValue</code>,\n\tstoring the result back to that memory location atomically.\n    @result Returns the new value.\n */\nOSATOMIC_DEPRECATED_REPLACE_WITH(atomic_fetch_add)\n__OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0)\nint64_t\tOSAtomicAdd64( int64_t __theAmount,\n\t\tvolatile OSAtomic_int64_aligned64_t *__theValue );\n\n\n/*! @abstract Atomically adds two 64-bit values with a barrier.\n    @discussion\n\tThis function adds the value given by <code>__theAmount</code> to the\n\tvalue in the memory location referenced by <code>__theValue</code>,\n\tstoring the result back to that memory location atomically.\n\n\tThis function is equivalent to {@link OSAtomicAdd64}\n\texcept that it also introduces a barrier.\n    @result Returns the new value.\n */\nOSATOMIC_BARRIER_DEPRECATED_REPLACE_WITH(atomic_fetch_add)\n__OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_3_2)\nint64_t\tOSAtomicAdd64Barrier( int64_t __theAmount,\n\t\tvolatile OSAtomic_int64_aligned64_t *__theValue );\n\n\n#if __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_10 || __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_7_1 || TARGET_OS_DRIVERKIT\n\n/*! @abstract Atomically increments a 64-bit value.\n    @result Returns the new value.\n */\nOSATOMIC_DEPRECATED_REPLACE_WITH(atomic_fetch_add)\n__OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_1)\nint64_t\tOSAtomicIncrement64( volatile OSAtomic_int64_aligned64_t *__theValue );\n\n\n/*! @abstract Atomically increments a 64-bit value with a barrier.\n    @discussion\n\tThis function is equivalent to {@link OSAtomicIncrement64}\n\texcept that it also introduces a barrier.\n    @result Returns the new value.\n */\nOSATOMIC_BARRIER_DEPRECATED_REPLACE_WITH(atomic_fetch_add)\n__OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_1)\nint64_t\tOSAtomicIncrement64Barrier( volatile OSAtomic_int64_aligned64_t *__theValue );\n\n\n/*! @abstract Atomically decrements a 64-bit value.\n    @result Returns the new value.\n */\nOSATOMIC_DEPRECATED_REPLACE_WITH(atomic_fetch_sub)\n__OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_1)\nint64_t\tOSAtomicDecrement64( volatile OSAtomic_int64_aligned64_t *__theValue );\n\n\n/*! @abstract Atomically decrements a 64-bit value with a barrier.\n    @discussion\n\tThis function is equivalent to {@link OSAtomicDecrement64}\n\texcept that it also introduces a barrier.\n    @result Returns the new value.\n */\nOSATOMIC_BARRIER_DEPRECATED_REPLACE_WITH(atomic_fetch_sub)\n__OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_1)\nint64_t\tOSAtomicDecrement64Barrier( volatile OSAtomic_int64_aligned64_t *__theValue );\n\n#else\n__inline static\nint64_t\tOSAtomicIncrement64( volatile OSAtomic_int64_aligned64_t *__theValue )\n            { return OSAtomicAdd64(  1, __theValue); }\n\n__inline static\nint64_t\tOSAtomicIncrement64Barrier( volatile OSAtomic_int64_aligned64_t *__theValue )\n            { return OSAtomicAdd64Barrier(  1, __theValue); }\n\n__inline static\nint64_t\tOSAtomicDecrement64( volatile OSAtomic_int64_aligned64_t *__theValue )\n            { return OSAtomicAdd64( -1, __theValue); }\n\n__inline static\nint64_t\tOSAtomicDecrement64Barrier( volatile OSAtomic_int64_aligned64_t *__theValue )\n            { return OSAtomicAdd64Barrier( -1, __theValue); }\n#endif\n\n\n/*! @group Boolean functions (AND, OR, XOR)\n *\n * @discussion Functions in this group come in four variants for each operation:\n * with and without barriers, and functions that return the original value or\n * the result value of the operation.\n *\n * The \"Orig\" versions return the original value, (before the operation); the non-Orig\n * versions return the value after the operation.  All are layered on top of\n * {@link OSAtomicCompareAndSwap32} and similar.\n */\n\n/*! @abstract Atomic bitwise OR of two 32-bit values.\n    @discussion\n\tThis function performs the bitwise OR of the value given by <code>__theMask</code>\n\twith the value in the memory location referenced by <code>__theValue</code>,\n\tstoring the result back to that memory location atomically.\n    @result Returns the new value.\n */\nOSATOMIC_DEPRECATED_REPLACE_WITH(atomic_fetch_or)\n__OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0)\nint32_t\tOSAtomicOr32( uint32_t __theMask, volatile uint32_t *__theValue );\n\n\n/*! @abstract Atomic bitwise OR of two 32-bit values with barrier.\n    @discussion\n\tThis function performs the bitwise OR of the value given by <code>__theMask</code>\n\twith the value in the memory location referenced by <code>__theValue</code>,\n\tstoring the result back to that memory location atomically.\n\n\tThis function is equivalent to {@link OSAtomicOr32}\n\texcept that it also introduces a barrier.\n    @result Returns the new value.\n */\nOSATOMIC_BARRIER_DEPRECATED_REPLACE_WITH(atomic_fetch_or)\n__OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0)\nint32_t\tOSAtomicOr32Barrier( uint32_t __theMask, volatile uint32_t *__theValue );\n\n\n/*! @abstract Atomic bitwise OR of two 32-bit values returning original.\n    @discussion\n\tThis function performs the bitwise OR of the value given by <code>__theMask</code>\n\twith the value in the memory location referenced by <code>__theValue</code>,\n\tstoring the result back to that memory location atomically.\n    @result Returns the original value referenced by <code>__theValue</code>.\n */\nOSATOMIC_DEPRECATED_REPLACE_WITH(atomic_fetch_or)\n__OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_3_2)\nint32_t\tOSAtomicOr32Orig( uint32_t __theMask, volatile uint32_t *__theValue );\n\n\n/*! @abstract Atomic bitwise OR of two 32-bit values returning original with barrier.\n    @discussion\n\tThis function performs the bitwise OR of the value given by <code>__theMask</code>\n\twith the value in the memory location referenced by <code>__theValue</code>,\n\tstoring the result back to that memory location atomically.\n\n\tThis function is equivalent to {@link OSAtomicOr32Orig}\n\texcept that it also introduces a barrier.\n    @result Returns the original value referenced by <code>__theValue</code>.\n */\nOSATOMIC_BARRIER_DEPRECATED_REPLACE_WITH(atomic_fetch_or)\n__OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_3_2)\nint32_t\tOSAtomicOr32OrigBarrier( uint32_t __theMask, volatile uint32_t *__theValue );\n\n\n\n\n/*! @abstract Atomic bitwise AND of two 32-bit values.\n    @discussion\n\tThis function performs the bitwise AND of the value given by <code>__theMask</code>\n\twith the value in the memory location referenced by <code>__theValue</code>,\n\tstoring the result back to that memory location atomically.\n    @result Returns the new value.\n */\nOSATOMIC_DEPRECATED_REPLACE_WITH(atomic_fetch_and)\n__OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0)\nint32_t\tOSAtomicAnd32( uint32_t __theMask, volatile uint32_t *__theValue );\n\n\n/*! @abstract Atomic bitwise AND of two 32-bit values with barrier.\n    @discussion\n\tThis function performs the bitwise AND of the value given by <code>__theMask</code>\n\twith the value in the memory location referenced by <code>__theValue</code>,\n\tstoring the result back to that memory location atomically.\n\n\tThis function is equivalent to {@link OSAtomicAnd32}\n\texcept that it also introduces a barrier.\n    @result Returns the new value.\n */\nOSATOMIC_BARRIER_DEPRECATED_REPLACE_WITH(atomic_fetch_and)\n__OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0)\nint32_t\tOSAtomicAnd32Barrier( uint32_t __theMask, volatile uint32_t *__theValue );\n\n\n/*! @abstract Atomic bitwise AND of two 32-bit values returning original.\n    @discussion\n\tThis function performs the bitwise AND of the value given by <code>__theMask</code>\n\twith the value in the memory location referenced by <code>__theValue</code>,\n\tstoring the result back to that memory location atomically.\n    @result Returns the original value referenced by <code>__theValue</code>.\n */\nOSATOMIC_DEPRECATED_REPLACE_WITH(atomic_fetch_and)\n__OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_3_2)\nint32_t\tOSAtomicAnd32Orig( uint32_t __theMask, volatile uint32_t *__theValue );\n\n\n/*! @abstract Atomic bitwise AND of two 32-bit values returning original with barrier.\n    @discussion\n\tThis function performs the bitwise AND of the value given by <code>__theMask</code>\n\twith the value in the memory location referenced by <code>__theValue</code>,\n\tstoring the result back to that memory location atomically.\n\n\tThis function is equivalent to {@link OSAtomicAnd32Orig}\n\texcept that it also introduces a barrier.\n    @result Returns the original value referenced by <code>__theValue</code>.\n */\nOSATOMIC_BARRIER_DEPRECATED_REPLACE_WITH(atomic_fetch_and)\n__OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_3_2)\nint32_t\tOSAtomicAnd32OrigBarrier( uint32_t __theMask, volatile uint32_t *__theValue );\n\n\n\n\n/*! @abstract Atomic bitwise XOR of two 32-bit values.\n    @discussion\n\tThis function performs the bitwise XOR of the value given by <code>__theMask</code>\n\twith the value in the memory location referenced by <code>__theValue</code>,\n\tstoring the result back to that memory location atomically.\n    @result Returns the new value.\n */\nOSATOMIC_DEPRECATED_REPLACE_WITH(atomic_fetch_xor)\n__OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0)\nint32_t\tOSAtomicXor32( uint32_t __theMask, volatile uint32_t *__theValue );\n\n\n/*! @abstract Atomic bitwise XOR of two 32-bit values with barrier.\n    @discussion\n\tThis function performs the bitwise XOR of the value given by <code>__theMask</code>\n\twith the value in the memory location referenced by <code>__theValue</code>,\n\tstoring the result back to that memory location atomically.\n\n\tThis function is equivalent to {@link OSAtomicXor32}\n\texcept that it also introduces a barrier.\n    @result Returns the new value.\n */\nOSATOMIC_BARRIER_DEPRECATED_REPLACE_WITH(atomic_fetch_xor)\n__OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0)\nint32_t\tOSAtomicXor32Barrier( uint32_t __theMask, volatile uint32_t *__theValue );\n\n\n/*! @abstract Atomic bitwise XOR of two 32-bit values returning original.\n    @discussion\n\tThis function performs the bitwise XOR of the value given by <code>__theMask</code>\n\twith the value in the memory location referenced by <code>__theValue</code>,\n\tstoring the result back to that memory location atomically.\n    @result Returns the original value referenced by <code>__theValue</code>.\n */\nOSATOMIC_DEPRECATED_REPLACE_WITH(atomic_fetch_xor)\n__OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_3_2)\nint32_t\tOSAtomicXor32Orig( uint32_t __theMask, volatile uint32_t *__theValue );\n\n\n/*! @abstract Atomic bitwise XOR of two 32-bit values returning original with barrier.\n    @discussion\n\tThis function performs the bitwise XOR of the value given by <code>__theMask</code>\n\twith the value in the memory location referenced by <code>__theValue</code>,\n\tstoring the result back to that memory location atomically.\n\n\tThis function is equivalent to {@link OSAtomicXor32Orig}\n\texcept that it also introduces a barrier.\n    @result Returns the original value referenced by <code>__theValue</code>.\n */\nOSATOMIC_BARRIER_DEPRECATED_REPLACE_WITH(atomic_fetch_xor)\n__OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_3_2)\nint32_t\tOSAtomicXor32OrigBarrier( uint32_t __theMask, volatile uint32_t *__theValue );\n\n\n/*! @group Compare and swap\n * Functions in this group return true if the swap occured.  There are several versions,\n * depending on data type and on whether or not a barrier is used.\n */\n\n\n/*! @abstract Compare and swap for 32-bit values.\n    @discussion\n\tThis function compares the value in <code>__oldValue</code> to the value\n\tin the memory location referenced by <code>__theValue</code>.  If the values\n\tmatch, this function stores the value from <code>__newValue</code> into\n\tthat memory location atomically.\n    @result Returns TRUE on a match, FALSE otherwise.\n */\nOSATOMIC_DEPRECATED_REPLACE_WITH(atomic_compare_exchange_strong)\n__OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0)\nbool    OSAtomicCompareAndSwap32( int32_t __oldValue, int32_t __newValue, volatile int32_t *__theValue );\n\n\n/*! @abstract Compare and swap for 32-bit values with barrier.\n    @discussion\n\tThis function compares the value in <code>__oldValue</code> to the value\n\tin the memory location referenced by <code>__theValue</code>.  If the values\n\tmatch, this function stores the value from <code>__newValue</code> into\n\tthat memory location atomically.\n\n\tThis function is equivalent to {@link OSAtomicCompareAndSwap32}\n\texcept that it also introduces a barrier.\n    @result Returns TRUE on a match, FALSE otherwise.\n */\nOSATOMIC_BARRIER_DEPRECATED_REPLACE_WITH(atomic_compare_exchange_strong)\n__OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0)\nbool    OSAtomicCompareAndSwap32Barrier( int32_t __oldValue, int32_t __newValue, volatile int32_t *__theValue );\n\n\n/*! @abstract Compare and swap pointers.\n    @discussion\n\tThis function compares the pointer stored in <code>__oldValue</code> to the pointer\n\tin the memory location referenced by <code>__theValue</code>.  If the pointers\n\tmatch, this function stores the pointer from <code>__newValue</code> into\n\tthat memory location atomically.\n    @result Returns TRUE on a match, FALSE otherwise.\n */\nOSATOMIC_DEPRECATED_REPLACE_WITH(atomic_compare_exchange_strong)\n__OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0)\nbool\tOSAtomicCompareAndSwapPtr( void *__oldValue, void *__newValue, void * volatile *__theValue );\n\n\n/*! @abstract Compare and swap pointers with barrier.\n    @discussion\n\tThis function compares the pointer stored in <code>__oldValue</code> to the pointer\n\tin the memory location referenced by <code>__theValue</code>.  If the pointers\n\tmatch, this function stores the pointer from <code>__newValue</code> into\n\tthat memory location atomically.\n\n\tThis function is equivalent to {@link OSAtomicCompareAndSwapPtr}\n\texcept that it also introduces a barrier.\n    @result Returns TRUE on a match, FALSE otherwise.\n */\nOSATOMIC_BARRIER_DEPRECATED_REPLACE_WITH(atomic_compare_exchange_strong)\n__OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0)\nbool\tOSAtomicCompareAndSwapPtrBarrier( void *__oldValue, void *__newValue, void * volatile *__theValue );\n\n\n/*! @abstract Compare and swap for <code>int</code> values.\n    @discussion\n\tThis function compares the value in <code>__oldValue</code> to the value\n\tin the memory location referenced by <code>__theValue</code>.  If the values\n\tmatch, this function stores the value from <code>__newValue</code> into\n\tthat memory location atomically.\n\n\tThis function is equivalent to {@link OSAtomicCompareAndSwap32}.\n    @result Returns TRUE on a match, FALSE otherwise.\n */\nOSATOMIC_DEPRECATED_REPLACE_WITH(atomic_compare_exchange_strong)\n__OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0)\nbool\tOSAtomicCompareAndSwapInt( int __oldValue, int __newValue, volatile int *__theValue );\n\n\n/*! @abstract Compare and swap for <code>int</code> values.\n    @discussion\n\tThis function compares the value in <code>__oldValue</code> to the value\n\tin the memory location referenced by <code>__theValue</code>.  If the values\n\tmatch, this function stores the value from <code>__newValue</code> into\n\tthat memory location atomically.\n\n\tThis function is equivalent to {@link OSAtomicCompareAndSwapInt}\n\texcept that it also introduces a barrier.\n\n\tThis function is equivalent to {@link OSAtomicCompareAndSwap32Barrier}.\n    @result Returns TRUE on a match, FALSE otherwise.\n */\nOSATOMIC_BARRIER_DEPRECATED_REPLACE_WITH(atomic_compare_exchange_strong)\n__OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0)\nbool\tOSAtomicCompareAndSwapIntBarrier( int __oldValue, int __newValue, volatile int *__theValue );\n\n\n/*! @abstract Compare and swap for <code>long</code> values.\n    @discussion\n\tThis function compares the value in <code>__oldValue</code> to the value\n\tin the memory location referenced by <code>__theValue</code>.  If the values\n\tmatch, this function stores the value from <code>__newValue</code> into\n\tthat memory location atomically.\n\n\tThis function is equivalent to {@link OSAtomicCompareAndSwap32} on 32-bit architectures,\n\tor {@link OSAtomicCompareAndSwap64} on 64-bit architectures.\n    @result Returns TRUE on a match, FALSE otherwise.\n */\nOSATOMIC_DEPRECATED_REPLACE_WITH(atomic_compare_exchange_strong)\n__OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0)\nbool\tOSAtomicCompareAndSwapLong( long __oldValue, long __newValue, volatile long *__theValue );\n\n\n/*! @abstract Compare and swap for <code>long</code> values.\n    @discussion\n\tThis function compares the value in <code>__oldValue</code> to the value\n\tin the memory location referenced by <code>__theValue</code>.  If the values\n\tmatch, this function stores the value from <code>__newValue</code> into\n\tthat memory location atomically.\n\n\tThis function is equivalent to {@link OSAtomicCompareAndSwapLong}\n\texcept that it also introduces a barrier.\n\n\tThis function is equivalent to {@link OSAtomicCompareAndSwap32} on 32-bit architectures,\n\tor {@link OSAtomicCompareAndSwap64} on 64-bit architectures.\n    @result Returns TRUE on a match, FALSE otherwise.\n */\nOSATOMIC_BARRIER_DEPRECATED_REPLACE_WITH(atomic_compare_exchange_strong)\n__OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0)\nbool\tOSAtomicCompareAndSwapLongBarrier( long __oldValue, long __newValue, volatile long *__theValue );\n\n\n/*! @abstract Compare and swap for <code>uint64_t</code> values.\n    @discussion\n\tThis function compares the value in <code>__oldValue</code> to the value\n\tin the memory location referenced by <code>__theValue</code>.  If the values\n\tmatch, this function stores the value from <code>__newValue</code> into\n\tthat memory location atomically.\n    @result Returns TRUE on a match, FALSE otherwise.\n */\nOSATOMIC_DEPRECATED_REPLACE_WITH(atomic_compare_exchange_strong)\n__OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0)\nbool    OSAtomicCompareAndSwap64( int64_t __oldValue, int64_t __newValue,\n\t\tvolatile OSAtomic_int64_aligned64_t *__theValue );\n\n\n/*! @abstract Compare and swap for <code>uint64_t</code> values.\n    @discussion\n\tThis function compares the value in <code>__oldValue</code> to the value\n\tin the memory location referenced by <code>__theValue</code>.  If the values\n\tmatch, this function stores the value from <code>__newValue</code> into\n\tthat memory location atomically.\n\n\tThis function is equivalent to {@link OSAtomicCompareAndSwap64}\n\texcept that it also introduces a barrier.\n    @result Returns TRUE on a match, FALSE otherwise.\n */\nOSATOMIC_BARRIER_DEPRECATED_REPLACE_WITH(atomic_compare_exchange_strong)\n__OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_3_2)\nbool    OSAtomicCompareAndSwap64Barrier( int64_t __oldValue, int64_t __newValue,\n\t\tvolatile OSAtomic_int64_aligned64_t *__theValue );\n\n\n/* Test and set.\n * They return the original value of the bit, and operate on bit (0x80>>(n&7))\n * in byte ((char*)theAddress + (n>>3)).\n */\n/*! @abstract Atomic test and set\n    @discussion\n\tThis function tests a bit in the value referenced by\n\t<code>__theAddress</code> and if it is not set, sets it.\n\n\tThe bit is chosen by the value of <code>__n</code> such that the\n\toperation will be performed on bit <code>(0x80 >> (__n & 7))</code>\n\tof byte <code>((char *)__theAddress + (n >> 3))</code>.\n\n\tFor example, if <code>__theAddress</code> points to a 64-bit value,\n\tto compare the value of the most significant bit, you would specify\n\t<code>56</code> for <code>__n</code>.\n    @result\n\tReturns the original value of the bit being tested.\n */\nOSATOMIC_DEPRECATED_REPLACE_WITH(atomic_fetch_or)\n__OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0)\nbool    OSAtomicTestAndSet( uint32_t __n, volatile void *__theAddress );\n\n\n/*! @abstract Atomic test and set with barrier\n    @discussion\n\tThis function tests a bit in the value referenced by <code>__theAddress</code>\n\tand if it is not set, sets it.\n\n\tThe bit is chosen by the value of <code>__n</code> such that the\n\toperation will be performed on bit <code>(0x80 >> (__n & 7))</code>\n\tof byte <code>((char *)__theAddress + (n >> 3))</code>.\n\n\tFor example, if <code>__theAddress</code> points to a 64-bit value,\n\tto compare the value of the most significant bit, you would specify\n\t<code>56</code> for <code>__n</code>.\n\n\tThis function is equivalent to {@link OSAtomicTestAndSet}\n\texcept that it also introduces a barrier.\n    @result\n\tReturns the original value of the bit being tested.\n */\nOSATOMIC_BARRIER_DEPRECATED_REPLACE_WITH(atomic_fetch_or)\n__OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0)\nbool    OSAtomicTestAndSetBarrier( uint32_t __n, volatile void *__theAddress );\n\n\n\n/*! @abstract Atomic test and clear\n    @discussion\n\tThis function tests a bit in the value referenced by <code>__theAddress</code>\n\tand if it is not cleared, clears it.\n\n\tThe bit is chosen by the value of <code>__n</code> such that the\n\toperation will be performed on bit <code>(0x80 >> (__n & 7))</code>\n\tof byte <code>((char *)__theAddress + (n >> 3))</code>.\n\n\tFor example, if <code>__theAddress</code> points to a 64-bit value,\n\tto compare the value of the most significant bit, you would specify\n\t<code>56</code> for <code>__n</code>.\n\n    @result\n\tReturns the original value of the bit being tested.\n */\nOSATOMIC_DEPRECATED_REPLACE_WITH(atomic_fetch_and)\n__OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0)\nbool    OSAtomicTestAndClear( uint32_t __n, volatile void *__theAddress );\n\n\n/*! @abstract Atomic test and clear\n    @discussion\n\tThis function tests a bit in the value referenced by <code>__theAddress</code>\n\tand if it is not cleared, clears it.\n\n\tThe bit is chosen by the value of <code>__n</code> such that the\n\toperation will be performed on bit <code>(0x80 >> (__n & 7))</code>\n\tof byte <code>((char *)__theAddress + (n >> 3))</code>.\n\n\tFor example, if <code>__theAddress</code> points to a 64-bit value,\n\tto compare the value of the most significant bit, you would specify\n\t<code>56</code> for <code>__n</code>.\n\n\tThis function is equivalent to {@link OSAtomicTestAndSet}\n\texcept that it also introduces a barrier.\n    @result\n\tReturns the original value of the bit being tested.\n */\nOSATOMIC_BARRIER_DEPRECATED_REPLACE_WITH(atomic_fetch_and)\n__OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0)\nbool    OSAtomicTestAndClearBarrier( uint32_t __n, volatile void *__theAddress );\n\n\n/*! @group Memory barriers */\n\n/*! @abstract Memory barrier.\n    @discussion\n\tThis function serves as both a read and write barrier.\n */\nOSATOMIC_BARRIER_DEPRECATED_REPLACE_WITH(atomic_thread_fence)\n__OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0)\nvoid    OSMemoryBarrier( void );\n\n__END_DECLS\n\n#else // defined(OSATOMIC_USE_INLINED) && OSATOMIC_USE_INLINED\n\n/*\n * Inline implementations of the legacy OSAtomic interfaces in terms of\n * C11 <stdatomic.h> resp. C++11 <atomic> primitives.\n * Direct use of those primitives is preferred.\n */\n\n#include <sys/cdefs.h>\n\n#include <stddef.h>\n#include <stdint.h>\n#include <stdbool.h>\n\n#ifdef __cplusplus\nextern \"C++\" {\n#if !(__has_include(<atomic>) && __has_extension(cxx_atomic))\n#error Cannot use inlined OSAtomic without <atomic> and C++11 atomics\n#endif\n#include <atomic>\ntypedef std::atomic<uint8_t> _OSAtomic_uint8_t;\ntypedef std::atomic<int32_t> _OSAtomic_int32_t;\ntypedef std::atomic<uint32_t> _OSAtomic_uint32_t;\ntypedef std::atomic<int64_t> _OSAtomic_int64_t;\ntypedef std::atomic<void*> _OSAtomic_void_ptr_t;\n#define OSATOMIC_STD(_a) std::_a\n__BEGIN_DECLS\n#else\n#if !(__has_include(<stdatomic.h>) && __has_extension(c_atomic))\n#error Cannot use inlined OSAtomic without <stdatomic.h> and C11 atomics\n#endif\n#include <stdatomic.h>\ntypedef _Atomic(uint8_t) _OSAtomic_uint8_t;\ntypedef _Atomic(int32_t) _OSAtomic_int32_t;\ntypedef _Atomic(uint32_t) _OSAtomic_uint32_t;\ntypedef _Atomic(int64_t) _OSAtomic_int64_t;\ntypedef _Atomic(void*) _OSAtomic_void_ptr_t;\n#define OSATOMIC_STD(_a) _a\n#endif\n\n#if __has_extension(c_alignof) && __has_attribute(aligned)\ntypedef int64_t __attribute__((__aligned__(_Alignof(_OSAtomic_int64_t))))\n\t\tOSAtomic_int64_aligned64_t;\n#elif __has_attribute(aligned)\ntypedef int64_t __attribute__((__aligned__((sizeof(_OSAtomic_int64_t)))))\n\t\tOSAtomic_int64_aligned64_t;\n#else\ntypedef int64_t OSAtomic_int64_aligned64_t;\n#endif\n\n#if __has_attribute(always_inline)\n#define OSATOMIC_INLINE static __inline __attribute__((__always_inline__))\n#else\n#define OSATOMIC_INLINE static __inline\n#endif\n\nOSATOMIC_INLINE\nint32_t\nOSAtomicAdd32(int32_t __theAmount, volatile int32_t *__theValue)\n{\n\treturn (OSATOMIC_STD(atomic_fetch_add_explicit)(\n\t\t\t(volatile _OSAtomic_int32_t*) __theValue, __theAmount,\n\t\t\tOSATOMIC_STD(memory_order_relaxed)) + __theAmount);\n}\n\nOSATOMIC_INLINE\nint32_t\nOSAtomicAdd32Barrier(int32_t __theAmount, volatile int32_t *__theValue)\n{\n\treturn (OSATOMIC_STD(atomic_fetch_add_explicit)(\n\t\t\t(volatile _OSAtomic_int32_t*) __theValue, __theAmount,\n\t\t\tOSATOMIC_STD(memory_order_seq_cst)) + __theAmount);\n}\n\nOSATOMIC_INLINE\nint32_t\nOSAtomicIncrement32(volatile int32_t *__theValue)\n{\n\treturn OSAtomicAdd32(1, __theValue);\n}\n\nOSATOMIC_INLINE\nint32_t\nOSAtomicIncrement32Barrier(volatile int32_t *__theValue)\n{\n\treturn OSAtomicAdd32Barrier(1, __theValue);\n}\n\nOSATOMIC_INLINE\nint32_t\nOSAtomicDecrement32(volatile int32_t *__theValue)\n{\n\treturn OSAtomicAdd32(-1, __theValue);\n}\n\nOSATOMIC_INLINE\nint32_t\nOSAtomicDecrement32Barrier(volatile int32_t *__theValue)\n{\n\treturn OSAtomicAdd32Barrier(-1, __theValue);\n}\n\nOSATOMIC_INLINE\nint64_t\nOSAtomicAdd64(int64_t __theAmount,\n\t\tvolatile OSAtomic_int64_aligned64_t *__theValue)\n{\n\treturn (OSATOMIC_STD(atomic_fetch_add_explicit)(\n\t\t\t(volatile _OSAtomic_int64_t*) __theValue, __theAmount,\n\t\t\tOSATOMIC_STD(memory_order_relaxed)) + __theAmount);\n}\n\nOSATOMIC_INLINE\nint64_t\nOSAtomicAdd64Barrier(int64_t __theAmount,\n\t\tvolatile OSAtomic_int64_aligned64_t *__theValue)\n{\n\treturn (OSATOMIC_STD(atomic_fetch_add_explicit)(\n\t\t\t(volatile _OSAtomic_int64_t*) __theValue, __theAmount,\n\t\t\tOSATOMIC_STD(memory_order_seq_cst)) + __theAmount);\n}\n\nOSATOMIC_INLINE\nint64_t\nOSAtomicIncrement64(volatile OSAtomic_int64_aligned64_t *__theValue)\n{\n\treturn OSAtomicAdd64(1, __theValue);\n}\n\nOSATOMIC_INLINE\nint64_t\nOSAtomicIncrement64Barrier(volatile OSAtomic_int64_aligned64_t *__theValue)\n{\n\treturn OSAtomicAdd64Barrier(1, __theValue);\n}\n\nOSATOMIC_INLINE\nint64_t\nOSAtomicDecrement64(volatile OSAtomic_int64_aligned64_t *__theValue)\n{\n\treturn OSAtomicAdd64(-1, __theValue);\n}\n\nOSATOMIC_INLINE\nint64_t\nOSAtomicDecrement64Barrier(volatile OSAtomic_int64_aligned64_t *__theValue)\n{\n\treturn OSAtomicAdd64Barrier(-1, __theValue);\n}\n\nOSATOMIC_INLINE\nint32_t\nOSAtomicOr32(uint32_t __theMask, volatile uint32_t *__theValue)\n{\n\treturn (int32_t)(OSATOMIC_STD(atomic_fetch_or_explicit)(\n\t\t\t(volatile _OSAtomic_uint32_t*)__theValue, __theMask,\n\t\t\tOSATOMIC_STD(memory_order_relaxed)) | __theMask);\n}\n\nOSATOMIC_INLINE\nint32_t\nOSAtomicOr32Barrier(uint32_t __theMask, volatile uint32_t *__theValue)\n{\n\treturn (int32_t)(OSATOMIC_STD(atomic_fetch_or_explicit)(\n\t\t\t(volatile _OSAtomic_uint32_t*)__theValue, __theMask,\n\t\t\tOSATOMIC_STD(memory_order_seq_cst)) | __theMask);\n}\n\nOSATOMIC_INLINE\nint32_t\nOSAtomicOr32Orig(uint32_t __theMask, volatile uint32_t *__theValue)\n{\n\treturn (int32_t)(OSATOMIC_STD(atomic_fetch_or_explicit)(\n\t\t\t(volatile _OSAtomic_uint32_t*)__theValue, __theMask,\n\t\t\tOSATOMIC_STD(memory_order_relaxed)));\n}\n\nOSATOMIC_INLINE\nint32_t\nOSAtomicOr32OrigBarrier(uint32_t __theMask, volatile uint32_t *__theValue)\n{\n\treturn (int32_t)(OSATOMIC_STD(atomic_fetch_or_explicit)(\n\t\t\t(volatile _OSAtomic_uint32_t*)__theValue, __theMask,\n\t\t\tOSATOMIC_STD(memory_order_seq_cst)));\n}\n\nOSATOMIC_INLINE\nint32_t\nOSAtomicAnd32(uint32_t __theMask, volatile uint32_t *__theValue)\n{\n\treturn (int32_t)(OSATOMIC_STD(atomic_fetch_and_explicit)(\n\t\t\t(volatile _OSAtomic_uint32_t*)__theValue, __theMask,\n\t\t\tOSATOMIC_STD(memory_order_relaxed)) & __theMask);\n}\n\nOSATOMIC_INLINE\nint32_t\nOSAtomicAnd32Barrier(uint32_t __theMask, volatile uint32_t *__theValue)\n{\n\treturn (int32_t)(OSATOMIC_STD(atomic_fetch_and_explicit)(\n\t\t\t(volatile _OSAtomic_uint32_t*)__theValue, __theMask,\n\t\t\tOSATOMIC_STD(memory_order_seq_cst)) & __theMask);\n}\n\nOSATOMIC_INLINE\nint32_t\nOSAtomicAnd32Orig(uint32_t __theMask, volatile uint32_t *__theValue)\n{\n\treturn (int32_t)(OSATOMIC_STD(atomic_fetch_and_explicit)(\n\t\t\t(volatile _OSAtomic_uint32_t*)__theValue, __theMask,\n\t\t\tOSATOMIC_STD(memory_order_relaxed)));\n}\n\nOSATOMIC_INLINE\nint32_t\nOSAtomicAnd32OrigBarrier(uint32_t __theMask, volatile uint32_t *__theValue)\n{\n\treturn (int32_t)(OSATOMIC_STD(atomic_fetch_and_explicit)(\n\t\t\t(volatile _OSAtomic_uint32_t*)__theValue, __theMask,\n\t\t\tOSATOMIC_STD(memory_order_seq_cst)));\n}\n\nOSATOMIC_INLINE\nint32_t\nOSAtomicXor32(uint32_t __theMask, volatile uint32_t *__theValue)\n{\n\treturn (int32_t)(OSATOMIC_STD(atomic_fetch_xor_explicit)(\n\t\t\t(volatile _OSAtomic_uint32_t*)__theValue, __theMask,\n\t\t\tOSATOMIC_STD(memory_order_relaxed)) ^ __theMask);\n}\n\nOSATOMIC_INLINE\nint32_t\nOSAtomicXor32Barrier(uint32_t __theMask, volatile uint32_t *__theValue)\n{\n\treturn (int32_t)(OSATOMIC_STD(atomic_fetch_xor_explicit)(\n\t\t\t(volatile _OSAtomic_uint32_t*)__theValue, __theMask,\n\t\t\tOSATOMIC_STD(memory_order_seq_cst)) ^ __theMask);\n}\n\nOSATOMIC_INLINE\nint32_t\nOSAtomicXor32Orig(uint32_t __theMask, volatile uint32_t *__theValue)\n{\n\treturn (int32_t)(OSATOMIC_STD(atomic_fetch_xor_explicit)(\n\t\t\t(volatile _OSAtomic_uint32_t*)__theValue, __theMask,\n\t\t\tOSATOMIC_STD(memory_order_relaxed)));\n}\n\nOSATOMIC_INLINE\nint32_t\nOSAtomicXor32OrigBarrier(uint32_t __theMask, volatile uint32_t *__theValue)\n{\n\treturn (int32_t)(OSATOMIC_STD(atomic_fetch_xor_explicit)(\n\t\t\t(volatile _OSAtomic_uint32_t*)__theValue, __theMask,\n\t\t\tOSATOMIC_STD(memory_order_seq_cst)));\n}\n\nOSATOMIC_INLINE\nbool\nOSAtomicCompareAndSwap32(int32_t __oldValue, int32_t __newValue,\n\t\tvolatile int32_t *__theValue)\n{\n\treturn (OSATOMIC_STD(atomic_compare_exchange_strong_explicit)(\n\t\t\t(volatile _OSAtomic_int32_t*)__theValue, &__oldValue, __newValue,\n\t\t\tOSATOMIC_STD(memory_order_relaxed),\n\t\t\tOSATOMIC_STD(memory_order_relaxed)));\n}\n\nOSATOMIC_INLINE\nbool\nOSAtomicCompareAndSwap32Barrier(int32_t __oldValue, int32_t __newValue,\n\t\tvolatile int32_t *__theValue)\n{\n\treturn (OSATOMIC_STD(atomic_compare_exchange_strong_explicit)(\n\t\t\t(volatile _OSAtomic_int32_t*)__theValue, &__oldValue, __newValue,\n\t\t\tOSATOMIC_STD(memory_order_seq_cst),\n\t\t\tOSATOMIC_STD(memory_order_relaxed)));\n}\n\nOSATOMIC_INLINE\nbool\nOSAtomicCompareAndSwapPtr(void *__oldValue, void *__newValue,\n\t\tvoid * volatile *__theValue)\n{\n\treturn (OSATOMIC_STD(atomic_compare_exchange_strong_explicit)(\n\t\t\t(volatile _OSAtomic_void_ptr_t*)__theValue, &__oldValue, __newValue,\n\t\t\tOSATOMIC_STD(memory_order_relaxed),\n\t\t\tOSATOMIC_STD(memory_order_relaxed)));\n}\n\nOSATOMIC_INLINE\nbool\nOSAtomicCompareAndSwapPtrBarrier(void *__oldValue, void *__newValue,\n\t\tvoid * volatile *__theValue)\n{\n\treturn (OSATOMIC_STD(atomic_compare_exchange_strong_explicit)(\n\t\t\t(volatile _OSAtomic_void_ptr_t*)__theValue, &__oldValue, __newValue,\n\t\t\tOSATOMIC_STD(memory_order_seq_cst),\n\t\t\tOSATOMIC_STD(memory_order_relaxed)));\n}\n\nOSATOMIC_INLINE\nbool\nOSAtomicCompareAndSwapInt(int __oldValue, int __newValue,\n\t\tvolatile int *__theValue)\n{\n\treturn (OSATOMIC_STD(atomic_compare_exchange_strong_explicit)(\n\t\t\t(volatile OSATOMIC_STD(atomic_int)*)__theValue, &__oldValue,\n\t\t\t__newValue, OSATOMIC_STD(memory_order_relaxed),\n\t\t\tOSATOMIC_STD(memory_order_relaxed)));\n}\n\nOSATOMIC_INLINE\nbool\nOSAtomicCompareAndSwapIntBarrier(int __oldValue, int __newValue,\n\t\tvolatile int *__theValue)\n{\n\treturn (OSATOMIC_STD(atomic_compare_exchange_strong_explicit)(\n\t\t\t(volatile OSATOMIC_STD(atomic_int)*)__theValue, &__oldValue,\n\t\t\t__newValue, OSATOMIC_STD(memory_order_seq_cst),\n\t\t\tOSATOMIC_STD(memory_order_relaxed)));\n}\n\nOSATOMIC_INLINE\nbool\nOSAtomicCompareAndSwapLong(long __oldValue, long __newValue,\n\t\tvolatile long *__theValue)\n{\n\treturn (OSATOMIC_STD(atomic_compare_exchange_strong_explicit)(\n\t\t\t(volatile OSATOMIC_STD(atomic_long)*)__theValue, &__oldValue,\n\t\t\t__newValue, OSATOMIC_STD(memory_order_relaxed),\n\t\t\tOSATOMIC_STD(memory_order_relaxed)));\n}\n\nOSATOMIC_INLINE\nbool\nOSAtomicCompareAndSwapLongBarrier(long __oldValue, long __newValue,\n\t\tvolatile long *__theValue)\n{\n\treturn (OSATOMIC_STD(atomic_compare_exchange_strong_explicit)(\n\t\t\t(volatile OSATOMIC_STD(atomic_long)*)__theValue, &__oldValue,\n\t\t\t__newValue, OSATOMIC_STD(memory_order_seq_cst),\n\t\t\tOSATOMIC_STD(memory_order_relaxed)));\n}\n\nOSATOMIC_INLINE\nbool\nOSAtomicCompareAndSwap64(int64_t __oldValue, int64_t __newValue,\n\t\tvolatile OSAtomic_int64_aligned64_t *__theValue)\n{\n\treturn (OSATOMIC_STD(atomic_compare_exchange_strong_explicit)(\n\t\t\t(volatile _OSAtomic_int64_t*)__theValue, &__oldValue, __newValue,\n\t\t\tOSATOMIC_STD(memory_order_relaxed),\n\t\t\tOSATOMIC_STD(memory_order_relaxed)));\n}\n\nOSATOMIC_INLINE\nbool\nOSAtomicCompareAndSwap64Barrier(int64_t __oldValue, int64_t __newValue,\n\t\tvolatile OSAtomic_int64_aligned64_t *__theValue)\n{\n\treturn (OSATOMIC_STD(atomic_compare_exchange_strong_explicit)(\n\t\t\t(volatile _OSAtomic_int64_t*)__theValue, &__oldValue, __newValue,\n\t\t\tOSATOMIC_STD(memory_order_seq_cst),\n\t\t\tOSATOMIC_STD(memory_order_relaxed)));\n}\n\nOSATOMIC_INLINE\nbool\nOSAtomicTestAndSet(uint32_t __n, volatile void *__theAddress)\n{\n\tuintptr_t a = (uintptr_t)__theAddress + (__n >> 3);\n\tuint8_t v = (0x80u >> (__n & 7));\n\treturn (OSATOMIC_STD(atomic_fetch_or_explicit)((_OSAtomic_uint8_t*)a, v,\n\t\t\tOSATOMIC_STD(memory_order_relaxed)) & v);\n}\n\nOSATOMIC_INLINE\nbool\nOSAtomicTestAndSetBarrier(uint32_t __n, volatile void *__theAddress)\n{\n\tuintptr_t a = (uintptr_t)__theAddress + (__n >> 3);\n\tuint8_t v = (0x80u >> (__n & 7));\n\treturn (OSATOMIC_STD(atomic_fetch_or_explicit)((_OSAtomic_uint8_t*)a, v,\n\t\t\tOSATOMIC_STD(memory_order_seq_cst)) & v);\n}\n\nOSATOMIC_INLINE\nbool\nOSAtomicTestAndClear(uint32_t __n, volatile void *__theAddress)\n{\n\tuintptr_t a = (uintptr_t)__theAddress + (__n >> 3);\n\tuint8_t v = (0x80u >> (__n & 7));\n\treturn (OSATOMIC_STD(atomic_fetch_and_explicit)((_OSAtomic_uint8_t*)a,\n\t\t\t(uint8_t)~v, OSATOMIC_STD(memory_order_relaxed)) & v);\n}\n\nOSATOMIC_INLINE\nbool\nOSAtomicTestAndClearBarrier(uint32_t __n, volatile void *__theAddress)\n{\n\tuintptr_t a = (uintptr_t)__theAddress + (__n >> 3);\n\tuint8_t v = (0x80u >> (__n & 7));\n\treturn (OSATOMIC_STD(atomic_fetch_and_explicit)((_OSAtomic_uint8_t*)a,\n\t\t\t(uint8_t)~v, OSATOMIC_STD(memory_order_seq_cst)) & v);\n}\n\nOSATOMIC_INLINE\nvoid\nOSMemoryBarrier(void)\n{\n\tOSATOMIC_STD(atomic_thread_fence)(OSATOMIC_STD(memory_order_seq_cst));\n}\n\n#undef OSATOMIC_INLINE\n#undef OSATOMIC_STD\n#ifdef __cplusplus\n__END_DECLS\n} // extern \"C++\"\n#endif\n\n#endif // defined(OSATOMIC_USE_INLINED) && OSATOMIC_USE_INLINED\n\n#if TARGET_OS_OSX || TARGET_OS_DRIVERKIT\n\n__BEGIN_DECLS\n\n/*! @group Lockless atomic fifo enqueue and dequeue\n * These routines manipulate singly-linked FIFO lists.\n *\n * This API is deprecated and no longer recommended\n */\n\n/*! @abstract The data structure for a fifo queue head.\n    @discussion\n\tYou should always initialize a fifo queue head structure with the\n\tinitialization vector {@link OS_ATOMIC_FIFO_QUEUE_INIT} before use.\n */\n#if defined(__LP64__)\n\ntypedef\tvolatile struct {\n\tvoid\t*opaque1;\n\tvoid\t*opaque2;\n\tint\t opaque3;\n} __attribute__ ((aligned (16))) OSFifoQueueHead;\n\n#else\n\ntypedef\tvolatile struct {\n\tvoid\t*opaque1;\n\tvoid\t*opaque2;\n\tint\t opaque3;\n} OSFifoQueueHead;\n\n#endif\n/*! @abstract The initialization vector for a fifo queue head. */\n#define OS_ATOMIC_FIFO_QUEUE_INIT   { NULL, NULL, 0 }\n\n/*! @abstract Enqueue an element onto a list.\n    @discussion\n\tMemory barriers are incorporated as needed to permit thread-safe access\n\tto the queue element.\n    @param __list\n\tThe list on which you want to enqueue the element.\n    @param __new\n\tThe element to add.\n    @param __offset\n\tThe \"offset\" parameter is the offset (in bytes) of the link field\n\tfrom the beginning of the data structure being queued (<code>__new</code>).\n\tThe link field should be a pointer type.\n\tThe <code>__offset</code> value needs to be same for all enqueuing and\n\tdequeuing operations on the same list, even if different structure types\n\tare enqueued on that list.  The use of <code>offsetset()</code>, defined in\n\t<code>stddef.h</code> is the common way to specify the <code>__offset</code>\n\tvalue.\n\n\t@note\n\tThis API is deprecated and no longer recommended\n */\n__API_DEPRECATED(\"No longer supported\", macos(10.7, 11.0))\nvoid  OSAtomicFifoEnqueue( OSFifoQueueHead *__list, void *__new, size_t __offset);\n\n/*! @abstract Dequeue an element from a list.\n    @discussion\n\tMemory barriers are incorporated as needed to permit thread-safe access\n\tto the queue element.\n    @param __list\n\tThe list from which you want to dequeue an element.\n    @param __offset\n\tThe \"offset\" parameter is the offset (in bytes) of the link field\n\tfrom the beginning of the data structure being dequeued (<code>__new</code>).\n\tThe link field should be a pointer type.\n\tThe <code>__offset</code> value needs to be same for all enqueuing and\n\tdequeuing operations on the same list, even if different structure types\n\tare enqueued on that list.  The use of <code>offsetset()</code>, defined in\n\t<code>stddef.h</code> is the common way to specify the <code>__offset</code>\n\tvalue.\n    @result\n\tReturns the oldest enqueued element, or <code>NULL</code> if the\n\tlist is empty.\n\n\t@note\n\tThis API is deprecated and no longer recommended\n */\n__API_DEPRECATED(\"No longer supported\", macos(10.7, 11.0))\nvoid* OSAtomicFifoDequeue( OSFifoQueueHead *__list, size_t __offset);\n\n__END_DECLS\n\n#endif /* TARGET_OS_OSX || TARGET_OS_DRIVERKIT */\n\n#endif /* _OSATOMIC_DEPRECATED_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/libkern/OSAtomicQueue.h",
    "content": "/*\n * Copyright (c) 2004-2016 Apple Inc. All rights reserved.\n *\n * @APPLE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this\n * file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_LICENSE_HEADER_END@\n */\n\n#ifndef _OSATOMICQUEUE_H_\n#define _OSATOMICQUEUE_H_\n\n#include    <stddef.h>\n#include    <sys/cdefs.h>\n#include    <stdint.h>\n#include    <stdbool.h>\n#include    \"OSAtomicDeprecated.h\"\n\n#include    <Availability.h>\n\n/*! @header Lockless atomic enqueue and dequeue\n * These routines manipulate singly-linked LIFO lists.\n */\n\n__BEGIN_DECLS\n\n/*! @abstract The data structure for a queue head.\n    @discussion\n\tYou should always initialize a queue head structure with the\n\tinitialization vector {@link OS_ATOMIC_QUEUE_INIT} before use.\n */\n#if defined(__LP64__)\n\ntypedef volatile struct {\n\tvoid\t*opaque1;\n\tlong\t opaque2;\n} __attribute__ ((aligned (16))) OSQueueHead;\n\n#else\n\ntypedef volatile struct {\n\tvoid\t*opaque1;\n\tlong\t opaque2;\n} OSQueueHead;\n\n#endif\n\n/*! @abstract The initialization vector for a queue head. */\n#define\tOS_ATOMIC_QUEUE_INIT\t{ NULL, 0 }\n\n/*! @abstract Enqueue an element onto a list.\n    @discussion\n\tMemory barriers are incorporated as needed to permit thread-safe access\n\tto the queue element.\n    @param __list\n\tThe list on which you want to enqueue the element.\n    @param __new\n\tThe element to add.\n    @param __offset\n\tThe \"offset\" parameter is the offset (in bytes) of the link field\n\tfrom the beginning of the data structure being queued (<code>__new</code>).\n\tThe link field should be a pointer type.\n\tThe <code>__offset</code> value needs to be same for all enqueuing and\n\tdequeuing operations on the same list, even if different structure types\n\tare enqueued on that list.  The use of <code>offsetset()</code>, defined in\n\t<code>stddef.h</code> is the common way to specify the <code>__offset</code>\n\tvalue.\n */\n__OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_4_0)\nvoid  OSAtomicEnqueue( OSQueueHead *__list, void *__new, size_t __offset);\n\n\n/*! @abstract Dequeue an element from a list.\n    @discussion\n\tMemory barriers are incorporated as needed to permit thread-safe access\n\tto the queue element.\n    @param __list\n\tThe list from which you want to dequeue an element.\n    @param __offset\n\tThe \"offset\" parameter is the offset (in bytes) of the link field\n\tfrom the beginning of the data structure being dequeued (<code>__new</code>).\n\tThe link field should be a pointer type.\n\tThe <code>__offset</code> value needs to be same for all enqueuing and\n\tdequeuing operations on the same list, even if different structure types\n\tare enqueued on that list.  The use of <code>offsetset()</code>, defined in\n\t<code>stddef.h</code> is the common way to specify the <code>__offset</code>\n\tvalue.\n\tIMPORTANT: the memory backing the link field of a queue element must not be\n\tunmapped after OSAtomicDequeue() returns until all concurrent calls to\n\tOSAtomicDequeue() for the same list on other threads have also returned,\n\tas they may still be accessing that memory location.\n    @result\n\tReturns the most recently enqueued element, or <code>NULL</code> if the\n\tlist is empty.\n */\n__OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_4_0)\nvoid* OSAtomicDequeue( OSQueueHead *__list, size_t __offset);\n\n__END_DECLS\n\n#endif /* _OSATOMICQUEUE_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/libkern/OSByteOrder.h",
    "content": "/*\n * Copyright (c) 2000-2006 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n\n#ifndef _OS_OSBYTEORDER_H\n#define _OS_OSBYTEORDER_H\n\n#include <stdint.h>\n#include <libkern/_OSByteOrder.h>\n\n/* Macros for swapping constant values in the preprocessing stage. */\n#define OSSwapConstInt16(x)     __DARWIN_OSSwapConstInt16(x)\n#define OSSwapConstInt32(x)     __DARWIN_OSSwapConstInt32(x)\n#define OSSwapConstInt64(x)     __DARWIN_OSSwapConstInt64(x)\n\n#if !defined(__DARWIN_OS_INLINE)\n# if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L\n#        define __DARWIN_OS_INLINE static inline\n# elif defined(__MWERKS__) || defined(__cplusplus)\n#        define __DARWIN_OS_INLINE static inline\n# else\n#        define __DARWIN_OS_INLINE static __inline__\n# endif\n#endif\n\n#if defined(__GNUC__)\n\n#if (defined(__i386__) || defined(__x86_64__))\n#include <libkern/i386/OSByteOrder.h>\n#elif defined (__arm__) || defined(__arm64__)\n#include <libkern/arm/OSByteOrder.h>\n#else\n#include <libkern/machine/OSByteOrder.h>\n#endif\n\n#else /* ! __GNUC__ */\n\n#include <libkern/machine/OSByteOrder.h>\n\n#endif /* __GNUC__ */\n\n#define OSSwapInt16(x)  __DARWIN_OSSwapInt16(x)\n#define OSSwapInt32(x)  __DARWIN_OSSwapInt32(x)\n#define OSSwapInt64(x)  __DARWIN_OSSwapInt64(x)\n\nenum {\n\tOSUnknownByteOrder,\n\tOSLittleEndian,\n\tOSBigEndian\n};\n\n__DARWIN_OS_INLINE\nint32_t\nOSHostByteOrder(void)\n{\n#if defined(__LITTLE_ENDIAN__)\n\treturn OSLittleEndian;\n#elif defined(__BIG_ENDIAN__)\n\treturn OSBigEndian;\n#else\n\treturn OSUnknownByteOrder;\n#endif\n}\n\n#define OSReadBigInt(x, y)              OSReadBigInt32(x, y)\n#define OSWriteBigInt(x, y, z)          OSWriteBigInt32(x, y, z)\n#define OSSwapBigToHostInt(x)           OSSwapBigToHostInt32(x)\n#define OSSwapHostToBigInt(x)           OSSwapHostToBigInt32(x)\n#define OSReadLittleInt(x, y)           OSReadLittleInt32(x, y)\n#define OSWriteLittleInt(x, y, z)       OSWriteLittleInt32(x, y, z)\n#define OSSwapHostToLittleInt(x)        OSSwapHostToLittleInt32(x)\n#define OSSwapLittleToHostInt(x)        OSSwapLittleToHostInt32(x)\n\n/* Functions for loading native endian values. */\n\n__DARWIN_OS_INLINE\nuint16_t\n_OSReadInt16(\n\tconst volatile void               * base,\n\tuintptr_t                     byteOffset\n\t)\n{\n\treturn *(volatile uint16_t *)((uintptr_t)base + byteOffset);\n}\n\n__DARWIN_OS_INLINE\nuint32_t\n_OSReadInt32(\n\tconst volatile void               * base,\n\tuintptr_t                     byteOffset\n\t)\n{\n\treturn *(volatile uint32_t *)((uintptr_t)base + byteOffset);\n}\n\n__DARWIN_OS_INLINE\nuint64_t\n_OSReadInt64(\n\tconst volatile void               * base,\n\tuintptr_t                     byteOffset\n\t)\n{\n\treturn *(volatile uint64_t *)((uintptr_t)base + byteOffset);\n}\n\n/* Functions for storing native endian values. */\n\n__DARWIN_OS_INLINE\nvoid\n_OSWriteInt16(\n\tvolatile void               * base,\n\tuintptr_t                     byteOffset,\n\tuint16_t                      data\n\t)\n{\n\t*(volatile uint16_t *)((uintptr_t)base + byteOffset) = data;\n}\n\n__DARWIN_OS_INLINE\nvoid\n_OSWriteInt32(\n\tvolatile void               * base,\n\tuintptr_t                     byteOffset,\n\tuint32_t                      data\n\t)\n{\n\t*(volatile uint32_t *)((uintptr_t)base + byteOffset) = data;\n}\n\n__DARWIN_OS_INLINE\nvoid\n_OSWriteInt64(\n\tvolatile void               * base,\n\tuintptr_t                     byteOffset,\n\tuint64_t                      data\n\t)\n{\n\t*(volatile uint64_t *)((uintptr_t)base + byteOffset) = data;\n}\n\n#if             defined(__BIG_ENDIAN__)\n\n/* Functions for loading big endian to host endianess. */\n\n#define OSReadBigInt16(base, byteOffset) _OSReadInt16(base, byteOffset)\n#define OSReadBigInt32(base, byteOffset) _OSReadInt32(base, byteOffset)\n#define OSReadBigInt64(base, byteOffset) _OSReadInt64(base, byteOffset)\n\n/* Functions for storing host endianess to big endian. */\n\n#define OSWriteBigInt16(base, byteOffset, data) _OSWriteInt16(base, byteOffset, data)\n#define OSWriteBigInt32(base, byteOffset, data) _OSWriteInt32(base, byteOffset, data)\n#define OSWriteBigInt64(base, byteOffset, data) _OSWriteInt64(base, byteOffset, data)\n\n/* Functions for loading little endian to host endianess. */\n\n#define OSReadLittleInt16(base, byteOffset) OSReadSwapInt16(base, byteOffset)\n#define OSReadLittleInt32(base, byteOffset) OSReadSwapInt32(base, byteOffset)\n#define OSReadLittleInt64(base, byteOffset) OSReadSwapInt64(base, byteOffset)\n\n/* Functions for storing host endianess to little endian. */\n\n#define OSWriteLittleInt16(base, byteOffset, data) OSWriteSwapInt16(base, byteOffset, data)\n#define OSWriteLittleInt32(base, byteOffset, data) OSWriteSwapInt32(base, byteOffset, data)\n#define OSWriteLittleInt64(base, byteOffset, data) OSWriteSwapInt64(base, byteOffset, data)\n\n/* Host endianess to big endian byte swapping macros for constants. */\n\n#define OSSwapHostToBigConstInt16(x) ((uint16_t)(x))\n#define OSSwapHostToBigConstInt32(x) ((uint32_t)(x))\n#define OSSwapHostToBigConstInt64(x) ((uint64_t)(x))\n\n/* Generic host endianess to big endian byte swapping functions. */\n\n#define OSSwapHostToBigInt16(x) ((uint16_t)(x))\n#define OSSwapHostToBigInt32(x) ((uint32_t)(x))\n#define OSSwapHostToBigInt64(x) ((uint64_t)(x))\n\n/* Host endianess to little endian byte swapping macros for constants. */\n\n#define OSSwapHostToLittleConstInt16(x) OSSwapConstInt16(x)\n#define OSSwapHostToLittleConstInt32(x) OSSwapConstInt32(x)\n#define OSSwapHostToLittleConstInt64(x) OSSwapConstInt64(x)\n\n/* Generic host endianess to little endian byte swapping functions. */\n\n#define OSSwapHostToLittleInt16(x) OSSwapInt16(x)\n#define OSSwapHostToLittleInt32(x) OSSwapInt32(x)\n#define OSSwapHostToLittleInt64(x) OSSwapInt64(x)\n\n/* Big endian to host endianess byte swapping macros for constants. */\n\n#define OSSwapBigToHostConstInt16(x) ((uint16_t)(x))\n#define OSSwapBigToHostConstInt32(x) ((uint32_t)(x))\n#define OSSwapBigToHostConstInt64(x) ((uint64_t)(x))\n\n/* Generic big endian to host endianess byte swapping functions. */\n\n#define OSSwapBigToHostInt16(x) ((uint16_t)(x))\n#define OSSwapBigToHostInt32(x) ((uint32_t)(x))\n#define OSSwapBigToHostInt64(x) ((uint64_t)(x))\n\n/* Little endian to host endianess byte swapping macros for constants. */\n\n#define OSSwapLittleToHostConstInt16(x) OSSwapConstInt16(x)\n#define OSSwapLittleToHostConstInt32(x) OSSwapConstInt32(x)\n#define OSSwapLittleToHostConstInt64(x) OSSwapConstInt64(x)\n\n/* Generic little endian to host endianess byte swapping functions. */\n\n#define OSSwapLittleToHostInt16(x) OSSwapInt16(x)\n#define OSSwapLittleToHostInt32(x) OSSwapInt32(x)\n#define OSSwapLittleToHostInt64(x) OSSwapInt64(x)\n\n#elif           defined(__LITTLE_ENDIAN__)\n\n/* Functions for loading big endian to host endianess. */\n\n#define OSReadBigInt16(base, byteOffset) OSReadSwapInt16(base, byteOffset)\n#define OSReadBigInt32(base, byteOffset) OSReadSwapInt32(base, byteOffset)\n#define OSReadBigInt64(base, byteOffset) OSReadSwapInt64(base, byteOffset)\n\n/* Functions for storing host endianess to big endian. */\n\n#define OSWriteBigInt16(base, byteOffset, data) OSWriteSwapInt16(base, byteOffset, data)\n#define OSWriteBigInt32(base, byteOffset, data) OSWriteSwapInt32(base, byteOffset, data)\n#define OSWriteBigInt64(base, byteOffset, data) OSWriteSwapInt64(base, byteOffset, data)\n\n/* Functions for loading little endian to host endianess. */\n\n#define OSReadLittleInt16(base, byteOffset) _OSReadInt16(base, byteOffset)\n#define OSReadLittleInt32(base, byteOffset) _OSReadInt32(base, byteOffset)\n#define OSReadLittleInt64(base, byteOffset) _OSReadInt64(base, byteOffset)\n\n/* Functions for storing host endianess to little endian. */\n\n#define OSWriteLittleInt16(base, byteOffset, data) _OSWriteInt16(base, byteOffset, data)\n#define OSWriteLittleInt32(base, byteOffset, data) _OSWriteInt32(base, byteOffset, data)\n#define OSWriteLittleInt64(base, byteOffset, data) _OSWriteInt64(base, byteOffset, data)\n\n/* Host endianess to big endian byte swapping macros for constants. */\n\n#define OSSwapHostToBigConstInt16(x) OSSwapConstInt16(x)\n#define OSSwapHostToBigConstInt32(x) OSSwapConstInt32(x)\n#define OSSwapHostToBigConstInt64(x) OSSwapConstInt64(x)\n\n/* Generic host endianess to big endian byte swapping functions. */\n\n#define OSSwapHostToBigInt16(x) OSSwapInt16(x)\n#define OSSwapHostToBigInt32(x) OSSwapInt32(x)\n#define OSSwapHostToBigInt64(x) OSSwapInt64(x)\n\n/* Host endianess to little endian byte swapping macros for constants. */\n\n#define OSSwapHostToLittleConstInt16(x) ((uint16_t)(x))\n#define OSSwapHostToLittleConstInt32(x) ((uint32_t)(x))\n#define OSSwapHostToLittleConstInt64(x) ((uint64_t)(x))\n\n/* Generic host endianess to little endian byte swapping functions. */\n\n#define OSSwapHostToLittleInt16(x) ((uint16_t)(x))\n#define OSSwapHostToLittleInt32(x) ((uint32_t)(x))\n#define OSSwapHostToLittleInt64(x) ((uint64_t)(x))\n\n/* Big endian to host endianess byte swapping macros for constants. */\n\n#define OSSwapBigToHostConstInt16(x) OSSwapConstInt16(x)\n#define OSSwapBigToHostConstInt32(x) OSSwapConstInt32(x)\n#define OSSwapBigToHostConstInt64(x) OSSwapConstInt64(x)\n\n/* Generic big endian to host endianess byte swapping functions. */\n\n#define OSSwapBigToHostInt16(x) OSSwapInt16(x)\n#define OSSwapBigToHostInt32(x) OSSwapInt32(x)\n#define OSSwapBigToHostInt64(x) OSSwapInt64(x)\n\n/* Little endian to host endianess byte swapping macros for constants. */\n\n#define OSSwapLittleToHostConstInt16(x) ((uint16_t)(x))\n#define OSSwapLittleToHostConstInt32(x) ((uint32_t)(x))\n#define OSSwapLittleToHostConstInt64(x) ((uint64_t)(x))\n\n/* Generic little endian to host endianess byte swapping functions. */\n\n#define OSSwapLittleToHostInt16(x) ((uint16_t)(x))\n#define OSSwapLittleToHostInt32(x) ((uint32_t)(x))\n#define OSSwapLittleToHostInt64(x) ((uint64_t)(x))\n\n#else\n#error Unknown endianess.\n#endif\n\n#endif /* ! _OS_OSBYTEORDER_H */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/libkern/OSCacheControl.h",
    "content": "/*\n * Copyright (c) 2006 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_LICENSE_HEADER_START@\n * \n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this\n * file.\n * \n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n * \n * @APPLE_LICENSE_HEADER_END@\n */\n\n#ifndef _OS_CACHE_CONTROL_H_\n#define _OS_CACHE_CONTROL_H_\n\n#include    <stddef.h>\n#include    <sys/cdefs.h>\n#include    <stdint.h>\n#include    <Availability.h>\n\n__BEGIN_DECLS\n\n\n/* Functions performed by sys_cache_control(): */\n\n/* Prepare memory for execution.  This should be called\n * after writing machine instructions to memory, before\n * executing them.  It syncs the dcache and icache.\n * On IA32 processors this function is a NOP, because\n * no synchronization is required.\n */\n#define\tkCacheFunctionPrepareForExecution\t1\n\n/* Flush data cache(s).  This ensures that cached data \n * makes it all the way out to DRAM, and then removes\n * copies of the data from all processor caches.\n * It can be useful when dealing with cache incoherent\n * devices or DMA.\n */\n#define\tkCacheFunctionFlushDcache\t2\n\n\n/* perform one of the above cache functions: */\nint\tsys_cache_control( int function, void *start, size_t len) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);\n \n/* equivalent to sys_cache_control(kCacheFunctionPrepareForExecution): */\nvoid\tsys_icache_invalidate( void *start, size_t len) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);\n\n/* equivalent to sys_cache_control(kCacheFunctionFlushDcache): */\nvoid\tsys_dcache_flush( void *start, size_t len) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);\n\n\n__END_DECLS\n\n#endif /* _OS_CACHE_CONTROL_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/libkern/OSDebug.h",
    "content": "/*\n * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/*\n * Copyright (c) 1999 Apple Computer, Inc.  All rights reserved.\n *\n * HISTORY\n *\n */\n\n#ifndef _OS_OSDEBBUG_H\n#define _OS_OSDEBBUG_H\n\n#include <sys/cdefs.h>\n#include <mach/mach_types.h>\n\n__BEGIN_DECLS\n\nextern int log_leaks;\n\n/* Use kernel_debug() to log a backtrace */\nextern void trace_backtrace(unsigned int debugid, unsigned int debugid2, unsigned long size, unsigned long data);\n/* Report a message with a 4 entry backtrace - very slow */\nextern void OSReportWithBacktrace(const char *str, ...);\nextern unsigned OSBacktrace(void **bt, unsigned maxAddrs);\n\n/* Simple dump of 20 backtrace entries */\nextern void OSPrintBacktrace(void);\n\n/*! @function OSKernelStackRemaining\n *   @abstract Returns bytes available below the current stack frame.\n *   @discussion Returns bytes available below the current stack frame. Safe for interrupt or thread context.\n *   @result Approximate byte count available. */\n\nvm_offset_t OSKernelStackRemaining( void );\n\n__END_DECLS\n\n#define TRACE_MACHLEAKS(a, b, c, d)        \\\ndo {                                    \\\n    if (__builtin_expect(!!log_leaks, 0))                      \\\n\ttrace_backtrace(a,b,c,d);       \\\n} while(0)\n\n#endif /* !_OS_OSDEBBUG_H */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/libkern/OSKextLib.h",
    "content": "/*\n * Copyright (c) 2008 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n\n#ifndef _LIBKERN_OSKEXTLIB_H\n#define _LIBKERN_OSKEXTLIB_H\n\n#include <sys/cdefs.h>\n__BEGIN_DECLS\n\n#include <stdint.h>\n#include <mach/kmod.h>\n#include <mach/vm_types.h>\n#include <uuid/uuid.h>\n\n#include <libkern/OSReturn.h>\n\n/*!\n * @header\n *\n * Declares functions, basic return values, and other constants\n * related to kernel extensions (kexts).\n */\n\n#if PRAGMA_MARK\n#pragma mark -\n/********************************************************************/\n#pragma mark OSReturn Values for Kernel Extensions\n/********************************************************************/\n#endif\n/*!\n * @group OSReturn Values for Kernel Extensions\n * Many kext-related functions return these values,\n * as well as those defined under\n * <code>@link //apple_ref/c/tdef/OSReturn OSReturn@/link</code>\n * and other variants of <code>kern_return_t</code>.\n */\n\n\n#define sub_libkern_kext           err_sub(2)\n#define libkern_kext_err(code)     (sys_libkern|sub_libkern_kext|(code))\n\n\n/*!\n * @define   kOSKextReturnInternalError\n * @abstract An internal error in the kext library.\n *           Contrast with <code>@link //apple_ref/c/econst/OSReturnError\n *           OSReturnError@/link</code>.\n */\n#define kOSKextReturnInternalError                   libkern_kext_err(0x1)\n\n/*!\n * @define   kOSKextReturnNoMemory\n * @abstract Memory allocation failed.\n */\n#define kOSKextReturnNoMemory                        libkern_kext_err(0x2)\n\n/*!\n * @define   kOSKextReturnNoResources\n * @abstract Some resource other than memory (such as available load tags)\n *           is exhausted.\n */\n#define kOSKextReturnNoResources                     libkern_kext_err(0x3)\n\n/*!\n * @define   kOSKextReturnNotPrivileged\n * @abstract The caller lacks privileges to perform the requested operation.\n */\n#define kOSKextReturnNotPrivileged                   libkern_kext_err(0x4)\n\n/*!\n * @define   kOSKextReturnInvalidArgument\n * @abstract Invalid argument.\n */\n#define kOSKextReturnInvalidArgument                 libkern_kext_err(0x5)\n\n/*!\n * @define   kOSKextReturnNotFound\n * @abstract Search item not found.\n */\n#define kOSKextReturnNotFound                        libkern_kext_err(0x6)\n\n/*!\n * @define   kOSKextReturnBadData\n * @abstract Malformed data (not used for XML).\n */\n#define kOSKextReturnBadData                         libkern_kext_err(0x7)\n\n/*!\n * @define   kOSKextReturnSerialization\n * @abstract Error converting or (un)serializing URL, string, or XML.\n */\n#define kOSKextReturnSerialization                   libkern_kext_err(0x8)\n\n/*!\n * @define   kOSKextReturnUnsupported\n * @abstract Operation is no longer or not yet supported.\n */\n#define kOSKextReturnUnsupported                     libkern_kext_err(0x9)\n\n/*!\n * @define   kOSKextReturnDisabled\n * @abstract Operation is currently disabled.\n */\n#define kOSKextReturnDisabled                        libkern_kext_err(0xa)\n\n/*!\n * @define   kOSKextReturnNotAKext\n * @abstract Bundle is not a kernel extension.\n */\n#define kOSKextReturnNotAKext                        libkern_kext_err(0xb)\n\n/*!\n * @define   kOSKextReturnValidation\n * @abstract Validation failures encountered; check diagnostics for details.\n */\n#define kOSKextReturnValidation                      libkern_kext_err(0xc)\n\n/*!\n * @define   kOSKextReturnAuthentication\n * @abstract Authetication failures encountered; check diagnostics for details.\n */\n#define kOSKextReturnAuthentication                  libkern_kext_err(0xd)\n\n/*!\n * @define   kOSKextReturnDependencies\n * @abstract Dependency resolution failures encountered; check diagnostics for details.\n */\n#define kOSKextReturnDependencies                    libkern_kext_err(0xe)\n\n/*!\n * @define   kOSKextReturnArchNotFound\n * @abstract Kext does not contain code for the requested architecture.\n */\n#define kOSKextReturnArchNotFound                    libkern_kext_err(0xf)\n\n/*!\n * @define   kOSKextReturnCache\n * @abstract An error occurred processing a system kext cache.\n */\n#define kOSKextReturnCache                           libkern_kext_err(0x10)\n\n/*!\n * @define   kOSKextReturnDeferred\n * @abstract Operation has been posted asynchronously to user space (kernel only).\n */\n#define kOSKextReturnDeferred                        libkern_kext_err(0x11)\n\n/*!\n * @define   kOSKextReturnBootLevel\n * @abstract Kext not loadable or operation not allowed at current boot level.\n */\n#define kOSKextReturnBootLevel                       libkern_kext_err(0x12)\n\n/*!\n * @define   kOSKextReturnNotLoadable\n * @abstract Kext cannot be loaded; check diagnostics for details.\n */\n#define kOSKextReturnNotLoadable                     libkern_kext_err(0x13)\n\n/*!\n * @define   kOSKextReturnLoadedVersionDiffers\n * @abstract A different version (or executable UUID, or executable by checksum)\n *           of the requested kext is already loaded.\n */\n#define kOSKextReturnLoadedVersionDiffers            libkern_kext_err(0x14)\n\n/*!\n * @define   kOSKextReturnDependencyLoadError\n * @abstract A load error occurred on a dependency of the kext being loaded.\n */\n#define kOSKextReturnDependencyLoadError             libkern_kext_err(0x15)\n\n/*!\n * @define   kOSKextReturnLinkError\n * @abstract A link failure occured with this kext or a dependency.\n */\n#define kOSKextReturnLinkError                       libkern_kext_err(0x16)\n\n/*!\n * @define   kOSKextReturnStartStopError\n * @abstract The kext start or stop routine returned an error.\n */\n#define kOSKextReturnStartStopError                  libkern_kext_err(0x17)\n\n/*!\n * @define   kOSKextReturnInUse\n * @abstract The kext is currently in use or has outstanding references,\n *           and cannot be unloaded.\n */\n#define kOSKextReturnInUse                           libkern_kext_err(0x18)\n\n/*!\n * @define   kOSKextReturnTimeout\n * @abstract A kext request has timed out.\n */\n#define kOSKextReturnTimeout                         libkern_kext_err(0x19)\n\n/*!\n * @define   kOSKextReturnStopping\n * @abstract The kext is in the process of stopping; requests cannot be made.\n */\n#define kOSKextReturnStopping                        libkern_kext_err(0x1a)\n\n/*!\n * @define   kOSKextReturnSystemPolicy\n * @abstract The kext was prevented from loading due to system policy.\n */\n#define kOSKextReturnSystemPolicy                    libkern_kext_err(0x1b)\n\n/*!\n * @define   kOSKextReturnKCLoadFailure\n * @abstract Loading of the System KC failed\n */\n#define kOSKextReturnKCLoadFailure                  libkern_kext_err(0x1c)\n\n/*!\n * @define   kOSKextReturnKCLoadFailureSystemKC\n * @abstract Loading of the System KC failed\n *\n * This a sub-code of kOSKextReturnKCLoadFailure. It can be OR'd together\n * with: kOSKextReturnKCLoadFailureAuxKC\n *\n * If both the System and Aux KCs fail to load, then the error code will be:\n * libkern_kext_err(0x1f)\n */\n#define kOSKextReturnKCLoadFailureSystemKC          libkern_kext_err(0x1d)\n\n/*!\n * @define   kOSKextReturnKCLoadFailureAuxKC\n * @abstract Loading of the Aux KC failed\n *\n * This a sub-code of kOSKextReturnKCLoadFailure. It can be OR'd together\n * with: kOSKextReturnKCLoadFailureSystemKC\n *\n * If both the System and Aux KCs fail to load, then the error code will be:\n * libkern_kext_err(0x1f)\n */\n#define kOSKextReturnKCLoadFailureAuxKC             libkern_kext_err(0x1e)\n\n/* next available error is: libkern_kext_err(0x20) */\n\n#if PRAGMA_MARK\n#pragma mark -\n/********************************************************************/\n#pragma mark Kext/OSBundle Property List Keys\n/********************************************************************/\n#endif\n/*!\n * @group Kext Property List Keys\n * These constants cover CFBundle properties defined for kernel extensions.\n * Because they are used in the kernel, if you want to use one with\n * CFBundle APIs you'll need to wrap it in a <code>CFSTR()</code> macro.\n */\n\n\n/*!\n * @define   kOSBundleCompatibleVersionKey\n * @abstract A string giving the backwards-compatible version of a library kext\n *           in extended Mac OS 'vers' format (####.##.##s{1-255} where 's'\n *           is a build stage 'd', 'a', 'b', 'f' or 'fc').\n */\n#define kOSBundleCompatibleVersionKey           \"OSBundleCompatibleVersion\"\n\n/*!\n * @define   kOSBundleEnableKextLoggingKey\n * @abstract Set to true to have the kernel kext logging spec applied\n *           to the kext.\n *           See <code>@link //apple_ref/c/econst/OSKextLogSpec\n *           OSKextLogSpec@/link</code>.\n */\n#define kOSBundleEnableKextLoggingKey           \"OSBundleEnableKextLogging\"\n\n/*!\n * @define   kOSBundleIsInterfaceKey\n * @abstract A boolean value indicating whether the kext executable\n *           contains only symbol references.\n */\n#define kOSBundleIsInterfaceKey                 \"OSBundleIsInterface\"\n\n/*!\n * @define   kOSBundleLibrariesKey\n * @abstract A dictionary listing link dependencies for this kext.\n *           Keys are bundle identifiers, values are version strings.\n */\n#define kOSBundleLibrariesKey                   \"OSBundleLibraries\"\n\n/*!\n * @define   kOSBundleRequiredKey\n * @abstract A string indicating in which kinds of startup this kext\n *           may need to load during early startup (before\n *           <code>@link //apple_ref/doc/man/8/kextd kextcache(8)@/link</code>).\n * @discussion\n * The value is one of:\n * <ul>\n * <li>@link kOSBundleRequiredRoot \"OSBundleRequiredRoot\"@/link</li>\n * <li>@link kOSBundleRequiredLocalRoot \"OSBundleRequiredLocalRoot\"@/link</li>\n * <li>@link kOSBundleRequiredNetworkRoot \"OSBundleRequiredNetworkRoot\"@/link</li>\n * <li>@link kOSBundleRequiredSafeBoot \"OSBundleRequiredSafeBoot\"@/link</li>\n * <li>@link kOSBundleRequiredConsole \"OSBundleRequiredConsole\"@/link</li>\n * </ul>\n *\n * Use this property judiciously.\n * Every kext that declares a value other than \"OSBundleRequiredSafeBoot\"\n * increases startup time, as the booter must read it into memory,\n * or startup kext caches must include it.\n */\n#define kOSBundleRequiredKey                    \"OSBundleRequired\"\n\n/*!\n * @define   kOSBundleRequireExplicitLoadKey\n * @abstract A boolean value indicating whether the kext requires an\n *           explicit kextload in order to start/match.\n */\n#define kOSBundleRequireExplicitLoadKey         \"OSBundleRequireExplicitLoad\"\n\n/*!\n * @define   kOSBundleAllowUserLoadKey\n * @abstract A boolean value indicating whether\n *           <code>@link //apple_ref/doc/man/8/kextd kextcache(8)@/link</code>\n *           will honor a non-root process's request to load a kext.\n * @discussion\n * See <code>@link //apple_ref/doc/compositePage/c/func/KextManagerLoadKextWithURL\n * KextManagerLoadKextWithURL@/link</code>\n * and <code>@link //apple_ref/doc/compositePage/c/func/KextManagerLoadKextWithIdentifier\n * KextManagerLoadKextWithIdentifier@/link</code>.\n */\n#define kOSBundleAllowUserLoadKey               \"OSBundleAllowUserLoad\"\n\n/*!\n * @define   kOSBundleAllowUserTerminateKey\n * @abstract A boolean value indicating whether the kextunload tool\n *           is allowed to issue IOService terminate to classes defined in this kext.\n * @discussion A boolean value indicating whether the kextunload tool\n *           is allowed to issue IOService terminate to classes defined in this kext.\n */\n#define kOSBundleAllowUserTerminateKey          \"OSBundleAllowUserTerminate\"\n\n/*!\n * @define   kOSKernelResourceKey\n * @abstract A boolean value indicating whether the kext represents a built-in\n *           component of the kernel.\n */\n#define kOSKernelResourceKey                    \"OSKernelResource\"\n\n/*!\n * @define   kOSKextVariantOverrideKey\n * @abstract A dictionary with target names as key and a target-specific variant\n *           name as value.\n */\n#define kOSKextVariantOverrideKey               \"OSKextVariantOverride\"\n\n/*!\n * @define   kIOKitPersonalitiesKey\n * @abstract A dictionary of dictionaries used in matching for I/O Kit drivers.\n */\n#define kIOKitPersonalitiesKey                  \"IOKitPersonalities\"\n\n/*\n * @define   kIOPersonalityPublisherKey\n * @abstract Used in personalities sent to the I/O Kit,\n *           contains the CFBundleIdentifier of the kext\n *           that the personality originated in.\n */\n#define kIOPersonalityPublisherKey              \"IOPersonalityPublisher\"\n\n#if CONFIG_KEC_FIPS\n/*\n * @define   kAppleTextHashesKey\n * @abstract A dictionary conataining hashes for corecrypto kext.\n */\n#define kAppleTextHashesKey                     \"AppleTextHashes\"\n#endif\n\n/*!\n * @define   kOSMutableSegmentCopy\n * @abstract A boolean value indicating whether the kext requires a copy of\n *           its mutable segments to be kept in memory, and then reset when the kext\n *           unloads. This should be used with caution as it will increase the\n *           amount of memory used by the kext.\n */\n#define kOSMutableSegmentCopy                   \"OSMutableSegmentCopy\"\n\n\n#if PRAGMA_MARK\n/********************************************************************/\n#pragma mark Kext/OSBundle Property Deprecated Keys\n/********************************************************************/\n#endif\n/*\n * @define   kOSBundleDebugLevelKey\n * @abstract\n * Deprecated (used on some releases of Mac OS X prior to 10.6 Snow Leopard).\n * Value is an integer from 1-6, corresponding to the verbose levels\n * of kext tools on those releases.\n * On 10.6 Snow Leopard, use <code>@link OSKextEnableKextLogging\n * OSKextEnableKextLogging@/link</code>.\n */\n#define kOSBundleDebugLevelKey                  \"OSBundleDebugLevel\"\n\n/*!\n * @define   kOSBundleSharedExecutableIdentifierKey\n * @abstract Deprecated (used on some releases of Mac OS X\n *           prior to 10.6 Snow Leopard).\n *           Value is the bundle identifier of the pseudokext\n *           that contains an executable shared by this kext.\n */\n#define kOSBundleSharedExecutableIdentifierKey  \"OSBundleSharedExecutableIdentifier\"\n\n\n#if PRAGMA_MARK\n/********************************************************************/\n#pragma mark Kext/OSBundle Property List Values\n/********************************************************************/\n#endif\n\n/*!\n * @group Kext Property List Values\n * These constants encompass established values\n * for kernel extension bundle properties.\n */\n\n/*!\n * @define   kOSKextKernelIdentifier\n * @abstract\n * This is the CFBundleIdentifier user for the kernel itself.\n */\n#define kOSKextKernelIdentifier                 \"__kernel__\"\n\n/*!\n * @define  kOSKextBundlePackageTypeKext\n * @abstract\n * The bundle type value for Kernel Extensions.\n */\n#define kOSKextBundlePackageTypeKext        \"KEXT\"\n\n/*!\n * @define  kOSKextBundlePackageTypeDriverKit\n * @abstract\n * The bundle type value for Driver Extensions.\n */\n#define kOSKextBundlePackageTypeDriverKit   \"DEXT\"\n\n/*!\n * @define   kOSBundleRequiredRoot\n * @abstract\n * This <code>@link kOSBundleRequiredKey OSBundleRequired@/link</code>\n * value indicates that the kext may be needed to mount the root filesystem\n * whether starting from a local or a network volume.\n */\n#define kOSBundleRequiredRoot                   \"Root\"\n\n/*!\n * @define   kOSBundleRequiredLocalRoot\n * @abstract\n * This <code>@link kOSBundleRequiredKey OSBundleRequired@/link</code>\n * value indicates that the kext may be needed to mount the root filesystem\n * when starting from a local disk.\n */\n#define kOSBundleRequiredLocalRoot              \"Local-Root\"\n\n/*!\n * @define   kOSBundleRequiredNetworkRoot\n * @abstract\n * This <code>@link kOSBundleRequiredKey OSBundleRequired@/link</code>\n * value indicates that the kext may be needed to mount the root filesystem\n * when starting over a network connection.\n */\n#define kOSBundleRequiredNetworkRoot            \"Network-Root\"\n\n/*!\n * @define   kOSBundleRequiredSafeBoot\n * @abstract\n * This <code>@link kOSBundleRequiredKey OSBundleRequired@/link</code>\n * value indicates that the kext can be loaded during a safe startup.\n * This value does not normally cause the kext to be read by the booter\n * or included in startup kext caches.\n */\n#define kOSBundleRequiredSafeBoot               \"Safe Boot\"\n\n/*!\n * @define   kOSBundleRequiredConsole\n * @abstract\n * This <code>@link kOSBundleRequiredKey OSBundleRequired@/link</code>\n * value indicates that the kext may be needed for console access\n * (specifically in a single-user startup when\n * <code>@link //apple_ref/doc/man/8/kextd kextd(8)@/link</code>.\n * does not run)\n * and should be loaded during early startup.\n */\n#define kOSBundleRequiredConsole                \"Console\"\n\n/*!\n * @define   kOSBundleRequiredDriverKit\n * @abstract\n * This <code>@link kOSBundleRequiredKey OSBundleRequired@/link</code>\n * value indicates that the driver extension's (DriverKit driver's)\n * personalities must be present in the kernel at early boot (specifically\n * before <code>@link //apple_ref/doc/man/8/kextd kextd(8)@/link</code> starts)\n * in order to compete with kexts built into the prelinkedkernel. Note that\n * kextd is still required to launch the user space driver binary. The IOKit\n * matching will happen during early boot, and the actual driver launch\n * will happen after kextd starts.\n */\n#define kOSBundleRequiredDriverKit              \"DriverKit\"\n\n#if PRAGMA_MARK\n#pragma mark -\n/********************************************************************/\n#pragma mark Kext Information\n/********************************************************************/\n#endif\n/*!\n * @group Kext Information\n * Types, constants, and macros providing a kext with information\n * about itself.\n */\n\n/*!\n * @typedef OSKextLoadTag\n *\n * @abstract\n * A unique identifier assigned to a loaded instanace of a kext.\n *\n * @discussion\n * If a kext is unloaded and later reloaded, the new instance\n * has a different load tag.\n *\n * A kext can get its own load tag in the <code>kmod_info_t</code>\n * structure passed into its module start routine, as the\n * <code>id</code> field (cast to this type).\n */\ntypedef uint32_t  OSKextLoadTag;\n\n/*!\n * @define kOSKextInvalidLoadTag\n *\n * @abstract\n * A load tag value that will never be used for a loaded kext;\n * indicates kext not found.\n */\n#define  kOSKextInvalidLoadTag  ((OSKextLoadTag)(-1))\n\n\n__END_DECLS\n\n#endif /* _LIBKERN_OSKEXTLIB_H */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/libkern/OSReturn.h",
    "content": "/*\n * Copyright (c) 2000 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/*\n * Copyright (c) 1998 Apple Inc.  All rights reserved.\n *\n * HISTORY\n *\n */\n\n/*\n * Core OSReturn values.\n */\n\n#ifndef __LIBKERN_OSRETURN_H\n#define __LIBKERN_OSRETURN_H\n\n#include <sys/cdefs.h>\n\n__BEGIN_DECLS\n\n#include <mach/error.h>\n\n\n/*!\n * @header\n *\n * Declares functions, basic return values, and other constants\n * related to kernel extensions (kexts).\n */\n\n#if PRAGMA_MARK\n#pragma mark Core OSReturn Values for Libkern\n#endif\n/*********************************************************************\n* Core OSReturn Values for Libkern\n*********************************************************************/\n/*!\n * @group Core OSReturn Values for Libkern\n * Some kext and I/O Kit functions can return these values,\n * as well as  other values of\n * <code>kern_return_t</code>.\n *\n * Many of these return values represent internal errors\n * in the Libkern C++ run-time typing information system\n * based on @link //apple_ref/doc/class/OSMetaClass OSMetaClass@/link;\n * you are unlikely to ever see them.\n *\n */\n\n\n/*!\n * @typedef  OSReturn\n * @abstract The return type for many Libkern functions.\n */\ntypedef kern_return_t OSReturn;\n\n#ifndef sys_libkern\n#define sys_libkern                   err_system(0x37)\n#endif /* sys_libkern */\n\n#define sub_libkern_common            err_sub(0)\n#define sub_libkern_metaclass         err_sub(1)\n#define sub_libkern_reserved          err_sub(-1)\n\n#define libkern_common_err(return )    (sys_libkern|sub_libkern_common|(return))\n#define libkern_metaclass_err(return ) (sys_libkern|sub_libkern_metaclass|(return))\n\n/* See OSKextLib.h for these\n * #define sub_libkern_kext           err_sub(2)\n * #define libkern_kext_err(code)     (sys_libkern|sub_libkern_kext|(code))\n */\n\n/*!\n * @define   kOSReturnSuccess\n * @abstract Operation successful.\n *           Equal to <code>@link //apple_ref/c/econst/KERN_SUCCESS\n *           KERN_SUCCESS@/link</code>.\n */\n#define kOSReturnSuccess              KERN_SUCCESS\n\n/*!\n * @define   kOSReturnError\n * @abstract Unspecified Libkern error.\n *           <b>Not equal</b> to\n *           <code>@link //apple_ref/c/econst/KERN_FAILURE\n *           KERN_FAILURE@/link</code>.\n */\n#define kOSReturnError                libkern_common_err(1)\n\n/*!\n * @define   kOSMetaClassInternal\n * @abstract Internal OSMetaClass run-time error.\n */\n#define kOSMetaClassInternal          libkern_metaclass_err(1)\n\n/*!\n * @define   kOSMetaClassHasInstances\n * @abstract A kext cannot be unloaded because there are instances\n *           derived from Libkern C++ classes that it defines.\n */\n#define kOSMetaClassHasInstances      libkern_metaclass_err(2)\n\n/*!\n * @define   kOSMetaClassNoInit\n * @abstract Internal error: The Libkern C++ class registration system\n *           was not properly initialized during kext loading.\n */\n#define kOSMetaClassNoInit            libkern_metaclass_err(3)\n// OSMetaClass::preModLoad wasn't called, runtime internal error\n\n/*!\n * @define   kOSMetaClassNoTempData\n * @abstract Internal error: An allocation failure occurred\n *           registering Libkern C++ classes during kext loading.\n */\n#define kOSMetaClassNoTempData        libkern_metaclass_err(4)\n// Allocation failure internal data\n\n/*!\n * @define   kOSMetaClassNoDicts\n * @abstract Internal error: An allocation failure occurred\n *           registering Libkern C++ classes during kext loading.\n */\n#define kOSMetaClassNoDicts           libkern_metaclass_err(5)\n// Allocation failure for Metaclass internal dictionaries\n\n/*!\n * @define   kOSMetaClassNoKModSet\n * @abstract Internal error: An allocation failure occurred\n *           registering Libkern C++ classes during kext loading.\n */\n#define kOSMetaClassNoKModSet         libkern_metaclass_err(6)\n// Allocation failure for internal kmodule set\n\n/*!\n * @define   kOSMetaClassNoInsKModSet\n * @abstract Internal error: An error occurred registering\n *           a specific Libkern C++ class during kext loading.\n */\n#define kOSMetaClassNoInsKModSet      libkern_metaclass_err(7)\n// Can't insert the KMod set into the module dictionary\n\n/*!\n * @define   kOSMetaClassNoSuper\n * @abstract Internal error: No superclass can be found\n *           for a specific Libkern C++ class during kext loading.\n */\n#define kOSMetaClassNoSuper           libkern_metaclass_err(8)\n\n/*!\n * @define   kOSMetaClassInstNoSuper\n * @abstract Internal error: No superclass can be found when constructing\n *           an instance of a Libkern C++ class.\n */\n#define kOSMetaClassInstNoSuper       libkern_metaclass_err(9)\n\n/*!\n * @define   kOSMetaClassDuplicateClass\n * @abstract A duplicate Libkern C++ classname was encountered\n *           during kext loading.\n */\n#define kOSMetaClassDuplicateClass    libkern_metaclass_err(10)\n\n/*!\n * @define   kOSMetaClassNoKext\n * @abstract Internal error: The kext for a Libkern C++ class\n *           can't be found during kext loading.\n */\n#define kOSMetaClassNoKext            libkern_metaclass_err(11)\n\n__END_DECLS\n\n#endif /* ! __LIBKERN_OSRETURN_H */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/libkern/OSSpinLockDeprecated.h",
    "content": "/*\n * Copyright (c) 2004-2016 Apple Inc. All rights reserved.\n *\n * @APPLE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this\n * file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_LICENSE_HEADER_END@\n */\n\n#ifndef _OSSPINLOCK_DEPRECATED_H_\n#define _OSSPINLOCK_DEPRECATED_H_\n\n/*! @header\n * These are deprecated legacy interfaces for userspace spinlocks.\n *\n * These interfaces should no longer be used, particularily in situations where\n * threads of differing priorities may contend on the same spinlock.\n *\n * The interfaces in <os/lock.h> should be used instead in cases where a very\n * low-level lock primitive is required. In general however, using higher level\n * synchronization primitives such as those provided by the pthread or dispatch\n * subsystems should be preferred.\n *\n * Define OSSPINLOCK_USE_INLINED=1 to get inline implementations of these\n * interfaces in terms of the <os/lock.h> primitives. This is intended as a\n * transition convenience, direct use of those primitives is preferred.\n */\n\n#ifndef OSSPINLOCK_DEPRECATED\n#define OSSPINLOCK_DEPRECATED 1\n#define OSSPINLOCK_DEPRECATED_MSG(_r) \"Use \" #_r \"() from <os/lock.h> instead\"\n#define OSSPINLOCK_DEPRECATED_REPLACE_WITH(_r) \\\n\t__OS_AVAILABILITY_MSG(macosx, deprecated=10.12, OSSPINLOCK_DEPRECATED_MSG(_r)) \\\n\t__OS_AVAILABILITY_MSG(ios, deprecated=10.0, OSSPINLOCK_DEPRECATED_MSG(_r)) \\\n\t__OS_AVAILABILITY_MSG(tvos, deprecated=10.0, OSSPINLOCK_DEPRECATED_MSG(_r)) \\\n\t__OS_AVAILABILITY_MSG(watchos, deprecated=3.0, OSSPINLOCK_DEPRECATED_MSG(_r))\n#else\n#undef OSSPINLOCK_DEPRECATED\n#define OSSPINLOCK_DEPRECATED 0\n#define OSSPINLOCK_DEPRECATED_REPLACE_WITH(_r)\n#endif\n\n#if !(defined(OSSPINLOCK_USE_INLINED) && OSSPINLOCK_USE_INLINED)\n\n#include    <sys/cdefs.h>\n#include    <stddef.h>\n#include    <stdint.h>\n#include    <stdbool.h>\n#include    <Availability.h>\n\n__BEGIN_DECLS\n\n/*! @abstract The default value for an <code>OSSpinLock</code>.\n    @discussion\n\tThe convention is that unlocked is zero, locked is nonzero.\n */\n#define\tOS_SPINLOCK_INIT    0\n\n\n/*! @abstract Data type for a spinlock.\n    @discussion\n\tYou should always initialize a spinlock to {@link OS_SPINLOCK_INIT} before\n\tusing it.\n */\ntypedef int32_t OSSpinLock OSSPINLOCK_DEPRECATED_REPLACE_WITH(os_unfair_lock);\n\n\n/*! @abstract Locks a spinlock if it would not block\n    @result\n\tReturns <code>false</code> if the lock was already held by another thread,\n\t<code>true</code> if it took the lock successfully.\n */\nOSSPINLOCK_DEPRECATED_REPLACE_WITH(os_unfair_lock_trylock)\n__OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0)\nbool    OSSpinLockTry( volatile OSSpinLock *__lock );\n\n\n/*! @abstract Locks a spinlock\n    @discussion\n\tAlthough the lock operation spins, it employs various strategies to back\n\toff if the lock is held.\n */\nOSSPINLOCK_DEPRECATED_REPLACE_WITH(os_unfair_lock_lock)\n__OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0)\nvoid    OSSpinLockLock( volatile OSSpinLock *__lock );\n\n\n/*! @abstract Unlocks a spinlock */\nOSSPINLOCK_DEPRECATED_REPLACE_WITH(os_unfair_lock_unlock)\n__OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0)\nvoid    OSSpinLockUnlock( volatile OSSpinLock *__lock );\n\n__END_DECLS\n\n#else /* OSSPINLOCK_USE_INLINED */\n\n/*\n * Inline implementations of the legacy OSSpinLock interfaces in terms of the\n * of the <os/lock.h> primitives. Direct use of those primitives is preferred.\n *\n * NOTE: the locked value of os_unfair_lock is implementation defined and\n * subject to change, code that relies on the specific locked value used by the\n * legacy OSSpinLock interface WILL break when using these inline\n * implementations in terms of os_unfair_lock.\n */\n\n#if !OSSPINLOCK_USE_INLINED_TRANSPARENT\n\n#include <os/lock.h>\n\n__BEGIN_DECLS\n\n#if __has_attribute(always_inline)\n#define OSSPINLOCK_INLINE static __inline\n#else\n#define OSSPINLOCK_INLINE static __inline __attribute__((__always_inline__))\n#endif\n\n#define OS_SPINLOCK_INIT 0\ntypedef int32_t OSSpinLock;\n\n#if  __has_extension(c_static_assert)\n_Static_assert(sizeof(OSSpinLock) == sizeof(os_unfair_lock),\n\t\t\"Incompatible os_unfair_lock type\");\n#endif\n\nOSSPINLOCK_INLINE\nvoid\nOSSpinLockLock(volatile OSSpinLock *__lock)\n{\n\tos_unfair_lock_t lock = (os_unfair_lock_t)__lock;\n\treturn os_unfair_lock_lock(lock);\n}\n\nOSSPINLOCK_INLINE\nbool\nOSSpinLockTry(volatile OSSpinLock *__lock)\n{\n\tos_unfair_lock_t lock = (os_unfair_lock_t)__lock;\n\treturn os_unfair_lock_trylock(lock);\n}\n\nOSSPINLOCK_INLINE\nvoid\nOSSpinLockUnlock(volatile OSSpinLock *__lock)\n{\n\tos_unfair_lock_t lock = (os_unfair_lock_t)__lock;\n\treturn os_unfair_lock_unlock(lock);\n}\n\n#undef OSSPINLOCK_INLINE\n\n__END_DECLS\n\n#else /* OSSPINLOCK_USE_INLINED_TRANSPARENT */\n\n#include    <sys/cdefs.h>\n#include    <stddef.h>\n#include    <stdint.h>\n#include    <stdbool.h>\n#include    <Availability.h>\n\n#define OS_NOSPIN_LOCK_AVAILABILITY \\\n\t\t__OSX_AVAILABLE(10.12) __IOS_AVAILABLE(10.0) \\\n\t\t__TVOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0)\n\n__BEGIN_DECLS\n\n#define OS_SPINLOCK_INIT 0\ntypedef int32_t OSSpinLock OSSPINLOCK_DEPRECATED_REPLACE_WITH(os_unfair_lock);\ntypedef volatile OSSpinLock *_os_nospin_lock_t\n\t\tOSSPINLOCK_DEPRECATED_REPLACE_WITH(os_unfair_lock_t);\n\nOSSPINLOCK_DEPRECATED_REPLACE_WITH(os_unfair_lock_lock)\nOS_NOSPIN_LOCK_AVAILABILITY\nvoid _os_nospin_lock_lock(_os_nospin_lock_t lock);\n#undef OSSpinLockLock\n#define OSSpinLockLock(lock) _os_nospin_lock_lock(lock)\n\nOSSPINLOCK_DEPRECATED_REPLACE_WITH(os_unfair_lock_trylock)\nOS_NOSPIN_LOCK_AVAILABILITY\nbool _os_nospin_lock_trylock(_os_nospin_lock_t lock);\n#undef OSSpinLockTry\n#define OSSpinLockTry(lock) _os_nospin_lock_trylock(lock)\n\nOSSPINLOCK_DEPRECATED_REPLACE_WITH(os_unfair_lock_unlock)\nOS_NOSPIN_LOCK_AVAILABILITY\nvoid _os_nospin_lock_unlock(_os_nospin_lock_t lock);\n#undef OSSpinLockUnlock\n#define OSSpinLockUnlock(lock) _os_nospin_lock_unlock(lock)\n\n__END_DECLS\n\n#endif /* OSSPINLOCK_USE_INLINED_TRANSPARENT */\n\n#endif /* OSSPINLOCK_USE_INLINED */\n\n#endif /* _OSSPINLOCK_DEPRECATED_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/libkern/OSThermalNotification.h",
    "content": "/*\n * Copyright (c) 2007 Apple Inc. All rights reserved.\n *\n * @APPLE_LICENSE_HEADER_START@\n * \n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this\n * file.\n * \n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n * \n * @APPLE_LICENSE_HEADER_END@\n */\n\n#ifndef _OSTHERMALNOTIFICATION_H_\n#define _OSTHERMALNOTIFICATION_H_\n\n#include <sys/cdefs.h>\n#include <Availability.h>\n\n/*\n**  OSThermalNotification.h\n**  \n**  Notification mechanism to alert registered tasks when device thermal conditions\n**  reach certain thresholds. Notifications are triggered in both directions\n**  so clients can manage their memory usage more and less aggressively.\n**\n*/\n\n__BEGIN_DECLS\n\n/* Define pressure levels usable by OSThermalPressureLevel */\ntypedef enum {\n#if TARGET_OS_OSX || TARGET_OS_MACCATALYST\n\tkOSThermalPressureLevelNominal = 0,\n\tkOSThermalPressureLevelModerate,\n\tkOSThermalPressureLevelHeavy,\n\tkOSThermalPressureLevelTrapping,\n\tkOSThermalPressureLevelSleeping\n#else\n\tkOSThermalPressureLevelNominal = 0,\n\tkOSThermalPressureLevelLight = 10,\n\tkOSThermalPressureLevelModerate = 20,\n\tkOSThermalPressureLevelHeavy = 30,\n\tkOSThermalPressureLevelTrapping = 40,\n\tkOSThermalPressureLevelSleeping = 50\n#endif\n} OSThermalPressureLevel;\n\n/*\n ** External notify(3) string for thermal pressure level notification\n */\n__OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0)\nextern const char * const kOSThermalNotificationPressureLevelName;\n\n\n#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && \\\n\t__IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_2_0\n\ntypedef enum {\n\tOSThermalNotificationLevelAny      = -1,\n\tOSThermalNotificationLevelNormal   =  0,\n} OSThermalNotificationLevel;\n\nextern OSThermalNotificationLevel _OSThermalNotificationLevelForBehavior(int) __OSX_AVAILABLE_STARTING(__MAC_NA, __IPHONE_4_2);\nextern void _OSThermalNotificationSetLevelForBehavior(int, int) __OSX_AVAILABLE_STARTING(__MAC_NA, __IPHONE_4_2);\n\nenum {\n\tkOSThermalMitigationNone,\n\tkOSThermalMitigation70PercentTorch,\n\tkOSThermalMitigation70PercentBacklight,\n\tkOSThermalMitigation50PercentTorch,\n\tkOSThermalMitigation50PercentBacklight,\n\tkOSThermalMitigationDisableTorch,\n\tkOSThermalMitigation25PercentBacklight,\n\tkOSThermalMitigationDisableMapsHalo,\n\tkOSThermalMitigationAppTerminate,\n\tkOSThermalMitigationDeviceRestart,\n\tkOSThermalMitigationThermalTableReady,\n\tkOSThermalMitigationCount\n};\n\n#define OSThermalNotificationLevel70PercentTorch _OSThermalNotificationLevelForBehavior(kOSThermalMitigation70PercentTorch)\n#define OSThermalNotificationLevel70PercentBacklight _OSThermalNotificationLevelForBehavior(kOSThermalMitigation70PercentBacklight)\n#define OSThermalNotificationLevel50PercentTorch _OSThermalNotificationLevelForBehavior(kOSThermalMitigation50PercentTorch)\n#define OSThermalNotificationLevel50PercentBacklight _OSThermalNotificationLevelForBehavior(kOSThermalMitigation50PercentBacklight)\n#define OSThermalNotificationLevelDisableTorch _OSThermalNotificationLevelForBehavior(kOSThermalMitigationDisableTorch)\n#define OSThermalNotificationLevel25PercentBacklight _OSThermalNotificationLevelForBehavior(kOSThermalMitigation25PercentBacklight)\n#define OSThermalNotificationLevelDisableMapsHalo _OSThermalNotificationLevelForBehavior(kOSThermalMitigationDisableMapsHalo)\n#define OSThermalNotificationLevelAppTerminate _OSThermalNotificationLevelForBehavior(kOSThermalMitigationAppTerminate)\n#define OSThermalNotificationLevelDeviceRestart _OSThermalNotificationLevelForBehavior(kOSThermalMitigationDeviceRestart)\n\n/* Backwards compatibility */\n#define OSThermalNotificationLevelWarning OSThermalNotificationLevel70PercentBacklight\n#define OSThermalNotificationLevelUrgent OSThermalNotificationLevelAppTerminate\n#define OSThermalNotificationLevelCritical OSThermalNotificationLevelDeviceRestart\n\n/*\n** Simple polling interface to detect current thermal level\n*/\n__OSX_AVAILABLE_STARTING(__MAC_NA, __IPHONE_2_0)\nextern OSThermalNotificationLevel OSThermalNotificationCurrentLevel(void);\n\n/*\n** External notify(3) string for manual notification setup\n*/\n__OSX_AVAILABLE_STARTING(__MAC_NA, __IPHONE_2_0)\nextern const char * const kOSThermalNotificationName;\n\n/*\n** External notify(3) string for alerting user of a thermal condition\n*/\n__OSX_AVAILABLE_STARTING(__MAC_NA, __IPHONE_6_0)\nextern const char * const kOSThermalNotificationAlert;\n\n/*\n** External notify(3) string for notifying system the options taken to resolve thermal condition\n*/\n__OSX_AVAILABLE_STARTING(__MAC_NA, __IPHONE_6_0)\nextern const char * const kOSThermalNotificationDecision;\n\n#endif // __IPHONE_OS_VERSION_MIN_REQUIRED\n\n__END_DECLS\n\n#endif /* _OSTHERMALNOTIFICATION_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/libkern/OSTypes.h",
    "content": "/*\n * Copyright (c) 1999-2012 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n\n#include <MacTypes.h>\n\n#ifndef _OS_OSTYPES_H\n#define _OS_OSTYPES_H\n\n#define OSTYPES_K64_REV         2\n\ntypedef unsigned int       UInt;\ntypedef signed int         SInt;\n\n\n#include <sys/_types/_os_inline.h>\n\n#endif /* _OS_OSTYPES_H */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/libkern/_OSByteOrder.h",
    "content": "/*\n * Copyright (c) 2006 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n\n#ifndef _OS__OSBYTEORDER_H\n#define _OS__OSBYTEORDER_H\n\n/*\n * This header is normally included from <libkern/OSByteOrder.h>.  However,\n * <sys/_endian.h> also includes this in the case of little-endian\n * architectures, so that we can map OSByteOrder routines to the hton* and ntoh*\n * macros.  This results in the asymmetry below; we only include\n * <libkern/arch/_OSByteOrder.h> for little-endian architectures.\n */\n\n#include <sys/_types.h>\n\n/* Macros for swapping constant values in the preprocessing stage. */\n#define __DARWIN_OSSwapConstInt16(x) \\\n    ((__uint16_t)((((__uint16_t)(x) & 0xff00U) >> 8) | \\\n\t        (((__uint16_t)(x) & 0x00ffU) << 8)))\n\n#define __DARWIN_OSSwapConstInt32(x) \\\n    ((__uint32_t)((((__uint32_t)(x) & 0xff000000U) >> 24) | \\\n\t        (((__uint32_t)(x) & 0x00ff0000U) >>  8) | \\\n\t        (((__uint32_t)(x) & 0x0000ff00U) <<  8) | \\\n\t        (((__uint32_t)(x) & 0x000000ffU) << 24)))\n\n#define __DARWIN_OSSwapConstInt64(x) \\\n    ((__uint64_t)((((__uint64_t)(x) & 0xff00000000000000ULL) >> 56) | \\\n\t        (((__uint64_t)(x) & 0x00ff000000000000ULL) >> 40) | \\\n\t        (((__uint64_t)(x) & 0x0000ff0000000000ULL) >> 24) | \\\n\t        (((__uint64_t)(x) & 0x000000ff00000000ULL) >>  8) | \\\n\t        (((__uint64_t)(x) & 0x00000000ff000000ULL) <<  8) | \\\n\t        (((__uint64_t)(x) & 0x0000000000ff0000ULL) << 24) | \\\n\t        (((__uint64_t)(x) & 0x000000000000ff00ULL) << 40) | \\\n\t        (((__uint64_t)(x) & 0x00000000000000ffULL) << 56)))\n\n#if defined(__GNUC__)\n\n#if !defined(__DARWIN_OS_INLINE)\n# if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L\n#        define __DARWIN_OS_INLINE static inline\n# elif defined(__MWERKS__) || defined(__cplusplus)\n#        define __DARWIN_OS_INLINE static inline\n# else\n#        define __DARWIN_OS_INLINE static __inline__\n# endif\n#endif\n\n#if defined(__i386__) || defined(__x86_64__)\n#include <libkern/i386/_OSByteOrder.h>\n#endif\n\n#if defined (__arm__) || defined(__arm64__)\n#include <libkern/arm/OSByteOrder.h>\n#endif\n\n\n#define __DARWIN_OSSwapInt16(x) \\\n    ((__uint16_t)(__builtin_constant_p(x) ? __DARWIN_OSSwapConstInt16(x) : _OSSwapInt16(x)))\n\n#define __DARWIN_OSSwapInt32(x) \\\n    (__builtin_constant_p(x) ? __DARWIN_OSSwapConstInt32(x) : _OSSwapInt32(x))\n\n#define __DARWIN_OSSwapInt64(x) \\\n    (__builtin_constant_p(x) ? __DARWIN_OSSwapConstInt64(x) : _OSSwapInt64(x))\n\n#else /* ! __GNUC__ */\n\n#if defined(__i386__) || defined(__x86_64__)\n\n__DARWIN_OS_INLINE\nuint16_t\n_OSSwapInt16(\n\tuint16_t                    data\n\t)\n{\n\treturn __DARWIN_OSSwapConstInt16(data);\n}\n\n__DARWIN_OS_INLINE\nuint32_t\n_OSSwapInt32(\n\tuint32_t                    data\n\t)\n{\n\treturn __DARWIN_OSSwapConstInt32(data);\n}\n\n__DARWIN_OS_INLINE\nuint64_t\n_OSSwapInt64(\n\tuint64_t                    data\n\t)\n{\n\treturn __DARWIN_OSSwapConstInt64(data);\n}\n#endif\n\n#define __DARWIN_OSSwapInt16(x) _OSSwapInt16(x)\n\n#define __DARWIN_OSSwapInt32(x) _OSSwapInt32(x)\n\n#define __DARWIN_OSSwapInt64(x) _OSSwapInt64(x)\n\n#endif /* __GNUC__ */\n\n#endif /* ! _OS__OSBYTEORDER_H */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/libkern/arm/OSByteOrder.h",
    "content": "/*\n * Copyright (c) 1999-2007 Apple Inc. All rights reserved.\n */\n\n#ifndef _OS_OSBYTEORDERARM_H\n#define _OS_OSBYTEORDERARM_H\n\n#include <stdint.h>\n#include <arm/arch.h> /* for _ARM_ARCH_6 */\n\n/* Generic byte swapping functions. */\n\n__DARWIN_OS_INLINE\nuint16_t\n_OSSwapInt16(\n\tuint16_t        _data\n\t)\n{\n\t/* Reduces to 'rev16' with clang */\n\treturn (uint16_t)(_data << 8 | _data >> 8);\n}\n\n__DARWIN_OS_INLINE\nuint32_t\n_OSSwapInt32(\n\tuint32_t        _data\n\t)\n{\n#if defined(__llvm__)\n\t_data = __builtin_bswap32(_data);\n#else\n\t/* This actually generates the best code */\n\t_data = (((_data ^ (_data >> 16 | (_data << 16))) & 0xFF00FFFF) >> 8) ^ (_data >> 8 | _data << 24);\n#endif\n\n\treturn _data;\n}\n\n__DARWIN_OS_INLINE\nuint64_t\n_OSSwapInt64(\n\tuint64_t        _data\n\t)\n{\n#if defined(__llvm__)\n\treturn __builtin_bswap64(_data);\n#else\n\tunion {\n\t\tuint64_t _ull;\n\t\tuint32_t _ul[2];\n\t} _u;\n\n\t/* This actually generates the best code */\n\t_u._ul[0] = (uint32_t)(_data >> 32);\n\t_u._ul[1] = (uint32_t)(_data & 0xffffffff);\n\t_u._ul[0] = _OSSwapInt32(_u._ul[0]);\n\t_u._ul[1] = _OSSwapInt32(_u._ul[1]);\n\treturn _u._ull;\n#endif\n}\n\n/* Functions for byte reversed loads. */\n\nstruct _OSUnalignedU16 {\n\tvolatile uint16_t __val;\n} __attribute__((__packed__));\n\nstruct _OSUnalignedU32 {\n\tvolatile uint32_t __val;\n} __attribute__((__packed__));\n\nstruct _OSUnalignedU64 {\n\tvolatile uint64_t __val;\n} __attribute__((__packed__));\n\n#if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE)\n__DARWIN_OS_INLINE\nuint16_t\n_OSReadSwapInt16(\n\tconst volatile void   * _base,\n\tuintptr_t       _offset\n\t)\n{\n\treturn _OSSwapInt16(((struct _OSUnalignedU16 *)((uintptr_t)_base + _offset))->__val);\n}\n#else\n__DARWIN_OS_INLINE\nuint16_t\nOSReadSwapInt16(\n\tconst volatile void   * _base,\n\tuintptr_t       _offset\n\t)\n{\n\treturn _OSSwapInt16(((struct _OSUnalignedU16 *)((uintptr_t)_base + _offset))->__val);\n}\n#endif\n\n#if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE)\n__DARWIN_OS_INLINE\nuint32_t\n_OSReadSwapInt32(\n\tconst volatile void   * _base,\n\tuintptr_t       _offset\n\t)\n{\n\treturn _OSSwapInt32(((struct _OSUnalignedU32 *)((uintptr_t)_base + _offset))->__val);\n}\n#else\n__DARWIN_OS_INLINE\nuint32_t\nOSReadSwapInt32(\n\tconst volatile void   * _base,\n\tuintptr_t       _offset\n\t)\n{\n\treturn _OSSwapInt32(((struct _OSUnalignedU32 *)((uintptr_t)_base + _offset))->__val);\n}\n#endif\n\n#if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE)\n__DARWIN_OS_INLINE\nuint64_t\n_OSReadSwapInt64(\n\tconst volatile void   * _base,\n\tuintptr_t       _offset\n\t)\n{\n\treturn _OSSwapInt64(((struct _OSUnalignedU64 *)((uintptr_t)_base + _offset))->__val);\n}\n#else\n__DARWIN_OS_INLINE\nuint64_t\nOSReadSwapInt64(\n\tconst volatile void   * _base,\n\tuintptr_t       _offset\n\t)\n{\n\treturn _OSSwapInt64(((struct _OSUnalignedU64 *)((uintptr_t)_base + _offset))->__val);\n}\n#endif\n\n/* Functions for byte reversed stores. */\n\n#if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE)\n__DARWIN_OS_INLINE\nvoid\n_OSWriteSwapInt16(\n\tvolatile void   * _base,\n\tuintptr_t       _offset,\n\tuint16_t        _data\n\t)\n{\n\t((struct _OSUnalignedU16 *)((uintptr_t)_base + _offset))->__val = _OSSwapInt16(_data);\n}\n#else\n__DARWIN_OS_INLINE\nvoid\nOSWriteSwapInt16(\n\tvolatile void   * _base,\n\tuintptr_t       _offset,\n\tuint16_t        _data\n\t)\n{\n\t((struct _OSUnalignedU16 *)((uintptr_t)_base + _offset))->__val = _OSSwapInt16(_data);\n}\n#endif\n\n#if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE)\n__DARWIN_OS_INLINE\nvoid\n_OSWriteSwapInt32(\n\tvolatile void   * _base,\n\tuintptr_t       _offset,\n\tuint32_t        _data\n\t)\n{\n\t((struct _OSUnalignedU32 *)((uintptr_t)_base + _offset))->__val = _OSSwapInt32(_data);\n}\n#else\n__DARWIN_OS_INLINE\nvoid\nOSWriteSwapInt32(\n\tvolatile void   * _base,\n\tuintptr_t       _offset,\n\tuint32_t        _data\n\t)\n{\n\t((struct _OSUnalignedU32 *)((uintptr_t)_base + _offset))->__val = _OSSwapInt32(_data);\n}\n#endif\n\n#if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE)\n__DARWIN_OS_INLINE\nvoid\n_OSWriteSwapInt64(\n\tvolatile void    * _base,\n\tuintptr_t        _offset,\n\tuint64_t         _data\n\t)\n{\n\t((struct _OSUnalignedU64 *)((uintptr_t)_base + _offset))->__val = _OSSwapInt64(_data);\n}\n#else\n__DARWIN_OS_INLINE\nvoid\nOSWriteSwapInt64(\n\tvolatile void    * _base,\n\tuintptr_t        _offset,\n\tuint64_t         _data\n\t)\n{\n\t((struct _OSUnalignedU64 *)((uintptr_t)_base + _offset))->__val = _OSSwapInt64(_data);\n}\n#endif\n\n#endif /* ! _OS_OSBYTEORDERARM_H */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/libkern/i386/OSByteOrder.h",
    "content": "/*\n * Copyright (c) 1999-2006 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n\n#ifndef _OS_OSBYTEORDERI386_H\n#define _OS_OSBYTEORDERI386_H\n\n#include <stdint.h>\n#include <libkern/i386/_OSByteOrder.h>\n#include <sys/_types/_os_inline.h>\n\n/* Functions for byte reversed loads. */\n\nOS_INLINE\nuint16_t\nOSReadSwapInt16(\n\tconst volatile void   * base,\n\tuintptr_t       byteOffset\n\t)\n{\n\tuint16_t result;\n\n\tresult = *(volatile uint16_t *)((uintptr_t)base + byteOffset);\n\treturn _OSSwapInt16(result);\n}\n\nOS_INLINE\nuint32_t\nOSReadSwapInt32(\n\tconst volatile void   * base,\n\tuintptr_t       byteOffset\n\t)\n{\n\tuint32_t result;\n\n\tresult = *(volatile uint32_t *)((uintptr_t)base + byteOffset);\n\treturn _OSSwapInt32(result);\n}\n\nOS_INLINE\nuint64_t\nOSReadSwapInt64(\n\tconst volatile void   * base,\n\tuintptr_t       byteOffset\n\t)\n{\n\tuint64_t result;\n\n\tresult = *(volatile uint64_t *)((uintptr_t)base + byteOffset);\n\treturn _OSSwapInt64(result);\n}\n\n/* Functions for byte reversed stores. */\n\nOS_INLINE\nvoid\nOSWriteSwapInt16(\n\tvolatile void   * base,\n\tuintptr_t       byteOffset,\n\tuint16_t        data\n\t)\n{\n\t*(volatile uint16_t *)((uintptr_t)base + byteOffset) = _OSSwapInt16(data);\n}\n\nOS_INLINE\nvoid\nOSWriteSwapInt32(\n\tvolatile void   * base,\n\tuintptr_t       byteOffset,\n\tuint32_t        data\n\t)\n{\n\t*(volatile uint32_t *)((uintptr_t)base + byteOffset) = _OSSwapInt32(data);\n}\n\nOS_INLINE\nvoid\nOSWriteSwapInt64(\n\tvolatile void    * base,\n\tuintptr_t        byteOffset,\n\tuint64_t         data\n\t)\n{\n\t*(volatile uint64_t *)((uintptr_t)base + byteOffset) = _OSSwapInt64(data);\n}\n\n#endif /* ! _OS_OSBYTEORDERI386_H */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/libkern/i386/_OSByteOrder.h",
    "content": "/*\n * Copyright (c) 2006-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n\n#ifndef _OS__OSBYTEORDERI386_H\n#define _OS__OSBYTEORDERI386_H\n\n#if !defined(__DARWIN_OS_INLINE)\n# if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L\n#        define __DARWIN_OS_INLINE static inline\n# elif defined(__MWERKS__) || defined(__cplusplus)\n#        define __DARWIN_OS_INLINE static inline\n# else\n#        define __DARWIN_OS_INLINE static __inline__\n# endif\n#endif\n\n/* Generic byte swapping functions. */\n\n__DARWIN_OS_INLINE\n__uint16_t\n_OSSwapInt16(\n\t__uint16_t        _data\n\t)\n{\n\treturn (__uint16_t)((_data << 8) | (_data >> 8));\n}\n\n__DARWIN_OS_INLINE\n__uint32_t\n_OSSwapInt32(\n\t__uint32_t        _data\n\t)\n{\n#if defined(__llvm__)\n\treturn __builtin_bswap32(_data);\n#else\n\t__asm__ (\"bswap   %0\" : \"+r\" (_data));\n\treturn _data;\n#endif\n}\n\n#if defined(__llvm__)\n__DARWIN_OS_INLINE\n__uint64_t\n_OSSwapInt64(\n\t__uint64_t        _data\n\t)\n{\n\treturn __builtin_bswap64(_data);\n}\n\n#elif defined(__i386__)\n__DARWIN_OS_INLINE\n__uint64_t\n_OSSwapInt64(\n\t__uint64_t        _data\n\t)\n{\n\t__asm__ (\"bswap   %%eax\\n\\t\"\n                 \"bswap   %%edx\\n\\t\"\n                 \"xchgl   %%eax, %%edx\"\n                 : \"+A\" (_data));\n\treturn _data;\n}\n#elif defined(__x86_64__)\n__DARWIN_OS_INLINE\n__uint64_t\n_OSSwapInt64(\n\t__uint64_t        _data\n\t)\n{\n\t__asm__ (\"bswap   %0\" : \"+r\" (_data));\n\treturn _data;\n}\n#else\n#error Unknown architecture\n#endif\n\n#endif /* ! _OS__OSBYTEORDERI386_H */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/libkern/machine/OSByteOrder.h",
    "content": "/*\n * Copyright (c) 2000-2005 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n\n#ifndef _OS_OSBYTEORDERMACHINE_H\n#define _OS_OSBYTEORDERMACHINE_H\n\n#include <stdint.h>\n\n#if !defined(OS_INLINE)\n# if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L\n#        define OS_INLINE static inline\n# elif defined(__MWERKS__) || defined(__cplusplus)\n#        define OS_INLINE static inline\n# else\n#        define OS_INLINE static __inline__\n# endif\n#endif\n\n/* Generic byte swapping functions. */\n\nOS_INLINE\nuint16_t\n_OSSwapInt16(\n\tuint16_t                      data\n\t)\n{\n\treturn OSSwapConstInt16(data);\n}\n\nOS_INLINE\nuint32_t\n_OSSwapInt32(\n\tuint32_t                      data\n\t)\n{\n\treturn OSSwapConstInt32(data);\n}\n\nOS_INLINE\nuint64_t\n_OSSwapInt64(\n\tuint64_t                        data\n\t)\n{\n\treturn OSSwapConstInt64(data);\n}\n\n/* Functions for byte reversed loads. */\n\nOS_INLINE\nuint16_t\nOSReadSwapInt16(\n\tconst volatile void               * base,\n\tuintptr_t                     byteOffset\n\t)\n{\n\tuint16_t data = *(volatile uint16_t *)((uintptr_t)base + byteOffset);\n\treturn _OSSwapInt16(data);\n}\n\nOS_INLINE\nuint32_t\nOSReadSwapInt32(\n\tconst volatile void               * base,\n\tuintptr_t                     byteOffset\n\t)\n{\n\tuint32_t data = *(volatile uint32_t *)((uintptr_t)base + byteOffset);\n\treturn _OSSwapInt32(data);\n}\n\nOS_INLINE\nuint64_t\nOSReadSwapInt64(\n\tconst volatile void               * base,\n\tuintptr_t                     byteOffset\n\t)\n{\n\tuint64_t data = *(volatile uint64_t *)((uintptr_t)base + byteOffset);\n\treturn _OSSwapInt64(data);\n}\n\n/* Functions for byte reversed stores. */\n\nOS_INLINE\nvoid\nOSWriteSwapInt16(\n\tvolatile void               * base,\n\tuintptr_t                     byteOffset,\n\tuint16_t                      data\n\t)\n{\n\t*(volatile uint16_t *)((uintptr_t)base + byteOffset) = _OSSwapInt16(data);\n}\n\nOS_INLINE\nvoid\nOSWriteSwapInt32(\n\tvolatile void               * base,\n\tuintptr_t                     byteOffset,\n\tuint32_t                      data\n\t)\n{\n\t*(volatile uint32_t *)((uintptr_t)base + byteOffset) = _OSSwapInt32(data);\n}\n\nOS_INLINE\nvoid\nOSWriteSwapInt64(\n\tvolatile void               * base,\n\tuintptr_t                     byteOffset,\n\tuint64_t                      data\n\t)\n{\n\t*(volatile uint64_t *)((uintptr_t)base + byteOffset) = _OSSwapInt64(data);\n}\n\n#endif /* ! _OS_OSBYTEORDERMACHINE_H */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/mach-o/arch.h",
    "content": "/*\n * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_LICENSE_HEADER_START@\n * \n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this\n * file.\n * \n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n * \n * @APPLE_LICENSE_HEADER_END@\n */\n#ifndef _MACH_O_ARCH_H_\n#define _MACH_O_ARCH_H_\n/*\n * Copyright (c) 1997 Apple Computer, Inc.\n *\n * Functions that deal with information about architectures.\n *\n */\n\n#include <stdint.h>\n#include <mach/machine.h>\n#include <architecture/byte_order.h>\n\n/* The NXArchInfo structs contain the architectures symbolic name\n * (such as \"ppc\"), its CPU type and CPU subtype as defined in\n * mach/machine.h, the byte order for the architecture, and a\n * describing string (such as \"PowerPC\").\n * There will both be entries for specific CPUs (such as ppc604e) as\n * well as generic \"family\" entries (such as ppc).\n */\ntypedef struct {\n    const char *name;\n    cpu_type_t cputype;\n    cpu_subtype_t cpusubtype;\n    enum NXByteOrder byteorder;\n    const char *description;\n} NXArchInfo;\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif /* __cplusplus */\n\n/* NXGetAllArchInfos() returns a pointer to an array of all known\n * NXArchInfo structures.  The last NXArchInfo is marked by a NULL name.\n */\nextern const NXArchInfo *NXGetAllArchInfos(void);\n\n/* NXGetLocalArchInfo() returns the NXArchInfo for the local host, or NULL\n * if none is known. \n */\nextern const NXArchInfo *NXGetLocalArchInfo(void);\n\n/* NXGetArchInfoFromName() and NXGetArchInfoFromCpuType() return the\n * NXArchInfo from the architecture's name or cputype/cpusubtype\n * combination.  A cpusubtype of CPU_SUBTYPE_MULTIPLE can be used\n * to request the most general NXArchInfo known for the given cputype.\n * NULL is returned if no matching NXArchInfo can be found.\n */\nextern const NXArchInfo *NXGetArchInfoFromName(const char *name);\nextern const NXArchInfo *NXGetArchInfoFromCpuType(cpu_type_t cputype,\n\t\t\t\t\t\t  cpu_subtype_t cpusubtype);\n\n/* The above interfaces that return pointers to NXArchInfo structs in normal\n * cases returns a pointer from the array returned in NXGetAllArchInfos().\n * In some cases when the cputype is CPU_TYPE_I386 or CPU_TYPE_POWERPC it will\n * retun malloc(3)'ed NXArchInfo struct which contains a string in the\n * description field also a malloc(3)'ed pointer.  To allow programs not to\n * leak memory they can call NXFreeArchInfo() on pointers returned from the\n * above interfaces.  Since this is a new API on older systems can use the\n * code below.  Going forward the above interfaces will only return pointers\n * from the array returned in NXGetAllArchInfos().\n */\nextern void NXFreeArchInfo(const NXArchInfo *x);\n\n/* The code that can be used for NXFreeArchInfo() when it is not available is:\n *\n *\tstatic void NXFreeArchInfo(\n *\tconst NXArchInfo *x)\n *\t{\n *\t    const NXArchInfo *p;\n *\t\n *\t        p = NXGetAllArchInfos();\n *\t        while(p->name != NULL){\n *\t            if(x == p)\n *\t                return;\n *\t            p++;\n *\t        }\n *\t        free((char *)x->description);\n *\t        free((NXArchInfo *)x);\n *\t}\n */\n\n/* NXFindBestFatArch() is passed a cputype and cpusubtype and a set of\n * fat_arch structs and selects the best one that matches (if any) and returns\n * a pointer to that fat_arch struct (or NULL).  The fat_arch structs must be\n * in the host byte order and correct such that the fat_archs really points to\n * enough memory for nfat_arch structs.  It is possible that this routine could\n * fail if new cputypes or cpusubtypes are added and an old version of this\n * routine is used.  But if there is an exact match between the cputype and\n * cpusubtype and one of the fat_arch structs this routine will always succeed.\n */\nextern struct fat_arch *NXFindBestFatArch(cpu_type_t cputype,\n\t\t\t\t\t  cpu_subtype_t cpusubtype,\n\t\t\t\t\t  struct fat_arch *fat_archs,\n\t\t\t\t\t  uint32_t nfat_archs);\n\n/* NXFindBestFatArch_64() is passed a cputype and cpusubtype and a set of\n * fat_arch_64 structs and selects the best one that matches (if any) and\n * returns a pointer to that fat_arch_64 struct (or NULL).  The fat_arch_64\n * structs must be in the host byte order and correct such that the fat_archs64\n * really points to enough memory for nfat_arch structs.  It is possible that\n * this routine could fail if new cputypes or cpusubtypes are added and an old\n * version of this routine is used.  But if there is an exact match between the\n * cputype and cpusubtype and one of the fat_arch_64 structs this routine will\n * always succeed.\n */\nextern struct fat_arch_64 *NXFindBestFatArch_64(cpu_type_t cputype,\n\t\t\t\t\t        cpu_subtype_t cpusubtype,\n\t\t\t\t\t        struct fat_arch_64 *fat_archs64,\n\t\t\t\t\t        uint32_t nfat_archs);\n\n/* NXCombineCpuSubtypes() returns the resulting cpusubtype when combining two\n * different cpusubtypes for the specified cputype.  If the two cpusubtypes\n * can't be combined (the specific subtypes are mutually exclusive) -1 is\n * returned indicating it is an error to combine them.  This can also fail and\n * return -1 if new cputypes or cpusubtypes are added and an old version of\n * this routine is used.  But if the cpusubtypes are the same they can always\n * be combined and this routine will return the cpusubtype pass in.\n */\nextern cpu_subtype_t NXCombineCpuSubtypes(cpu_type_t cputype,\n\t\t\t\t\t  cpu_subtype_t cpusubtype1,\n\t\t\t\t\t  cpu_subtype_t cpusubtype2);\n\n#ifdef __cplusplus\n}\n#endif /* __cplusplus */\n\n#endif /* _MACH_O_ARCH_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/mach-o/arm/reloc.h",
    "content": "/*\n * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_LICENSE_HEADER_START@\n * \n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this\n * file.\n * \n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n * \n * @APPLE_LICENSE_HEADER_END@\n */\n/*\n * Relocation types used in the arm implementation.  Relocation entries for\n * things other than instructions use the same generic relocation as discribed\n * in <mach-o/reloc.h> and their r_type is ARM_RELOC_VANILLA, one of the\n * *_SECTDIFF or the *_PB_LA_PTR types.  The rest of the relocation types are\n * for instructions.  Since they are for instructions the r_address field\n * indicates the 32 bit instruction that the relocation is to be preformed on.\n */\nenum reloc_type_arm\n{\n    ARM_RELOC_VANILLA,\t/* generic relocation as discribed above */\n    ARM_RELOC_PAIR,\t/* the second relocation entry of a pair */\n    ARM_RELOC_SECTDIFF,\t/* a PAIR follows with subtract symbol value */\n    ARM_RELOC_LOCAL_SECTDIFF, /* like ARM_RELOC_SECTDIFF, but the symbol\n\t\t\t\t referenced was local.  */\n    ARM_RELOC_PB_LA_PTR,/* prebound lazy pointer */\n    ARM_RELOC_BR24,\t/* 24 bit branch displacement (to a word address) */\n    ARM_THUMB_RELOC_BR22, /* 22 bit branch displacement (to a half-word\n\t\t\t     address) */\n    ARM_THUMB_32BIT_BRANCH, /* obsolete - a thumb 32-bit branch instruction\n\t\t\t     possibly needing page-spanning branch workaround */\n\n    /*\n     * For these two r_type relocations they always have a pair following them\n     * and the r_length bits are used differently.  The encoding of the\n     * r_length is as follows:\n     * low bit of r_length:\n     *  0 - :lower16: for movw instructions\n     *  1 - :upper16: for movt instructions\n     * high bit of r_length:\n     *  0 - arm instructions\n     *  1 - thumb instructions   \n     * the other half of the relocated expression is in the following pair\n     * relocation entry in the the low 16 bits of r_address field.\n     */\n    ARM_RELOC_HALF,\n    ARM_RELOC_HALF_SECTDIFF\n};\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/mach-o/arm64/reloc.h",
    "content": "/*\n * Copyright (c) 2010 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_LICENSE_HEADER_START@\n * \n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this\n * file.\n * \n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n * \n * @APPLE_LICENSE_HEADER_END@\n */\n\n#ifndef _MACHO_ARM64_RELOC_H_\n#define _MACHO_ARM64_RELOC_H_\n\n/*\n * Relocation types used in the arm64 implementation.\n */\nenum reloc_type_arm64\n{\n    ARM64_RELOC_UNSIGNED,\t  // for pointers\n    ARM64_RELOC_SUBTRACTOR,       // must be followed by a ARM64_RELOC_UNSIGNED\n    ARM64_RELOC_BRANCH26,         // a B/BL instruction with 26-bit displacement\n    ARM64_RELOC_PAGE21,           // pc-rel distance to page of target\n    ARM64_RELOC_PAGEOFF12,        // offset within page, scaled by r_length\n    ARM64_RELOC_GOT_LOAD_PAGE21,  // pc-rel distance to page of GOT slot\n    ARM64_RELOC_GOT_LOAD_PAGEOFF12, // offset within page of GOT slot,\n                                    //  scaled by r_length\n    ARM64_RELOC_POINTER_TO_GOT,   // for pointers to GOT slots\n    ARM64_RELOC_TLVP_LOAD_PAGE21, // pc-rel distance to page of TLVP slot\n    ARM64_RELOC_TLVP_LOAD_PAGEOFF12, // offset within page of TLVP slot,\n                                     //  scaled by r_length\n    ARM64_RELOC_ADDEND,\t\t  // must be followed by PAGE21 or PAGEOFF12\n\n    // An arm64e authenticated pointer.\n    //\n    // Represents a pointer to a symbol (like ARM64_RELOC_UNSIGNED).\n    // Additionally, the resulting pointer is signed.  The signature is\n    // specified in the target location: the addend is restricted to the lower\n    // 32 bits (instead of the full 64 bits for ARM64_RELOC_UNSIGNED):\n    //\n    //   |63|62|61-51|50-49|  48  |47     -     32|31  -  0|\n    //   | 1| 0|  0  | key | addr | discriminator | addend |\n    //\n    // The key is one of:\n    //   IA: 00 IB: 01\n    //   DA: 10 DB: 11\n    //\n    // The discriminator field is used as extra signature diversification.\n    //\n    // The addr field indicates whether the target address should be blended\n    // into the discriminator.\n    //\n    ARM64_RELOC_AUTHENTICATED_POINTER,\n};\n\n#endif /* #ifndef _MACHO_ARM64_RELOC_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/mach-o/compact_unwind_encoding.h",
    "content": "//===------------------ mach-o/compact_unwind_encoding.h ------------------===//\n//\n// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.\n// See https://llvm.org/LICENSE.txt for license information.\n// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception\n//\n//\n// Darwin's alternative to DWARF based unwind encodings.\n//\n//===----------------------------------------------------------------------===//\n\n\n#ifndef __COMPACT_UNWIND_ENCODING__\n#define __COMPACT_UNWIND_ENCODING__\n\n#include <stdint.h>\n\n//\n// Compilers can emit standard DWARF FDEs in the __TEXT,__eh_frame section\n// of object files. Or compilers can emit compact unwind information in\n// the __LD,__compact_unwind section.\n//\n// When the linker creates a final linked image, it will create a\n// __TEXT,__unwind_info section.  This section is a small and fast way for the\n// runtime to access unwind info for any given function.  If the compiler\n// emitted compact unwind info for the function, that compact unwind info will\n// be encoded in the __TEXT,__unwind_info section. If the compiler emitted\n// DWARF unwind info, the __TEXT,__unwind_info section will contain the offset\n// of the FDE in the __TEXT,__eh_frame section in the final linked image.\n//\n// Note: Previously, the linker would transform some DWARF unwind infos into\n//       compact unwind info.  But that is fragile and no longer done.\n\n\n//\n// The compact unwind endoding is a 32-bit value which encoded in an\n// architecture specific way, which registers to restore from where, and how\n// to unwind out of the function.\n//\ntypedef uint32_t compact_unwind_encoding_t;\n\n\n// architecture independent bits\nenum {\n    UNWIND_IS_NOT_FUNCTION_START           = 0x80000000,\n    UNWIND_HAS_LSDA                        = 0x40000000,\n    UNWIND_PERSONALITY_MASK                = 0x30000000,\n};\n\n\n\n\n//\n// x86\n//\n// 1-bit: start\n// 1-bit: has lsda\n// 2-bit: personality index\n//\n// 4-bits: 0=old, 1=ebp based, 2=stack-imm, 3=stack-ind, 4=DWARF\n//  ebp based:\n//        15-bits (5*3-bits per reg) register permutation\n//        8-bits for stack offset\n//  frameless:\n//        8-bits stack size\n//        3-bits stack adjust\n//        3-bits register count\n//        10-bits register permutation\n//\nenum {\n    UNWIND_X86_MODE_MASK                         = 0x0F000000,\n    UNWIND_X86_MODE_EBP_FRAME                    = 0x01000000,\n    UNWIND_X86_MODE_STACK_IMMD                   = 0x02000000,\n    UNWIND_X86_MODE_STACK_IND                    = 0x03000000,\n    UNWIND_X86_MODE_DWARF                        = 0x04000000,\n\n    UNWIND_X86_EBP_FRAME_REGISTERS               = 0x00007FFF,\n    UNWIND_X86_EBP_FRAME_OFFSET                  = 0x00FF0000,\n\n    UNWIND_X86_FRAMELESS_STACK_SIZE              = 0x00FF0000,\n    UNWIND_X86_FRAMELESS_STACK_ADJUST            = 0x0000E000,\n    UNWIND_X86_FRAMELESS_STACK_REG_COUNT         = 0x00001C00,\n    UNWIND_X86_FRAMELESS_STACK_REG_PERMUTATION   = 0x000003FF,\n\n    UNWIND_X86_DWARF_SECTION_OFFSET              = 0x00FFFFFF,\n};\n\nenum {\n    UNWIND_X86_REG_NONE     = 0,\n    UNWIND_X86_REG_EBX      = 1,\n    UNWIND_X86_REG_ECX      = 2,\n    UNWIND_X86_REG_EDX      = 3,\n    UNWIND_X86_REG_EDI      = 4,\n    UNWIND_X86_REG_ESI      = 5,\n    UNWIND_X86_REG_EBP      = 6,\n};\n\n//\n// For x86 there are four modes for the compact unwind encoding:\n// UNWIND_X86_MODE_EBP_FRAME:\n//    EBP based frame where EBP is push on stack immediately after return address,\n//    then ESP is moved to EBP. Thus, to unwind ESP is restored with the current\n//    EPB value, then EBP is restored by popping off the stack, and the return\n//    is done by popping the stack once more into the pc.\n//    All non-volatile registers that need to be restored must have been saved\n//    in a small range in the stack that starts EBP-4 to EBP-1020.  The offset/4\n//    is encoded in the UNWIND_X86_EBP_FRAME_OFFSET bits.  The registers saved\n//    are encoded in the UNWIND_X86_EBP_FRAME_REGISTERS bits as five 3-bit entries.\n//    Each entry contains which register to restore.\n// UNWIND_X86_MODE_STACK_IMMD:\n//    A \"frameless\" (EBP not used as frame pointer) function with a small \n//    constant stack size.  To return, a constant (encoded in the compact\n//    unwind encoding) is added to the ESP. Then the return is done by\n//    popping the stack into the pc.\n//    All non-volatile registers that need to be restored must have been saved\n//    on the stack immediately after the return address.  The stack_size/4 is\n//    encoded in the UNWIND_X86_FRAMELESS_STACK_SIZE (max stack size is 1024).\n//    The number of registers saved is encoded in UNWIND_X86_FRAMELESS_STACK_REG_COUNT.\n//    UNWIND_X86_FRAMELESS_STACK_REG_PERMUTATION constains which registers were\n//    saved and their order.\n// UNWIND_X86_MODE_STACK_IND:\n//    A \"frameless\" (EBP not used as frame pointer) function large constant \n//    stack size.  This case is like the previous, except the stack size is too\n//    large to encode in the compact unwind encoding.  Instead it requires that \n//    the function contains \"subl $nnnnnnnn,ESP\" in its prolog.  The compact \n//    encoding contains the offset to the nnnnnnnn value in the function in\n//    UNWIND_X86_FRAMELESS_STACK_SIZE.  \n// UNWIND_X86_MODE_DWARF:\n//    No compact unwind encoding is available.  Instead the low 24-bits of the\n//    compact encoding is the offset of the DWARF FDE in the __eh_frame section.\n//    This mode is never used in object files.  It is only generated by the \n//    linker in final linked images which have only DWARF unwind info for a\n//    function.\n//\n// The permutation encoding is a Lehmer code sequence encoded into a\n// single variable-base number so we can encode the ordering of up to\n// six registers in a 10-bit space.\n//\n// The following is the algorithm used to create the permutation encoding used\n// with frameless stacks.  It is passed the number of registers to be saved and\n// an array of the register numbers saved.\n//\n//uint32_t permute_encode(uint32_t registerCount, const uint32_t registers[6])\n//{\n//    uint32_t renumregs[6];\n//    for (int i=6-registerCount; i < 6; ++i) {\n//        int countless = 0;\n//        for (int j=6-registerCount; j < i; ++j) {\n//            if ( registers[j] < registers[i] )\n//                ++countless;\n//        }\n//        renumregs[i] = registers[i] - countless -1;\n//    }\n//    uint32_t permutationEncoding = 0;\n//    switch ( registerCount ) {\n//        case 6:\n//            permutationEncoding |= (120*renumregs[0] + 24*renumregs[1]\n//                                    + 6*renumregs[2] + 2*renumregs[3]\n//                                      + renumregs[4]);\n//            break;\n//        case 5:\n//            permutationEncoding |= (120*renumregs[1] + 24*renumregs[2]\n//                                    + 6*renumregs[3] + 2*renumregs[4]\n//                                      + renumregs[5]);\n//            break;\n//        case 4:\n//            permutationEncoding |= (60*renumregs[2] + 12*renumregs[3]\n//                                   + 3*renumregs[4] + renumregs[5]);\n//            break;\n//        case 3:\n//            permutationEncoding |= (20*renumregs[3] + 4*renumregs[4]\n//                                     + renumregs[5]);\n//            break;\n//        case 2:\n//            permutationEncoding |= (5*renumregs[4] + renumregs[5]);\n//            break;\n//        case 1:\n//            permutationEncoding |= (renumregs[5]);\n//            break;\n//    }\n//    return permutationEncoding;\n//}\n//\n\n\n\n\n//\n// x86_64\n//\n// 1-bit: start\n// 1-bit: has lsda\n// 2-bit: personality index\n//\n// 4-bits: 0=old, 1=rbp based, 2=stack-imm, 3=stack-ind, 4=DWARF\n//  rbp based:\n//        15-bits (5*3-bits per reg) register permutation\n//        8-bits for stack offset\n//  frameless:\n//        8-bits stack size\n//        3-bits stack adjust\n//        3-bits register count\n//        10-bits register permutation\n//\nenum {\n    UNWIND_X86_64_MODE_MASK                         = 0x0F000000,\n    UNWIND_X86_64_MODE_RBP_FRAME                    = 0x01000000,\n    UNWIND_X86_64_MODE_STACK_IMMD                   = 0x02000000,\n    UNWIND_X86_64_MODE_STACK_IND                    = 0x03000000,\n    UNWIND_X86_64_MODE_DWARF                        = 0x04000000,\n\n    UNWIND_X86_64_RBP_FRAME_REGISTERS               = 0x00007FFF,\n    UNWIND_X86_64_RBP_FRAME_OFFSET                  = 0x00FF0000,\n\n    UNWIND_X86_64_FRAMELESS_STACK_SIZE              = 0x00FF0000,\n    UNWIND_X86_64_FRAMELESS_STACK_ADJUST            = 0x0000E000,\n    UNWIND_X86_64_FRAMELESS_STACK_REG_COUNT         = 0x00001C00,\n    UNWIND_X86_64_FRAMELESS_STACK_REG_PERMUTATION   = 0x000003FF,\n\n    UNWIND_X86_64_DWARF_SECTION_OFFSET              = 0x00FFFFFF,\n};\n\nenum {\n    UNWIND_X86_64_REG_NONE       = 0,\n    UNWIND_X86_64_REG_RBX        = 1,\n    UNWIND_X86_64_REG_R12        = 2,\n    UNWIND_X86_64_REG_R13        = 3,\n    UNWIND_X86_64_REG_R14        = 4,\n    UNWIND_X86_64_REG_R15        = 5,\n    UNWIND_X86_64_REG_RBP        = 6,\n};\n//\n// For x86_64 there are four modes for the compact unwind encoding:\n// UNWIND_X86_64_MODE_RBP_FRAME:\n//    RBP based frame where RBP is push on stack immediately after return address,\n//    then RSP is moved to RBP. Thus, to unwind RSP is restored with the current \n//    EPB value, then RBP is restored by popping off the stack, and the return \n//    is done by popping the stack once more into the pc.\n//    All non-volatile registers that need to be restored must have been saved\n//    in a small range in the stack that starts RBP-8 to RBP-2040.  The offset/8 \n//    is encoded in the UNWIND_X86_64_RBP_FRAME_OFFSET bits.  The registers saved\n//    are encoded in the UNWIND_X86_64_RBP_FRAME_REGISTERS bits as five 3-bit entries.\n//    Each entry contains which register to restore.  \n// UNWIND_X86_64_MODE_STACK_IMMD:\n//    A \"frameless\" (RBP not used as frame pointer) function with a small \n//    constant stack size.  To return, a constant (encoded in the compact \n//    unwind encoding) is added to the RSP. Then the return is done by \n//    popping the stack into the pc.\n//    All non-volatile registers that need to be restored must have been saved\n//    on the stack immediately after the return address.  The stack_size/8 is\n//    encoded in the UNWIND_X86_64_FRAMELESS_STACK_SIZE (max stack size is 2048).\n//    The number of registers saved is encoded in UNWIND_X86_64_FRAMELESS_STACK_REG_COUNT.\n//    UNWIND_X86_64_FRAMELESS_STACK_REG_PERMUTATION constains which registers were\n//    saved and their order.  \n// UNWIND_X86_64_MODE_STACK_IND:\n//    A \"frameless\" (RBP not used as frame pointer) function large constant \n//    stack size.  This case is like the previous, except the stack size is too\n//    large to encode in the compact unwind encoding.  Instead it requires that \n//    the function contains \"subq $nnnnnnnn,RSP\" in its prolog.  The compact \n//    encoding contains the offset to the nnnnnnnn value in the function in\n//    UNWIND_X86_64_FRAMELESS_STACK_SIZE.  \n// UNWIND_X86_64_MODE_DWARF:\n//    No compact unwind encoding is available.  Instead the low 24-bits of the\n//    compact encoding is the offset of the DWARF FDE in the __eh_frame section.\n//    This mode is never used in object files.  It is only generated by the \n//    linker in final linked images which have only DWARF unwind info for a\n//    function.\n//\n\n\n// ARM64\n//\n// 1-bit: start\n// 1-bit: has lsda\n// 2-bit: personality index\n//\n// 4-bits: 4=frame-based, 3=DWARF, 2=frameless\n//  frameless:\n//        12-bits of stack size\n//  frame-based:\n//        4-bits D reg pairs saved\n//        5-bits X reg pairs saved\n//  DWARF:\n//        24-bits offset of DWARF FDE in __eh_frame section\n//\nenum {\n    UNWIND_ARM64_MODE_MASK                     = 0x0F000000,\n    UNWIND_ARM64_MODE_FRAMELESS                = 0x02000000,\n    UNWIND_ARM64_MODE_DWARF                    = 0x03000000,\n    UNWIND_ARM64_MODE_FRAME                    = 0x04000000,\n\n    UNWIND_ARM64_FRAME_X19_X20_PAIR            = 0x00000001,\n    UNWIND_ARM64_FRAME_X21_X22_PAIR            = 0x00000002,\n    UNWIND_ARM64_FRAME_X23_X24_PAIR            = 0x00000004,\n    UNWIND_ARM64_FRAME_X25_X26_PAIR            = 0x00000008,\n    UNWIND_ARM64_FRAME_X27_X28_PAIR            = 0x00000010,\n    UNWIND_ARM64_FRAME_D8_D9_PAIR              = 0x00000100,\n    UNWIND_ARM64_FRAME_D10_D11_PAIR            = 0x00000200,\n    UNWIND_ARM64_FRAME_D12_D13_PAIR            = 0x00000400,\n    UNWIND_ARM64_FRAME_D14_D15_PAIR            = 0x00000800,\n\n    UNWIND_ARM64_FRAMELESS_STACK_SIZE_MASK     = 0x00FFF000,\n    UNWIND_ARM64_DWARF_SECTION_OFFSET          = 0x00FFFFFF,\n};\n// For arm64 there are three modes for the compact unwind encoding:\n// UNWIND_ARM64_MODE_FRAME:\n//    This is a standard arm64 prolog where FP/LR are immediately pushed on the\n//    stack, then SP is copied to FP. If there are any non-volatile registers\n//    saved, then are copied into the stack frame in pairs in a contiguous\n//    range right below the saved FP/LR pair.  Any subset of the five X pairs \n//    and four D pairs can be saved, but the memory layout must be in register\n//    number order.  \n// UNWIND_ARM64_MODE_FRAMELESS:\n//    A \"frameless\" leaf function, where FP/LR are not saved. The return address \n//    remains in LR throughout the function. If any non-volatile registers\n//    are saved, they must be pushed onto the stack before any stack space is\n//    allocated for local variables.  The stack sized (including any saved\n//    non-volatile registers) divided by 16 is encoded in the bits \n//    UNWIND_ARM64_FRAMELESS_STACK_SIZE_MASK.\n// UNWIND_ARM64_MODE_DWARF:\n//    No compact unwind encoding is available.  Instead the low 24-bits of the\n//    compact encoding is the offset of the DWARF FDE in the __eh_frame section.\n//    This mode is never used in object files.  It is only generated by the \n//    linker in final linked images which have only DWARF unwind info for a\n//    function.\n//\n\n\n#ifndef __OPEN_SOURCE__\n//\n// armv7k\n//\n// 1-bit: start\n// 1-bit: has lsda\n// 2-bit: personality index\n//\n// 4-bits: 1=frame, 2=frame+dregs, 4=dwarf\n//\nenum {\n  UNWIND_ARM_MODE_MASK                         = 0x0F000000,\n  UNWIND_ARM_MODE_FRAME                        = 0x01000000,\n  UNWIND_ARM_MODE_FRAME_D                      = 0x02000000,\n  UNWIND_ARM_MODE_DWARF                        = 0x04000000,\n\n  UNWIND_ARM_FRAME_STACK_ADJUST_MASK           = 0x00C00000,\n\n  UNWIND_ARM_FRAME_FIRST_PUSH_R4               = 0x00000001,\n  UNWIND_ARM_FRAME_FIRST_PUSH_R5               = 0x00000002,\n  UNWIND_ARM_FRAME_FIRST_PUSH_R6               = 0x00000004,\n\n  UNWIND_ARM_FRAME_SECOND_PUSH_R8              = 0x00000008,\n  UNWIND_ARM_FRAME_SECOND_PUSH_R9              = 0x00000010,\n  UNWIND_ARM_FRAME_SECOND_PUSH_R10             = 0x00000020,\n  UNWIND_ARM_FRAME_SECOND_PUSH_R11             = 0x00000040,\n  UNWIND_ARM_FRAME_SECOND_PUSH_R12             = 0x00000080,\n\n  UNWIND_ARM_FRAME_D_REG_COUNT_MASK            = 0x00000700,\n\n  UNWIND_ARM_DWARF_SECTION_OFFSET              = 0x00FFFFFF,\n};\n// For armv7k there are three modes for the compact unwind encoding:\n// UNWIND_ARM_MODE_FRAME:\n//    This is a standard arm prolog where lr/r7 are immediately pushed on the\n//    stack.  As part of that first push r4, r5, or r6 can be also pushed\n//    and if so the FIRST_PUSH bit is set in the compact unwind. Additionally\n//    there can be a second push multiple which can save r8 through r12.\n//    If that is used, the registers saved is recorded with a SECOND_PUSH bit.\n//    Lastly, for var-args support, the prolog may save r1, r2, r3 to the\n//    stack before the frame push.  If that is done the STACK_ADJUST_MASK\n//    records that the stack pointer must be adjust (e.g 0x00800000 means\n//    the stack pointer was adjusted 8 bytes down and the unwinder would\n//    need to add back 8 bytes to SP when unwinding through this function.\n// UNWIND_ARM_MODE_FRAME_D:\n//    This is the same as UNWIND_ARM_MODE_FRAME, except that additionally\n//    some D registers were saved.  The D_REG_COUNT_MASK contains which\n//    set if D registers were saved and where.  There are currently 8 (0-7)\n//    possible D register save patterns supported.\n// UNWIND_ARM_MODE_DWARF:\n//    No compact unwind encoding is available.  Instead the low 24-bits of the\n//    compact encoding is the offset of the dwarf FDE in the __eh_frame section.\n//    The offset only exists in final linked images. It is zero in object files.\n#endif\n\n\n\n\n\n////////////////////////////////////////////////////////////////////////////////\n//\n//  Relocatable Object Files: __LD,__compact_unwind\n//\n////////////////////////////////////////////////////////////////////////////////\n\n//\n// A compiler can generated compact unwind information for a function by adding\n// a \"row\" to the __LD,__compact_unwind section.  This section has the \n// S_ATTR_DEBUG bit set, so the section will be ignored by older linkers. \n// It is removed by the new linker, so never ends up in final executables. \n// This section is a table, initially with one row per function (that needs \n// unwind info).  The table columns and some conceptual entries are:\n//\n//     range-start               pointer to start of function/range\n//     range-length              \n//     compact-unwind-encoding   32-bit encoding  \n//     personality-function      or zero if no personality function\n//     lsda                      or zero if no LSDA data\n//\n// The length and encoding fields are 32-bits.  The other are all pointer sized. \n//\n// In x86_64 assembly, these entry would look like:\n//\n//     .section __LD,__compact_unwind,regular,debug\n//\n//     #compact unwind for _foo\n//     .quad    _foo\n//     .set     L1,LfooEnd-_foo\n//     .long    L1\n//     .long    0x01010001\n//     .quad    0\n//     .quad    0\n//\n//     #compact unwind for _bar\n//     .quad    _bar\n//     .set     L2,LbarEnd-_bar\n//     .long    L2\n//     .long    0x01020011\n//     .quad    __gxx_personality\n//     .quad    except_tab1\n//\n//\n// Notes: There is no need for any labels in the the __compact_unwind section.  \n//        The use of the .set directive is to force the evaluation of the \n//        range-length at assembly time, instead of generating relocations.\n//\n// To support future compiler optimizations where which non-volatile registers \n// are saved changes within a function (e.g. delay saving non-volatiles until\n// necessary), there can by multiple lines in the __compact_unwind table for one\n// function, each with a different (non-overlapping) range and each with \n// different compact unwind encodings that correspond to the non-volatiles \n// saved at that range of the function.\n//\n// If a particular function is so wacky that there is no compact unwind way\n// to encode it, then the compiler can emit traditional DWARF unwind info.  \n// The runtime will use which ever is available.\n//\n// Runtime support for compact unwind encodings are only available on 10.6 \n// and later.  So, the compiler should not generate it when targeting pre-10.6. \n\n\n\n\n////////////////////////////////////////////////////////////////////////////////\n//\n//  Final Linked Images: __TEXT,__unwind_info\n//\n////////////////////////////////////////////////////////////////////////////////\n\n//\n// The __TEXT,__unwind_info section is laid out for an efficient two level lookup.\n// The header of the section contains a coarse index that maps function address\n// to the page (4096 byte block) containing the unwind info for that function.  \n//\n\n#define UNWIND_SECTION_VERSION 1\nstruct unwind_info_section_header\n{\n    uint32_t    version;            // UNWIND_SECTION_VERSION\n    uint32_t    commonEncodingsArraySectionOffset;\n    uint32_t    commonEncodingsArrayCount;\n    uint32_t    personalityArraySectionOffset;\n    uint32_t    personalityArrayCount;\n    uint32_t    indexSectionOffset;\n    uint32_t    indexCount;\n    // compact_unwind_encoding_t[]\n    // uint32_t personalities[]\n    // unwind_info_section_header_index_entry[]\n    // unwind_info_section_header_lsda_index_entry[]\n};\n\nstruct unwind_info_section_header_index_entry\n{\n    uint32_t        functionOffset;\n    uint32_t        secondLevelPagesSectionOffset;  // section offset to start of regular or compress page\n    uint32_t        lsdaIndexArraySectionOffset;    // section offset to start of lsda_index array for this range\n};\n\nstruct unwind_info_section_header_lsda_index_entry\n{\n    uint32_t        functionOffset;\n    uint32_t        lsdaOffset;\n};\n\n//\n// There are two kinds of second level index pages: regular and compressed.\n// A compressed page can hold up to 1021 entries, but it cannot be used\n// if too many different encoding types are used.  The regular page holds\n// 511 entries.\n//\n\nstruct unwind_info_regular_second_level_entry\n{\n    uint32_t                    functionOffset;\n    compact_unwind_encoding_t    encoding;\n};\n\n#define UNWIND_SECOND_LEVEL_REGULAR 2\nstruct unwind_info_regular_second_level_page_header\n{\n    uint32_t    kind;    // UNWIND_SECOND_LEVEL_REGULAR\n    uint16_t    entryPageOffset;\n    uint16_t    entryCount;\n    // entry array\n};\n\n#define UNWIND_SECOND_LEVEL_COMPRESSED 3\nstruct unwind_info_compressed_second_level_page_header\n{\n    uint32_t    kind;    // UNWIND_SECOND_LEVEL_COMPRESSED\n    uint16_t    entryPageOffset;\n    uint16_t    entryCount;\n    uint16_t    encodingsPageOffset;\n    uint16_t    encodingsCount;\n    // 32-bit entry array\n    // encodings array\n};\n\n#define UNWIND_INFO_COMPRESSED_ENTRY_FUNC_OFFSET(entry)            (entry & 0x00FFFFFF)\n#define UNWIND_INFO_COMPRESSED_ENTRY_ENCODING_INDEX(entry)        ((entry >> 24) & 0xFF)\n\n\n\n#endif\n\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/mach-o/compact_unwind_encoding.modulemap",
    "content": "module MachO.compact_unwind_encoding [system] [extern_c] {\n  header \"compact_unwind_encoding.h\"\n  export *\n}\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/mach-o/dyld.h",
    "content": "/*\n * Copyright (c) 1999-2008 Apple Inc. All rights reserved.\n *\n * @APPLE_LICENSE_HEADER_START@\n * \n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this\n * file.\n * \n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n * \n * @APPLE_LICENSE_HEADER_END@\n */\n#ifndef _MACH_O_DYLD_H_\n#define _MACH_O_DYLD_H_\n\n\n#include <stddef.h>\n#include <stdint.h>\n#include <stdbool.h>\n\n#include <mach-o/loader.h>\n#include <Availability.h>\n\n#if __cplusplus\nextern \"C\" {\n#endif \n\n#ifdef __DRIVERKIT_19_0\n #define DYLD_DRIVERKIT_UNAVAILABLE __API_UNAVAILABLE(driverkit)\n#else\n #define DYLD_DRIVERKIT_UNAVAILABLE\n#endif\n\n/*\n * The following functions allow you to iterate through all loaded images.  \n * This is not a thread safe operation.  Another thread can add or remove\n * an image during the iteration.  \n *\n * Many uses of these routines can be replace by a call to dladdr() which \n * will return the mach_header and name of an image, given an address in \n * the image. dladdr() is thread safe.\n */\nextern uint32_t                    _dyld_image_count(void)                              __OSX_AVAILABLE_STARTING(__MAC_10_1, __IPHONE_2_0);\nextern const struct mach_header*   _dyld_get_image_header(uint32_t image_index)         __OSX_AVAILABLE_STARTING(__MAC_10_1, __IPHONE_2_0);\nextern intptr_t                    _dyld_get_image_vmaddr_slide(uint32_t image_index)   __OSX_AVAILABLE_STARTING(__MAC_10_1, __IPHONE_2_0);\nextern const char*                 _dyld_get_image_name(uint32_t image_index)           __OSX_AVAILABLE_STARTING(__MAC_10_1, __IPHONE_2_0);\n\n\n/*\n * The following functions allow you to install callbacks which will be called   \n * by dyld whenever an image is loaded or unloaded.  During a call to _dyld_register_func_for_add_image()\n * the callback func is called for every existing image.  Later, it is called as each new image\n * is loaded and bound (but initializers not yet run).  The callback registered with\n * _dyld_register_func_for_remove_image() is called after any terminators in an image are run\n * and before the image is un-memory-mapped.\n */\nextern void _dyld_register_func_for_add_image(void (*func)(const struct mach_header* mh, intptr_t vmaddr_slide))    __OSX_AVAILABLE_STARTING(__MAC_10_1, __IPHONE_2_0);\nextern void _dyld_register_func_for_remove_image(void (*func)(const struct mach_header* mh, intptr_t vmaddr_slide)) __OSX_AVAILABLE_STARTING(__MAC_10_1, __IPHONE_2_0);\n\n\n/*\n * NSVersionOfRunTimeLibrary() returns the current_version number of the currently dylib \n * specifed by the libraryName.  The libraryName parameter would be \"bar\" for /path/libbar.3.dylib and\n * \"Foo\" for /path/Foo.framework/Versions/A/Foo.  It returns -1 if no such library is loaded.\n */\nextern int32_t NSVersionOfRunTimeLibrary(const char* libraryName)            __OSX_AVAILABLE_STARTING(__MAC_10_1, __IPHONE_2_0);\n\n\n/*\n * NSVersionOfLinkTimeLibrary() returns the current_version number that the main executable was linked\n * against at build time.  The libraryName parameter would be \"bar\" for /path/libbar.3.dylib and\n * \"Foo\" for /path/Foo.framework/Versions/A/Foo.  It returns -1 if the main executable did not link\n * against the specified library.\n */\nextern int32_t NSVersionOfLinkTimeLibrary(const char* libraryName)           __OSX_AVAILABLE_STARTING(__MAC_10_1, __IPHONE_2_0);\n\n\n/*\n * _NSGetExecutablePath() copies the path of the main executable into the buffer. The bufsize parameter\n * should initially be the size of the buffer.  The function returns 0 if the path was successfully copied,\n * and *bufsize is left unchanged. It returns -1 if the buffer is not large enough, and *bufsize is set \n * to the size required. \n * \n * Note that _NSGetExecutablePath will return \"a path\" to the executable not a \"real path\" to the executable. \n * That is the path may be a symbolic link and not the real file. With deep directories the total bufsize \n * needed could be more than MAXPATHLEN.\n */\nextern int _NSGetExecutablePath(char* buf, uint32_t* bufsize)                 __OSX_AVAILABLE_STARTING(__MAC_10_2, __IPHONE_2_0);\n\n\n\n/*\n * Registers a function to be called when the current thread terminates.\n * Called by c++ compiler to implement destructors on thread_local object variables.\n */\nextern void _tlv_atexit(void (*termFunc)(void* objAddr), void* objAddr)      __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_8_0);\n\n\n/*\n * Never called. On-disk thread local variables contain a pointer to this.  Once\n * the thread local is prepared, the pointer changes to a real handler such as tlv_get_addr.\n */\nextern void _tlv_bootstrap(void)                                             __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_8_0) DYLD_DRIVERKIT_UNAVAILABLE ;\n\n\n/*\n * Dylibs that are incorporated into the dyld cache are removed from disk. That means code\n * cannot stat() the file to see if it \"exists\".  This function is like a stat() call that checks if a\n * path is to a dylib that was removed from disk and is incorporated into the active dyld cache.\n */\nextern bool _dyld_shared_cache_contains_path(const char* path)               __API_AVAILABLE(macos(11.0), ios(14.0), watchos(7.0), tvos(14.0)) DYLD_DRIVERKIT_UNAVAILABLE;\n\n\n/*\n * The following dyld API's are deprecated as of Mac OS X 10.5.  They are either  \n * no longer necessary or are superceeded by dlopen and friends in <dlfcn.h>.\n * dlopen/dlsym/dlclose have been available since Mac OS X 10.3 and work with \n * dylibs and bundles.  \n *\n *    NSAddImage                           -> dlopen\n *    NSLookupSymbolInImage                -> dlsym\n *    NSCreateObjectFileImageFromFile      -> dlopen\n *    NSDestroyObjectFileImage             -> dlclose\n *    NSLinkModule                         -> not needed when dlopen used\n *    NSUnLinkModule                       -> not needed when dlclose used\n *    NSLookupSymbolInModule               -> dlsym\n *    _dyld_image_containing_address       -> dladdr\n *    NSLinkEditError                      -> dlerror\n *\n */\n\n#ifndef ENUM_DYLD_BOOL\n#define ENUM_DYLD_BOOL\n  #undef FALSE\n  #undef TRUE\n  enum DYLD_BOOL { FALSE, TRUE };\n#endif /* ENUM_DYLD_BOOL */\n\n\n/* Object file image API */\ntypedef enum {\n    NSObjectFileImageFailure, /* for this a message is printed on stderr */\n    NSObjectFileImageSuccess,\n    NSObjectFileImageInappropriateFile,\n    NSObjectFileImageArch,\n    NSObjectFileImageFormat, /* for this a message is printed on stderr */\n    NSObjectFileImageAccess\n} NSObjectFileImageReturnCode;\n\ntypedef struct __NSObjectFileImage* NSObjectFileImage;\n\n\n\n/* NSObjectFileImage can only be used with MH_BUNDLE files */\nextern NSObjectFileImageReturnCode NSCreateObjectFileImageFromFile(const char* pathName, NSObjectFileImage *objectFileImage)               __API_UNAVAILABLE(ios, tvos, watchos)  DYLD_DRIVERKIT_UNAVAILABLE  __OSX_DEPRECATED(10.1, 10.5, \"dlopen()\");\nextern NSObjectFileImageReturnCode NSCreateObjectFileImageFromMemory(const void *address, size_t size, NSObjectFileImage *objectFileImage) __API_UNAVAILABLE(ios, tvos, watchos)  DYLD_DRIVERKIT_UNAVAILABLE  __OSX_DEPRECATED(10.1, 10.5, \"\");\nextern bool                        NSDestroyObjectFileImage(NSObjectFileImage objectFileImage)                                             __API_UNAVAILABLE(ios, tvos, watchos)  DYLD_DRIVERKIT_UNAVAILABLE  __OSX_DEPRECATED(10.1, 10.5, \"dlclose()\");\n\nextern uint32_t     NSSymbolDefinitionCountInObjectFileImage(NSObjectFileImage objectFileImage)                   __API_UNAVAILABLE(ios, tvos, watchos)  DYLD_DRIVERKIT_UNAVAILABLE  __OSX_DEPRECATED(10.1, 10.5, \"\");\nextern const char*  NSSymbolDefinitionNameInObjectFileImage(NSObjectFileImage objectFileImage, uint32_t ordinal)  __API_UNAVAILABLE(ios, tvos, watchos)  DYLD_DRIVERKIT_UNAVAILABLE  __OSX_DEPRECATED(10.1, 10.5, \"\");\nextern uint32_t     NSSymbolReferenceCountInObjectFileImage(NSObjectFileImage objectFileImage)                    __API_UNAVAILABLE(ios, tvos, watchos)  DYLD_DRIVERKIT_UNAVAILABLE  __OSX_DEPRECATED(10.1, 10.5, \"\");\nextern const char*  NSSymbolReferenceNameInObjectFileImage(NSObjectFileImage objectFileImage, uint32_t ordinal, bool *tentative_definition) __API_UNAVAILABLE(ios, tvos, watchos)  DYLD_DRIVERKIT_UNAVAILABLE  __OSX_DEPRECATED(10.1, 10.5, \"\");\nextern bool         NSIsSymbolDefinedInObjectFileImage(NSObjectFileImage objectFileImage, const char* symbolName) __API_UNAVAILABLE(ios, tvos, watchos)  DYLD_DRIVERKIT_UNAVAILABLE  __OSX_DEPRECATED(10.1, 10.4, \"dlsym()\");\nextern void*        NSGetSectionDataInObjectFileImage(NSObjectFileImage objectFileImage, const char* segmentName, const char* sectionName, size_t *size) __API_UNAVAILABLE(ios, tvos, watchos)  DYLD_DRIVERKIT_UNAVAILABLE  __OSX_DEPRECATED(10.1, 10.5, \"getsectiondata()\");\n\ntypedef struct __NSModule* NSModule;\nextern const char*  NSNameOfModule(NSModule m)         __API_UNAVAILABLE(ios, tvos, watchos)  DYLD_DRIVERKIT_UNAVAILABLE  __OSX_DEPRECATED(10.1, 10.5, \"\");\nextern const char*  NSLibraryNameForModule(NSModule m) __API_UNAVAILABLE(ios, tvos, watchos)  DYLD_DRIVERKIT_UNAVAILABLE  __OSX_DEPRECATED(10.1, 10.5, \"\");\n\nextern NSModule NSLinkModule(NSObjectFileImage objectFileImage, const char* moduleName, uint32_t options) __API_UNAVAILABLE(ios, tvos, watchos)  DYLD_DRIVERKIT_UNAVAILABLE  __OSX_DEPRECATED(10.1, 10.5, \"dlopen()\");\n#define NSLINKMODULE_OPTION_NONE                         0x0\n#define NSLINKMODULE_OPTION_BINDNOW                      0x1\n#define NSLINKMODULE_OPTION_PRIVATE                      0x2\n#define NSLINKMODULE_OPTION_RETURN_ON_ERROR              0x4\n#define NSLINKMODULE_OPTION_DONT_CALL_MOD_INIT_ROUTINES  0x8\n#define NSLINKMODULE_OPTION_TRAILING_PHYS_NAME          0x10\n\nextern bool NSUnLinkModule(NSModule module, uint32_t options) __API_UNAVAILABLE(ios, tvos, watchos)  DYLD_DRIVERKIT_UNAVAILABLE  __OSX_DEPRECATED(10.1, 10.5, \"\");\n#define NSUNLINKMODULE_OPTION_NONE                  0x0\n#define NSUNLINKMODULE_OPTION_KEEP_MEMORY_MAPPED    0x1\n#define NSUNLINKMODULE_OPTION_RESET_LAZY_REFERENCES\t0x2\n\n/* symbol API */\ntypedef struct __NSSymbol* NSSymbol;\nextern bool     NSIsSymbolNameDefined(const char* symbolName)                                                    __API_UNAVAILABLE(ios, tvos, watchos)  DYLD_DRIVERKIT_UNAVAILABLE  __OSX_DEPRECATED(10.1, 10.4, \"dlsym()\");\nextern bool     NSIsSymbolNameDefinedWithHint(const char* symbolName, const char* libraryNameHint)               __API_UNAVAILABLE(ios, tvos, watchos)  DYLD_DRIVERKIT_UNAVAILABLE  __OSX_DEPRECATED(10.1, 10.4, \"dlsym()\");\nextern bool     NSIsSymbolNameDefinedInImage(const struct mach_header* image, const char* symbolName)            __API_UNAVAILABLE(ios, tvos, watchos)  DYLD_DRIVERKIT_UNAVAILABLE  __OSX_DEPRECATED(10.1, 10.4, \"dlsym()\");\nextern NSSymbol NSLookupAndBindSymbol(const char* symbolName)                                                    __API_UNAVAILABLE(ios, tvos, watchos)  DYLD_DRIVERKIT_UNAVAILABLE  __OSX_DEPRECATED(10.1, 10.4, \"dlsym()\");\nextern NSSymbol NSLookupAndBindSymbolWithHint(const char* symbolName, const char* libraryNameHint)               __API_UNAVAILABLE(ios, tvos, watchos)  DYLD_DRIVERKIT_UNAVAILABLE  __OSX_DEPRECATED(10.1, 10.4, \"dlsym()\");\nextern NSSymbol NSLookupSymbolInModule(NSModule module, const char* symbolName)                                  __API_UNAVAILABLE(ios, tvos, watchos)  DYLD_DRIVERKIT_UNAVAILABLE  __OSX_DEPRECATED(10.1, 10.5, \"dlsym()\");\nextern NSSymbol NSLookupSymbolInImage(const struct mach_header* image, const char* symbolName, uint32_t options) __API_UNAVAILABLE(ios, tvos, watchos)  DYLD_DRIVERKIT_UNAVAILABLE  __OSX_DEPRECATED(10.1, 10.5, \"dlsym()\");\n#define NSLOOKUPSYMBOLINIMAGE_OPTION_BIND            0x0\n#define NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_NOW        0x1\n#define NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_FULLY      0x2\n#define NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR 0x4\nextern const char*  NSNameOfSymbol(NSSymbol symbol)    __API_UNAVAILABLE(ios, tvos, watchos)  DYLD_DRIVERKIT_UNAVAILABLE  __OSX_DEPRECATED(10.1, 10.5, \"\");\nextern void *       NSAddressOfSymbol(NSSymbol symbol) __API_UNAVAILABLE(ios, tvos, watchos)  DYLD_DRIVERKIT_UNAVAILABLE  __OSX_DEPRECATED(10.1, 10.5, \"dlsym()\");\nextern NSModule     NSModuleForSymbol(NSSymbol symbol) __API_UNAVAILABLE(ios, tvos, watchos)  DYLD_DRIVERKIT_UNAVAILABLE  __OSX_DEPRECATED(10.1, 10.5, \"dladdr()\");\n\n/* error handling API */\ntypedef enum {\n    NSLinkEditFileAccessError,\n    NSLinkEditFileFormatError,\n    NSLinkEditMachResourceError,\n    NSLinkEditUnixResourceError,\n    NSLinkEditOtherError,\n    NSLinkEditWarningError,\n    NSLinkEditMultiplyDefinedError,\n    NSLinkEditUndefinedError\n} NSLinkEditErrors;\n\n/*\n * For the NSLinkEditErrors value NSLinkEditOtherError these are the values\n * passed to the link edit error handler as the errorNumber (what would be an\n * errno value for NSLinkEditUnixResourceError or a kern_return_t value for\n * NSLinkEditMachResourceError).\n */\ntypedef enum {\n    NSOtherErrorRelocation, \n    NSOtherErrorLazyBind,\n    NSOtherErrorIndrLoop,\n    NSOtherErrorLazyInit,\n    NSOtherErrorInvalidArgs\n} NSOtherErrorNumbers;\n\nextern void NSLinkEditError(NSLinkEditErrors *c, int *errorNumber, const char** fileName, const char** errorString) __API_UNAVAILABLE(ios, tvos, watchos)  DYLD_DRIVERKIT_UNAVAILABLE  __OSX_DEPRECATED(10.1, 10.5, \"dlerror()\");\n\ntypedef struct {\n     void     (*undefined)(const char* symbolName);\n     NSModule (*multiple)(NSSymbol s, NSModule oldModule, NSModule newModule); \n     void     (*linkEdit)(NSLinkEditErrors errorClass, int errorNumber,\n                          const char* fileName, const char* errorString);\n} NSLinkEditErrorHandlers;\n\nextern void NSInstallLinkEditErrorHandlers(const NSLinkEditErrorHandlers *handlers) __API_UNAVAILABLE(ios, tvos, watchos)  DYLD_DRIVERKIT_UNAVAILABLE  __OSX_DEPRECATED(10.1, 10.5, \"\");\n\nextern bool                      NSAddLibrary(const char* pathName)                   __API_UNAVAILABLE(ios, tvos, watchos)  DYLD_DRIVERKIT_UNAVAILABLE  __OSX_DEPRECATED(10.1, 10.4, \"dlopen()\");\nextern bool                      NSAddLibraryWithSearching(const char* pathName)      __API_UNAVAILABLE(ios, tvos, watchos)  DYLD_DRIVERKIT_UNAVAILABLE  __OSX_DEPRECATED(10.1, 10.4, \"dlopen()\");\nextern const struct mach_header* NSAddImage(const char* image_name, uint32_t options) __API_UNAVAILABLE(ios, tvos, watchos)  DYLD_DRIVERKIT_UNAVAILABLE  __OSX_DEPRECATED(10.1, 10.5, \"dlopen()\");\n#define NSADDIMAGE_OPTION_NONE                  \t0x0\n#define NSADDIMAGE_OPTION_RETURN_ON_ERROR       \t0x1\n#define NSADDIMAGE_OPTION_WITH_SEARCHING        \t0x2\n#define NSADDIMAGE_OPTION_RETURN_ONLY_IF_LOADED \t0x4\n#define NSADDIMAGE_OPTION_MATCH_FILENAME_BY_INSTALLNAME\t0x8\n\nextern bool _dyld_present(void)                                                              __API_UNAVAILABLE(ios, tvos, watchos)  DYLD_DRIVERKIT_UNAVAILABLE  __OSX_DEPRECATED(10.1, 10.5, \"always true\");\nextern bool _dyld_launched_prebound(void)                                                    __API_UNAVAILABLE(ios, tvos, watchos)  DYLD_DRIVERKIT_UNAVAILABLE  __OSX_DEPRECATED(10.1, 10.5, \"moot\");\nextern bool _dyld_all_twolevel_modules_prebound(void)                                        __API_UNAVAILABLE(ios, tvos, watchos)  DYLD_DRIVERKIT_UNAVAILABLE  __OSX_DEPRECATED(10.3, 10.5, \"moot\");\nextern bool _dyld_bind_fully_image_containing_address(const void* address)                   __API_UNAVAILABLE(ios, tvos, watchos)  DYLD_DRIVERKIT_UNAVAILABLE  __OSX_DEPRECATED(10.1, 10.5, \"dlopen(RTLD_NOW)\");\nextern bool _dyld_image_containing_address(const void* address)                              __API_UNAVAILABLE(ios, tvos, watchos)  DYLD_DRIVERKIT_UNAVAILABLE  __OSX_DEPRECATED(10.3, 10.5, \"dladdr()\");\nextern void _dyld_lookup_and_bind(const char* symbol_name, void **address, NSModule* module) __API_UNAVAILABLE(ios, tvos, watchos)  DYLD_DRIVERKIT_UNAVAILABLE  __OSX_DEPRECATED(10.1, 10.4, \"dlsym()\");\nextern void _dyld_lookup_and_bind_with_hint(const char* symbol_name, const char* library_name_hint, void** address, NSModule* module) __API_UNAVAILABLE(ios, tvos, watchos)  DYLD_DRIVERKIT_UNAVAILABLE  __OSX_DEPRECATED(10.1, 10.4, \"dlsym()\");\nextern void _dyld_lookup_and_bind_fully(const char* symbol_name, void** address, NSModule* module) __API_UNAVAILABLE(ios, tvos, watchos)  DYLD_DRIVERKIT_UNAVAILABLE  __OSX_DEPRECATED(10.1, 10.5, \"dlsym()\");\n\nextern const struct mach_header*  _dyld_get_image_header_containing_address(const void* address) __API_UNAVAILABLE(ios, tvos, watchos)  DYLD_DRIVERKIT_UNAVAILABLE  __OSX_DEPRECATED(10.3, 10.5, \"dladdr()\");\n\n\n#if __cplusplus\n}\n#endif \n\n#endif /* _MACH_O_DYLD_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/mach-o/dyld.modulemap",
    "content": "module MachO.dyld [system] [extern_c] {\n  header \"dyld.h\"\n  export *\n}\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/mach-o/dyld_images.h",
    "content": "/*\n * Copyright (c) 2006-2010 Apple Inc. All rights reserved.\n *\n * @APPLE_LICENSE_HEADER_START@\n * \n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this\n * file.\n * \n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n * \n * @APPLE_LICENSE_HEADER_END@\n */\n#ifndef _DYLD_IMAGES_\n#define _DYLD_IMAGES_\n\n#include <stdbool.h>\n#include <unistd.h>\n#include <mach/mach.h>\n#include <uuid/uuid.h>\n\n#if defined(__cplusplus) && (BUILDING_LIBDYLD || BUILDING_DYLD)\n#include <atomic>\n#endif\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n\n\n/* \n *\tBeginning in Mac OS X 10.4, this is how gdb discovers which mach-o images are loaded in a process.\n *\n *\tgdb looks for the symbol \"_dyld_all_image_infos\" in dyld.  It contains the fields below.  \n *\n *\tFor a snashot of what images are currently loaded, the infoArray fields contain a pointer\n *\tto an array of all images. If infoArray is NULL, it means it is being modified, come back later.\n *\n *\tTo be notified of changes, gdb sets a break point on the address pointed to by the notificationn\n *\tfield.  The function it points to is called by dyld with an array of information about what images \n *\thave been added (dyld_image_adding) or are about to be removed (dyld_image_removing). \n *\n * The notification is called after infoArray is updated.  This means that if gdb attaches to a process\n * and infoArray is NULL, gdb can set a break point on notification and let the proccess continue to\n * run until the break point.  Then gdb can inspect the full infoArray.\n *\n * The dyldVersion field always points to a C string that contains the dyld version.  For instance,\n * in dyld-127.3, dyldVersion would contain a pointer to \"127.3\".\n *\n * The errorMessage and terminationFlags fields are normally zero.  If dyld terminates a process\n * (for instance because a required dylib or symbol is missing), then the errorMessage field will\n * be set to point to a C string message buffer containing the reason dyld terminate the process.\n * The low bit of the terminationFlags will be set if dyld terminated the process before any user\n * code ran, in which case there is no need for the crash log to contain the backtrace.\n *\n * When dyld terminates a process because some required dylib or symbol cannot be bound, in \n * addition to the errorMessage field, it now sets the errorKind field and the corresponding\n * fields: errorClientOfDylibPath, errorTargetDylibPath, errorSymbol.\n *\n */\n\nenum dyld_image_mode { dyld_image_adding=0, dyld_image_removing=1, dyld_image_info_change=2 };\n\nstruct dyld_image_info {\n\tconst struct mach_header*\timageLoadAddress;\t/* base address image is mapped into */\n\tconst char*\t\t\t\t\timageFilePath;\t\t/* path dyld used to load the image */\n\tuintptr_t\t\t\t\t\timageFileModDate;\t/* time_t of image file */\n\t\t\t\t\t\t\t\t\t\t\t\t\t/* if stat().st_mtime of imageFilePath does not match imageFileModDate, */\n\t\t\t\t\t\t\t\t\t\t\t\t\t/* then file has been modified since dyld loaded it */\n};\n\nstruct dyld_uuid_info {\n\tconst struct mach_header*\timageLoadAddress;\t/* base address image is mapped into */\n\tuuid_t\t\t\t\t\t\timageUUID;\t\t\t/* UUID of image */\n};\n\n#define DYLD_AOT_IMAGE_KEY_SIZE 32\nstruct dyld_aot_image_info {\n    const struct mach_header*   x86LoadAddress;\n    const struct mach_header*   aotLoadAddress;\n    uint64_t                    aotImageSize;\n    uint8_t                     aotImageKey[DYLD_AOT_IMAGE_KEY_SIZE]; // uniquely identifying SHA-256 key for this aot\n};\n\nstruct dyld_aot_shared_cache_info {\n    const uintptr_t cacheBaseAddress;\n    uuid_t          cacheUUID;\n};\n\ntypedef void (*dyld_image_notifier)(enum dyld_image_mode mode, uint32_t infoCount, const struct dyld_image_info info[]);\n\n/* for use in dyld_all_image_infos.errorKind field */\nenum {\tdyld_error_kind_none=0, \n\t\tdyld_error_kind_dylib_missing=1, \n\t\tdyld_error_kind_dylib_wrong_arch=2,\n\t\tdyld_error_kind_dylib_version=3,\n\t\tdyld_error_kind_symbol_missing=4\n\t};\n\n/* internal limit */ \n#define DYLD_MAX_PROCESS_INFO_NOTIFY_COUNT  8\n\nstruct dyld_all_image_infos {\n\tuint32_t\t\t\t\t\t\tversion;\t\t/* 1 in Mac OS X 10.4 and 10.5 */\n\tuint32_t\t\t\t\t\t\tinfoArrayCount;\n#if defined(__cplusplus) && (BUILDING_LIBDYLD || BUILDING_DYLD)\n    std::atomic<const struct dyld_image_info*>\tinfoArray;\n#else\n    const struct dyld_image_info*    infoArray;\n#endif\n\tdyld_image_notifier\t\t\t\tnotification;\t\t\n\tbool\t\t\t\t\t\t\tprocessDetachedFromSharedRegion;\n\t/* the following fields are only in version 2 (Mac OS X 10.6, iPhoneOS 2.0) and later */\n\tbool\t\t\t\t\t\t\tlibSystemInitialized;\n\tconst struct mach_header*\t\tdyldImageLoadAddress;\n\t/* the following field is only in version 3 (Mac OS X 10.6, iPhoneOS 3.0) and later */\n\tvoid*\t\t\t\t\t\t\tjitInfo;\n\t/* the following fields are only in version 5 (Mac OS X 10.6, iPhoneOS 3.0) and later */\n\tconst char*\t\t\t\t\t\tdyldVersion;\n\tconst char*\t\t\t\t\t\terrorMessage;\n\tuintptr_t\t\t\t\t\t\tterminationFlags;\n\t/* the following field is only in version 6 (Mac OS X 10.6, iPhoneOS 3.1) and later */\n\tvoid*\t\t\t\t\t\t\tcoreSymbolicationShmPage;\n\t/* the following field is only in version 7 (Mac OS X 10.6, iPhoneOS 3.1) and later */\n\tuintptr_t\t\t\t\t\t\tsystemOrderFlag;\n\t/* the following field is only in version 8 (Mac OS X 10.7, iPhoneOS 3.1) and later */\n\tuintptr_t\t\t\t\t\t\tuuidArrayCount;\n\tconst struct dyld_uuid_info*\tuuidArray;\t\t/* only images not in dyld shared cache */\n\t/* the following field is only in version 9 (Mac OS X 10.7, iOS 4.0) and later */\n\tstruct dyld_all_image_infos*\tdyldAllImageInfosAddress;\n\t/* the following field is only in version 10 (Mac OS X 10.7, iOS 4.2) and later */\n\tuintptr_t\t\t\t\t\t\tinitialImageCount;\n\t/* the following field is only in version 11 (Mac OS X 10.7, iOS 4.2) and later */\n\tuintptr_t\t\t\t\t\t\terrorKind;\n\tconst char*\t\t\t\t\t\terrorClientOfDylibPath;\n\tconst char*\t\t\t\t\t\terrorTargetDylibPath;\n\tconst char*\t\t\t\t\t\terrorSymbol;\n\t/* the following field is only in version 12 (Mac OS X 10.7, iOS 4.3) and later */\n\tuintptr_t\t\t\t\t\t\tsharedCacheSlide;\n\t/* the following field is only in version 13 (Mac OS X 10.9, iOS 7.0) and later */\n\tuint8_t\t\t\t\t\t\t\tsharedCacheUUID[16];\n\t/* the following field is only in version 15 (macOS 10.12, iOS 10.0) and later */\n\tuintptr_t\t\t\t\t\t\tsharedCacheBaseAddress;\n#if defined(__cplusplus) && (BUILDING_LIBDYLD || BUILDING_DYLD)\n    // We want this to be atomic in libdyld so that we can see updates when we map it shared\n    std::atomic<uint64_t>           infoArrayChangeTimestamp;\n#else\n\tuint64_t\t\t\t\t\t\tinfoArrayChangeTimestamp;\n#endif\n\tconst char*\t\t\t\t\t\tdyldPath;\n\tmach_port_t\t\t\t\t\t\tnotifyPorts[DYLD_MAX_PROCESS_INFO_NOTIFY_COUNT];\n#if __LP64__\n\tuintptr_t\t\t\t\t\t\treserved[11-(DYLD_MAX_PROCESS_INFO_NOTIFY_COUNT/2)];\n#else\n\tuintptr_t\t\t\t\t\t\treserved[9-DYLD_MAX_PROCESS_INFO_NOTIFY_COUNT];\n#endif\n    // The following fields were added in version 18 (previously they were reserved padding fields)\n    uint64_t                        sharedCacheFSID;\n    uint64_t                        sharedCacheFSObjID;\n\t/* the following field is only in version 16 (macOS 10.13, iOS 11.0) and later */\n    uintptr_t                       compact_dyld_image_info_addr;\n    size_t                          compact_dyld_image_info_size;\n    uint32_t                        platform; // FIXME: really a dyld_platform_t, but those aren't exposed here.\n\n    /* the following field is only in version 17 (macOS 10.16) and later */\n    uint32_t                          aotInfoCount;\n    const struct dyld_aot_image_info* aotInfoArray;\n    uint64_t                          aotInfoArrayChangeTimestamp;\n    uintptr_t                         aotSharedCacheBaseAddress;\n    uint8_t                           aotSharedCacheUUID[16];\n};\n\n/*\n * Beginning in Mac OS X 10.5, this is how gdb discovers where the shared cache is in a process.\n * Images that are in the shared cache have their segments rearranged, so when using imageFilePath\n * to load the file from disk, you have to know to adjust addresses based on how their segment\n * was rearranged.\n *\n * gdb looks for the symbol \"_dyld_shared_region_ranges\" in dyld. \n * \n * It contains information the count of shared regions used by the process.  The count is\n * the number of start/length pairs.  \n */\nstruct dyld_shared_cache_ranges {\n\tuintptr_t\t\t\t\t\tsharedRegionsCount;\t/* how many ranges follow */\n\tstruct {\n\t\tuintptr_t\tstart;\n\t\tuintptr_t\tlength;\n\t}\t\t\t\t\t\t\tranges[4];\t\t\t/* max regions */\n};\nextern struct dyld_shared_cache_ranges dyld_shared_cache_ranges __attribute__((visibility(\"hidden\")));\n\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif /* _DYLD_IMAGES_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/mach-o/fat.h",
    "content": "/*\n * Copyright (c) 2016 Apple, Inc. All rights reserved.\n *\n * @APPLE_LICENSE_HEADER_START@\n * \n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this\n * file.\n * \n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n * \n * @APPLE_LICENSE_HEADER_END@\n */\n#ifndef _MACH_O_FAT_H_\n#define _MACH_O_FAT_H_\n/*\n * This header file describes the structures of the file format for \"fat\"\n * architecture specific file (wrapper design).  At the begining of the file\n * there is one fat_header structure followed by a number of fat_arch\n * structures.  For each architecture in the file, specified by a pair of\n * cputype and cpusubtype, the fat_header describes the file offset, file\n * size and alignment in the file of the architecture specific member.\n * The padded bytes in the file to place each member on it's specific alignment\n * are defined to be read as zeros and can be left as \"holes\" if the file system\n * can support them as long as they read as zeros.\n *\n * All structures defined here are always written and read to/from disk\n * in big-endian order.\n */\n\n/*\n * <mach/machine.h> is needed here for the cpu_type_t and cpu_subtype_t types\n * and contains the constants for the possible values of these types.\n */\n#include <stdint.h>\n#include <mach/machine.h>\n#include <architecture/byte_order.h>\n\n#define FAT_MAGIC\t0xcafebabe\n#define FAT_CIGAM\t0xbebafeca\t/* NXSwapLong(FAT_MAGIC) */\n\nstruct fat_header {\n\tuint32_t\tmagic;\t\t/* FAT_MAGIC or FAT_MAGIC_64 */\n\tuint32_t\tnfat_arch;\t/* number of structs that follow */\n};\n\nstruct fat_arch {\n\tcpu_type_t\tcputype;\t/* cpu specifier (int) */\n\tcpu_subtype_t\tcpusubtype;\t/* machine specifier (int) */\n\tuint32_t\toffset;\t\t/* file offset to this object file */\n\tuint32_t\tsize;\t\t/* size of this object file */\n\tuint32_t\talign;\t\t/* alignment as a power of 2 */\n};\n\n/*\n * The support for the 64-bit fat file format described here is a work in\n * progress and not yet fully supported in all the Apple Developer Tools.\n *\n * When a slice is greater than 4mb or an offset to a slice is greater than 4mb\n * then the 64-bit fat file format is used.\n */\n#define FAT_MAGIC_64\t0xcafebabf\n#define FAT_CIGAM_64\t0xbfbafeca\t/* NXSwapLong(FAT_MAGIC_64) */\n\nstruct fat_arch_64 {\n\tcpu_type_t\tcputype;\t/* cpu specifier (int) */\n\tcpu_subtype_t\tcpusubtype;\t/* machine specifier (int) */\n\tuint64_t\toffset;\t\t/* file offset to this object file */\n\tuint64_t\tsize;\t\t/* size of this object file */\n\tuint32_t\talign;\t\t/* alignment as a power of 2 */\n\tuint32_t\treserved;\t/* reserved */\n};\n\n#endif /* _MACH_O_FAT_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/mach-o/fixup-chains.h",
    "content": "/* -*- mode: C++; c-basic-offset: 4; tab-width: 4 -*-\n *\n * Copyright (c) 2018 Apple Inc. All rights reserved.\n *\n * @APPLE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this\n * file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_LICENSE_HEADER_END@\n */\n\n#ifndef __MACH_O_FIXUP_CHAINS__\n#define __MACH_O_FIXUP_CHAINS__ 6\n\n\n#include <stdint.h>\n\n\n//#define LC_DYLD_EXPORTS_TRIE   0x80000033 // used with linkedit_data_command\n//#define LC_DYLD_CHAINED_FIXUPS 0x80000034 // used with linkedit_data_command, payload is dyld_chained_fixups_header\n\n\n// header of the LC_DYLD_CHAINED_FIXUPS payload\nstruct dyld_chained_fixups_header\n{\n    uint32_t    fixups_version;    // 0\n    uint32_t    starts_offset;     // offset of dyld_chained_starts_in_image in chain_data\n    uint32_t    imports_offset;    // offset of imports table in chain_data\n    uint32_t    symbols_offset;    // offset of symbol strings in chain_data\n    uint32_t    imports_count;     // number of imported symbol names\n    uint32_t    imports_format;    // DYLD_CHAINED_IMPORT*\n    uint32_t    symbols_format;    // 0 => uncompressed, 1 => zlib compressed\n};\n\n// This struct is embedded in LC_DYLD_CHAINED_FIXUPS payload\nstruct dyld_chained_starts_in_image\n{\n    uint32_t    seg_count;\n    uint32_t    seg_info_offset[1];  // each entry is offset into this struct for that segment\n    // followed by pool of dyld_chain_starts_in_segment data\n};\n\n// This struct is embedded in dyld_chain_starts_in_image\n// and passed down to the kernel for page-in linking\nstruct dyld_chained_starts_in_segment\n{\n    uint32_t    size;               // size of this (amount kernel needs to copy)\n    uint16_t    page_size;          // 0x1000 or 0x4000\n    uint16_t    pointer_format;     // DYLD_CHAINED_PTR_*\n    uint64_t    segment_offset;     // offset in memory to start of segment\n    uint32_t    max_valid_pointer;  // for 32-bit OS, any value beyond this is not a pointer\n    uint16_t    page_count;         // how many pages are in array\n    uint16_t    page_start[1];      // each entry is offset in each page of first element in chain\n                                    // or DYLD_CHAINED_PTR_START_NONE if no fixups on page\n // uint16_t    chain_starts[1];    // some 32-bit formats may require multiple starts per page.\n                                    // for those, if high bit is set in page_starts[], then it\n                                    // is index into chain_starts[] which is a list of starts\n                                    // the last of which has the high bit set\n};\n\nenum {\n    DYLD_CHAINED_PTR_START_NONE   = 0xFFFF, // used in page_start[] to denote a page with no fixups\n    DYLD_CHAINED_PTR_START_MULTI  = 0x8000, // used in page_start[] to denote a page which has multiple starts\n    DYLD_CHAINED_PTR_START_LAST   = 0x8000, // used in chain_starts[] to denote last start in list for page\n};\n\n// This struct is embedded in __TEXT,__chain_starts section in firmware\nstruct dyld_chained_starts_offsets\n{\n    uint32_t    pointer_format;     // DYLD_CHAINED_PTR_32_FIRMWARE\n    uint32_t    starts_count;       // number of starts in array\n    uint32_t    chain_starts[1];    // array chain start offsets\n};\n\n\n// values for dyld_chained_starts_in_segment.pointer_format\nenum {\n    DYLD_CHAINED_PTR_ARM64E                 =  1,    // stride 8, unauth target is vmaddr\n    DYLD_CHAINED_PTR_64                     =  2,    // target is vmaddr\n    DYLD_CHAINED_PTR_32                     =  3,\n    DYLD_CHAINED_PTR_32_CACHE               =  4,\n    DYLD_CHAINED_PTR_32_FIRMWARE            =  5,\n    DYLD_CHAINED_PTR_64_OFFSET              =  6,    // target is vm offset\n    DYLD_CHAINED_PTR_ARM64E_OFFSET          =  7,    // old name\n    DYLD_CHAINED_PTR_ARM64E_KERNEL          =  7,    // stride 4, unauth target is vm offset\n    DYLD_CHAINED_PTR_64_KERNEL_CACHE        =  8,\n    DYLD_CHAINED_PTR_ARM64E_USERLAND        =  9,    // stride 8, unauth target is vm offset\n    DYLD_CHAINED_PTR_ARM64E_FIRMWARE        = 10,    // stride 4, unauth target is vmaddr\n    DYLD_CHAINED_PTR_X86_64_KERNEL_CACHE    = 11,    // stride 1, x86_64 kernel caches\n    DYLD_CHAINED_PTR_ARM64E_USERLAND24      = 12,    // stride 8, unauth target is vm offset, 24-bit bind\n};\n\n\n// DYLD_CHAINED_PTR_ARM64E\nstruct dyld_chained_ptr_arm64e_rebase\n{\n    uint64_t    target   : 43,\n                high8    :  8,\n                next     : 11,    // 4 or 8-byte stide\n                bind     :  1,    // == 0\n                auth     :  1;    // == 0\n};\n\n// DYLD_CHAINED_PTR_ARM64E\nstruct dyld_chained_ptr_arm64e_bind\n{\n    uint64_t    ordinal   : 16,\n                zero      : 16,\n                addend    : 19,    // +/-256K\n                next      : 11,    // 4 or 8-byte stide\n                bind      :  1,    // == 1\n                auth      :  1;    // == 0\n};\n\n// DYLD_CHAINED_PTR_ARM64E\nstruct dyld_chained_ptr_arm64e_auth_rebase\n{\n    uint64_t    target    : 32,   // runtimeOffset\n                diversity : 16,\n                addrDiv   :  1,\n                key       :  2,\n                next      : 11,    // 4 or 8-byte stide\n                bind      :  1,    // == 0\n                auth      :  1;    // == 1\n};\n\n// DYLD_CHAINED_PTR_ARM64E\nstruct dyld_chained_ptr_arm64e_auth_bind\n{\n    uint64_t    ordinal   : 16,\n                zero      : 16,\n                diversity : 16,\n                addrDiv   :  1,\n                key       :  2,\n                next      : 11,    // 4 or 8-byte stide\n                bind      :  1,    // == 1\n                auth      :  1;    // == 1\n};\n\n// DYLD_CHAINED_PTR_64/DYLD_CHAINED_PTR_64_OFFSET\nstruct dyld_chained_ptr_64_rebase\n{\n    uint64_t    target    : 36,    // 64GB max image size (DYLD_CHAINED_PTR_64 => vmAddr, DYLD_CHAINED_PTR_64_OFFSET => runtimeOffset)\n                high8     :  8,    // top 8 bits set to this (DYLD_CHAINED_PTR_64 => after slide added, DYLD_CHAINED_PTR_64_OFFSET => before slide added)\n                reserved  :  7,    // all zeros\n                next      : 12,    // 4-byte stride\n                bind      :  1;    // == 0\n};\n\n\n// DYLD_CHAINED_PTR_ARM64E_USERLAND24\nstruct dyld_chained_ptr_arm64e_bind24\n{\n    uint64_t    ordinal   : 24,\n                zero      :  8,\n                addend    : 19,    // +/-256K\n                next      : 11,    // 8-byte stide\n                bind      :  1,    // == 1\n                auth      :  1;    // == 0\n};\n\n// DYLD_CHAINED_PTR_ARM64E_USERLAND24\nstruct dyld_chained_ptr_arm64e_auth_bind24\n{\n    uint64_t    ordinal   : 24,\n                zero      :  8,\n                diversity : 16,\n                addrDiv   :  1,\n                key       :  2,\n                next      : 11,    // 8-byte stide\n                bind      :  1,    // == 1\n                auth      :  1;    // == 1\n};\n\n\n// DYLD_CHAINED_PTR_64\nstruct dyld_chained_ptr_64_bind\n{\n    uint64_t    ordinal   : 24,\n                addend    :  8,   // 0 thru 255\n                reserved  : 19,   // all zeros\n                next      : 12,   // 4-byte stride\n                bind      :  1;   // == 1\n};\n\n// DYLD_CHAINED_PTR_64_KERNEL_CACHE, DYLD_CHAINED_PTR_X86_64_KERNEL_CACHE\nstruct dyld_chained_ptr_64_kernel_cache_rebase\n{\n    uint64_t    target     : 30,   // basePointers[cacheLevel] + target\n                cacheLevel :  2,   // what level of cache to bind to (indexes a mach_header array)\n                diversity  : 16,\n                addrDiv    :  1,\n                key        :  2,\n                next       : 12,    // 1 or 4-byte stide\n                isAuth     :  1;    // 0 -> not authenticated.  1 -> authenticated\n};\n\n// DYLD_CHAINED_PTR_32\n// Note: for DYLD_CHAINED_PTR_32 some non-pointer values are co-opted into the chain\n// as out of range rebases.  If an entry in the chain is > max_valid_pointer, then it\n// is not a pointer.  To restore the value, subtract off the bias, which is\n// (64MB+max_valid_pointer)/2.\nstruct dyld_chained_ptr_32_rebase\n{\n    uint32_t    target    : 26,   // vmaddr, 64MB max image size\n                next      :  5,   // 4-byte stride\n                bind      :  1;   // == 0\n};\n\n// DYLD_CHAINED_PTR_32\nstruct dyld_chained_ptr_32_bind\n{\n    uint32_t    ordinal   : 20,\n                addend    :  6,   // 0 thru 63\n                next      :  5,   // 4-byte stride\n                bind      :  1;   // == 1\n};\n\n// DYLD_CHAINED_PTR_32_CACHE\nstruct dyld_chained_ptr_32_cache_rebase\n{\n    uint32_t    target    : 30,   // 1GB max dyld cache TEXT and DATA\n                next      :  2;   // 4-byte stride\n};\n\n\n// DYLD_CHAINED_PTR_32_FIRMWARE\nstruct dyld_chained_ptr_32_firmware_rebase\n{\n    uint32_t    target   : 26,   // 64MB max firmware TEXT and DATA\n                next     :  6;   // 4-byte stride\n};\n\n\n\n// values for dyld_chained_fixups_header.imports_format\nenum {\n    DYLD_CHAINED_IMPORT          = 1,\n    DYLD_CHAINED_IMPORT_ADDEND   = 2,\n    DYLD_CHAINED_IMPORT_ADDEND64 = 3,\n};\n\n// DYLD_CHAINED_IMPORT\nstruct dyld_chained_import\n{\n    uint32_t    lib_ordinal :  8,\n                weak_import :  1,\n                name_offset : 23;\n};\n\n// DYLD_CHAINED_IMPORT_ADDEND\nstruct dyld_chained_import_addend\n{\n    uint32_t    lib_ordinal :  8,\n                weak_import :  1,\n                name_offset : 23;\n    int32_t     addend;\n};\n\n// DYLD_CHAINED_IMPORT_ADDEND64\nstruct dyld_chained_import_addend64\n{\n    uint64_t    lib_ordinal : 16,\n                weak_import :  1,\n                reserved    : 15,\n                name_offset : 32;\n    uint64_t    addend;\n};\n\n#endif // __MACH_O_FIXUP_CHAINS__\n\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/mach-o/getsect.h",
    "content": "/*\n * Copyright (c) 2004 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_LICENSE_HEADER_START@\n * \n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this\n * file.\n * \n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n * \n * @APPLE_LICENSE_HEADER_END@\n */\n#ifndef _MACH_O_GETSECT_H_\n#define _MACH_O_GETSECT_H_\n\n#include <stdint.h>\n#include <mach-o/loader.h>\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif /* __cplusplus */\n\n/*\n * Runtime interfaces for Mach-O programs.  For both 32-bit and 64-bit programs,\n * where the sizes returned will be 32-bit or 64-bit based on the size of\n * 'unsigned long'.\n */\nextern char *getsectdata(\n    const char *segname,\n    const char *sectname,\n    unsigned long *size);\n\nextern char *getsectdatafromFramework(\n    const char *FrameworkName,\n    const char *segname,\n    const char *sectname,\n    unsigned long *size);\n\nextern unsigned long get_end(void);\nextern unsigned long get_etext(void);\nextern unsigned long get_edata(void);\n\n#ifndef __LP64__\n/*\n * Runtime interfaces for 32-bit Mach-O programs.\n */\nextern const struct section *getsectbyname(\n    const char *segname,\n    const char *sectname);\n\nextern uint8_t *getsectiondata(\n    const struct mach_header *mhp,\n    const char *segname,\n    const char *sectname,\n    unsigned long *size);\n\nextern const struct segment_command *getsegbyname(\n    const char *segname);\n\nextern uint8_t *getsegmentdata(\n    const struct mach_header *mhp,\n    const char *segname,\n    unsigned long *size);\n\n#else /* defined(__LP64__) */\n/*\n * Runtime interfaces for 64-bit Mach-O programs.\n */\nextern const struct section_64 *getsectbyname(\n    const char *segname,\n    const char *sectname);\n\nextern uint8_t *getsectiondata(\n    const struct mach_header_64 *mhp,\n    const char *segname,\n    const char *sectname,\n    unsigned long *size);\n\nextern const struct segment_command_64 *getsegbyname(\n    const char *segname);\n\nextern uint8_t *getsegmentdata(\n    const struct mach_header_64 *mhp,\n    const char *segname,\n    unsigned long *size);\n\n#endif /* defined(__LP64__) */\n\n/*\n * Interfaces for tools working with 32-bit Mach-O files.\n */\nextern char *getsectdatafromheader(\n    const struct mach_header *mhp,\n    const char *segname,\n    const char *sectname,\n    uint32_t *size);\n\nextern const struct section *getsectbynamefromheader(\n    const struct mach_header *mhp,\n    const char *segname,\n    const char *sectname);\n\nextern const struct section *getsectbynamefromheaderwithswap(\n    struct mach_header *mhp,\n    const char *segname,\n    const char *sectname,\n    int fSwap);\n\n/*\n * Interfaces for tools working with 64-bit Mach-O files.\n */\nextern char *getsectdatafromheader_64(\n    const struct mach_header_64 *mhp,\n    const char *segname,\n    const char *sectname,\n    uint64_t *size);\n\nextern const struct section_64 *getsectbynamefromheader_64(\n    const struct mach_header_64 *mhp,\n    const char *segname,\n    const char *sectname);\n\nextern const struct section *getsectbynamefromheaderwithswap_64(\n    struct mach_header_64 *mhp,\n    const char *segname,\n    const char *sectname,\n    int fSwap);\n\n#ifdef __cplusplus\n}\n#endif /* __cplusplus */\n\n#endif /* _MACH_O_GETSECT_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/mach-o/i386/swap.h",
    "content": "/*\n * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_LICENSE_HEADER_START@\n * \n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this\n * file.\n * \n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n * \n * @APPLE_LICENSE_HEADER_END@\n */\n#include <architecture/byte_order.h>\n#include <mach/i386/thread_status.h>\n\nstruct i386_float_state;\n\nextern void swap_i386_thread_state(\n    i386_thread_state_t *cpu,\n    enum NXByteOrder target_byte_order);\n\n/* current i386 thread states */\n#if i386_THREAD_STATE == 1\nextern void swap_i386_float_state(\n    struct i386_float_state *fpu,\n    enum NXByteOrder target_byte_order);\n\nextern void swap_i386_exception_state(\n    i386_exception_state_t *exc,\n    enum NXByteOrder target_byte_order);\n#endif /* i386_THREAD_STATE == 1 */\n\n/* i386 thread states on older releases */\n#if i386_THREAD_STATE == -1\nextern void swap_i386_thread_fpstate(\n    i386_thread_fpstate_t *fpu,\n    enum NXByteOrder target_byte_order);\n\nextern void swap_i386_thread_exceptstate(\n    i386_thread_exceptstate_t *exc,\n    enum NXByteOrder target_byte_order);\n\nextern void swap_i386_thread_cthreadstate(\n    i386_thread_cthreadstate_t *user,\n    enum NXByteOrder target_byte_order);\n#endif /* i386_THREAD_STATE == -1 */\n\n#ifdef x86_THREAD_STATE64\nextern void swap_x86_thread_state64(\n    x86_thread_state64_t *cpu,\n    enum NXByteOrder target_byte_order);\n\nextern void swap_x86_state_hdr(\n    x86_state_hdr_t *hdr,\n    enum NXByteOrder target_byte_order);\n\nextern void swap_x86_float_state64(\n    x86_float_state64_t *fpu,\n    enum NXByteOrder target_byte_order);\n\nextern void swap_x86_exception_state64(\n    x86_exception_state64_t *exc,\n    enum NXByteOrder target_byte_order);\n\nextern void swap_x86_thread_state(\n    x86_thread_state_t *cpu,\n    enum NXByteOrder target_byte_order);\n\nextern void swap_x86_float_state(\n    x86_float_state_t *fpu,\n    enum NXByteOrder target_byte_order);\n\nextern void swap_x86_exception_state(\n    x86_exception_state_t *exc,\n    enum NXByteOrder target_byte_order);\n\nextern void swap_x86_debug_state32(\n    x86_debug_state32_t *debug,\n    enum NXByteOrder target_byte_order);\n\nextern void swap_x86_debug_state64(\n    x86_debug_state64_t *debug,\n    enum NXByteOrder target_byte_order);\n\nextern void swap_x86_debug_state(\n    x86_debug_state_t *debug,\n    enum NXByteOrder target_byte_order);\n#endif /* x86_THREAD_STATE64 */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/mach-o/ldsyms.h",
    "content": "/*\n * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_LICENSE_HEADER_START@\n * \n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this\n * file.\n * \n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n * \n * @APPLE_LICENSE_HEADER_END@\n */\n\n#ifndef _MACHO_LDSYMS_H_\n#define _MACHO_LDSYMS_H_\n\n#include <mach-o/loader.h>\n\n/*\n * This file describes the link editor defined symbols.  The semantics of a\n * link editor symbol is that it is defined by the link editor only if it is\n * referenced and it is an error for the user to define them (see the man page\n * ld(1)).  The standard UNIX link editor symbols: __end, __etext and __edata\n * are not not supported by the Apple Mach-O link editor.  These symbols are\n * really not meaningful in a Mach-O object file and the link editor symbols\n * that are supported (described here) replace them.  In the case of the\n * standard UNIX link editor symbols the program can use the symbol\n * __mh_execute_header and walk the load commands of it's program to determine\n * the ending (or beginning) of any section or segment in the program.  Note\n * that the compiler prepends an underbar to all external symbol names coded\n * in a high level language.  Thus in 'C' names are coded without an underbar\n * and symbol names in the symbol table have an underbar.  There are two cpp\n * macros for each link editor defined name in this file.  The macro with a\n * leading underbar is the symbol name and the one without is the name as\n * coded in 'C'.\n */\n\n/*\n * The value of the link editor defined symbol _MH_EXECUTE_SYM is the address\n * of the mach header in a Mach-O executable file type.  It does not appear in\n * any file type other than a MH_EXECUTE file type.  The type of the symbol is\n * absolute as the header is not part of any section.\n */\n#define _MH_EXECUTE_SYM\t\"__mh_execute_header\"\n#define MH_EXECUTE_SYM\t\"_mh_execute_header\"\nextern const struct\n#ifdef __LP64__\nmach_header_64\n#else\nmach_header\n#endif\n_mh_execute_header;\n\n/*\n * The value of the link editor defined symbol _MH_BUNDLE_SYM is the address\n * of the mach header in a Mach-O bundle file type.  It does not appear in\n * any file type other than a MH_BUNDLE file type.  The type of the symbol is\n * an N_SECT symbol even thought the header is not part of any section.  This\n * symbol is private to the code in the bundle it is a part of.\n */\n#define _MH_BUNDLE_SYM\t\"__mh_bundle_header\"\n#define MH_BUNDLE_SYM\t\"_mh_bundle_header\"\nextern const struct\n#ifdef __LP64__\nmach_header_64\n#else\nmach_header\n#endif\n_mh_bundle_header;\n\n/*\n * The value of the link editor defined symbol _MH_DYLIB_SYM is the address\n * of the mach header in a Mach-O dylib file type.  It does not appear in\n * any file type other than a MH_DYLIB file type.  The type of the symbol is\n * an N_SECT symbol even thought the header is not part of any section.  This\n * symbol is private to the code in the library it is a part of.\n */\n#define _MH_DYLIB_SYM\t\"__mh_dylib_header\"\n#define MH_DYLIB_SYM\t\"_mh_dylib_header\"\nextern const struct\n#ifdef __LP64__\nmach_header_64\n#else\nmach_header\n#endif\n_mh_dylib_header;\n\n/*\n * The value of the link editor defined symbol _MH_DYLINKER_SYM is the address\n * of the mach header in a Mach-O dylinker file type.  It does not appear in\n * any file type other than a MH_DYLINKER file type.  The type of the symbol is\n * an N_SECT symbol even thought the header is not part of any section.  This\n * symbol is private to the code in the dynamic linker it is a part of.\n */\n#define _MH_DYLINKER_SYM\t\"__mh_dylinker_header\"\n#define MH_DYLINKER_SYM\t\t\"_mh_dylinker_header\"\nextern const struct\n#ifdef __LP64__\nmach_header_64\n#else\nmach_header\n#endif\n_mh_dylinker_header;\n\n/*\n * For the MH_PRELOAD file type the headers are not loaded as part of any\n * segment so the link editor defines symbols defined for the beginning\n * and ending of each segment and each section in each segment.  The names for\n * the symbols for a segment's beginning and end will have the form:\n * __SEGNAME__begin and  __SEGNAME__end where __SEGNAME is the name of the\n * segment.  The names for the symbols for a section's beginning and end will\n * have the form: __SEGNAME__sectname__begin and __SEGNAME__sectname__end\n * where __sectname is the name of the section and __SEGNAME is the segment it\n * is in.\n * \n * The above symbols' types are those of the section they are referring to.\n * This is true even for symbols who's values are end's of a section and\n * that value is next address after that section and not really in that\n * section.  This results in these symbols having types referring to sections\n * who's values are not in that section.\n */\n\n#endif /* _MACHO_LDSYMS_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/mach-o/loader.h",
    "content": "/*\n * Copyright (c) 1999-2010 Apple Inc.  All Rights Reserved.\n *\n * @APPLE_LICENSE_HEADER_START@\n * \n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this\n * file.\n * \n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n * \n * @APPLE_LICENSE_HEADER_END@\n */\n#ifndef _MACHO_LOADER_H_\n#define _MACHO_LOADER_H_\n\n/*\n * This file describes the format of mach object files.\n */\n#include <stdint.h>\n\n/*\n * <mach/machine.h> is needed here for the cpu_type_t and cpu_subtype_t types\n * and contains the constants for the possible values of these types.\n */\n#include <mach/machine.h>\n\n/*\n * <mach/vm_prot.h> is needed here for the vm_prot_t type and contains the \n * constants that are or'ed together for the possible values of this type.\n */\n#include <mach/vm_prot.h>\n\n/*\n * <machine/thread_status.h> is expected to define the flavors of the thread\n * states and the structures of those flavors for each machine.\n */\n#include <mach/machine/thread_status.h>\n#include <architecture/byte_order.h>\n\n/*\n * The 32-bit mach header appears at the very beginning of the object file for\n * 32-bit architectures.\n */\nstruct mach_header {\n\tuint32_t\tmagic;\t\t/* mach magic number identifier */\n\tcpu_type_t\tcputype;\t/* cpu specifier */\n\tcpu_subtype_t\tcpusubtype;\t/* machine specifier */\n\tuint32_t\tfiletype;\t/* type of file */\n\tuint32_t\tncmds;\t\t/* number of load commands */\n\tuint32_t\tsizeofcmds;\t/* the size of all the load commands */\n\tuint32_t\tflags;\t\t/* flags */\n};\n\n/* Constant for the magic field of the mach_header (32-bit architectures) */\n#define\tMH_MAGIC\t0xfeedface\t/* the mach magic number */\n#define MH_CIGAM\t0xcefaedfe\t/* NXSwapInt(MH_MAGIC) */\n\n/*\n * The 64-bit mach header appears at the very beginning of object files for\n * 64-bit architectures.\n */\nstruct mach_header_64 {\n\tuint32_t\tmagic;\t\t/* mach magic number identifier */\n\tcpu_type_t\tcputype;\t/* cpu specifier */\n\tcpu_subtype_t\tcpusubtype;\t/* machine specifier */\n\tuint32_t\tfiletype;\t/* type of file */\n\tuint32_t\tncmds;\t\t/* number of load commands */\n\tuint32_t\tsizeofcmds;\t/* the size of all the load commands */\n\tuint32_t\tflags;\t\t/* flags */\n\tuint32_t\treserved;\t/* reserved */\n};\n\n/* Constant for the magic field of the mach_header_64 (64-bit architectures) */\n#define MH_MAGIC_64 0xfeedfacf /* the 64-bit mach magic number */\n#define MH_CIGAM_64 0xcffaedfe /* NXSwapInt(MH_MAGIC_64) */\n\n/*\n * The layout of the file depends on the filetype.  For all but the MH_OBJECT\n * file type the segments are padded out and aligned on a segment alignment\n * boundary for efficient demand pageing.  The MH_EXECUTE, MH_FVMLIB, MH_DYLIB,\n * MH_DYLINKER and MH_BUNDLE file types also have the headers included as part\n * of their first segment.\n * \n * The file type MH_OBJECT is a compact format intended as output of the\n * assembler and input (and possibly output) of the link editor (the .o\n * format).  All sections are in one unnamed segment with no segment padding. \n * This format is used as an executable format when the file is so small the\n * segment padding greatly increases its size.\n *\n * The file type MH_PRELOAD is an executable format intended for things that\n * are not executed under the kernel (proms, stand alones, kernels, etc).  The\n * format can be executed under the kernel but may demand paged it and not\n * preload it before execution.\n *\n * A core file is in MH_CORE format and can be any in an arbritray legal\n * Mach-O file.\n *\n * Constants for the filetype field of the mach_header\n */\n#define\tMH_OBJECT\t0x1\t\t/* relocatable object file */\n#define\tMH_EXECUTE\t0x2\t\t/* demand paged executable file */\n#define\tMH_FVMLIB\t0x3\t\t/* fixed VM shared library file */\n#define\tMH_CORE\t\t0x4\t\t/* core file */\n#define\tMH_PRELOAD\t0x5\t\t/* preloaded executable file */\n#define\tMH_DYLIB\t0x6\t\t/* dynamically bound shared library */\n#define\tMH_DYLINKER\t0x7\t\t/* dynamic link editor */\n#define\tMH_BUNDLE\t0x8\t\t/* dynamically bound bundle file */\n#define\tMH_DYLIB_STUB\t0x9\t\t/* shared library stub for static\n\t\t\t\t\t   linking only, no section contents */\n#define\tMH_DSYM\t\t0xa\t\t/* companion file with only debug\n\t\t\t\t\t   sections */\n#define\tMH_KEXT_BUNDLE\t0xb\t\t/* x86_64 kexts */\n#define MH_FILESET\t0xc\t\t/* a file composed of other Mach-Os to\n\t\t\t\t\t   be run in the same userspace sharing\n\t\t\t\t\t   a single linkedit. */\n\n/* Constants for the flags field of the mach_header */\n#define\tMH_NOUNDEFS\t0x1\t\t/* the object file has no undefined\n\t\t\t\t\t   references */\n#define\tMH_INCRLINK\t0x2\t\t/* the object file is the output of an\n\t\t\t\t\t   incremental link against a base file\n\t\t\t\t\t   and can't be link edited again */\n#define MH_DYLDLINK\t0x4\t\t/* the object file is input for the\n\t\t\t\t\t   dynamic linker and can't be staticly\n\t\t\t\t\t   link edited again */\n#define MH_BINDATLOAD\t0x8\t\t/* the object file's undefined\n\t\t\t\t\t   references are bound by the dynamic\n\t\t\t\t\t   linker when loaded. */\n#define MH_PREBOUND\t0x10\t\t/* the file has its dynamic undefined\n\t\t\t\t\t   references prebound. */\n#define MH_SPLIT_SEGS\t0x20\t\t/* the file has its read-only and\n\t\t\t\t\t   read-write segments split */\n#define MH_LAZY_INIT\t0x40\t\t/* the shared library init routine is\n\t\t\t\t\t   to be run lazily via catching memory\n\t\t\t\t\t   faults to its writeable segments\n\t\t\t\t\t   (obsolete) */\n#define MH_TWOLEVEL\t0x80\t\t/* the image is using two-level name\n\t\t\t\t\t   space bindings */\n#define MH_FORCE_FLAT\t0x100\t\t/* the executable is forcing all images\n\t\t\t\t\t   to use flat name space bindings */\n#define MH_NOMULTIDEFS\t0x200\t\t/* this umbrella guarantees no multiple\n\t\t\t\t\t   defintions of symbols in its\n\t\t\t\t\t   sub-images so the two-level namespace\n\t\t\t\t\t   hints can always be used. */\n#define MH_NOFIXPREBINDING 0x400\t/* do not have dyld notify the\n\t\t\t\t\t   prebinding agent about this\n\t\t\t\t\t   executable */\n#define MH_PREBINDABLE  0x800           /* the binary is not prebound but can\n\t\t\t\t\t   have its prebinding redone. only used\n                                           when MH_PREBOUND is not set. */\n#define MH_ALLMODSBOUND 0x1000\t\t/* indicates that this binary binds to\n                                           all two-level namespace modules of\n\t\t\t\t\t   its dependent libraries. only used\n\t\t\t\t\t   when MH_PREBINDABLE and MH_TWOLEVEL\n\t\t\t\t\t   are both set. */ \n#define MH_SUBSECTIONS_VIA_SYMBOLS 0x2000/* safe to divide up the sections into\n\t\t\t\t\t    sub-sections via symbols for dead\n\t\t\t\t\t    code stripping */\n#define MH_CANONICAL    0x4000\t\t/* the binary has been canonicalized\n\t\t\t\t\t   via the unprebind operation */\n#define MH_WEAK_DEFINES\t0x8000\t\t/* the final linked image contains\n\t\t\t\t\t   external weak symbols */\n#define MH_BINDS_TO_WEAK 0x10000\t/* the final linked image uses\n\t\t\t\t\t   weak symbols */\n\n#define MH_ALLOW_STACK_EXECUTION 0x20000/* When this bit is set, all stacks \n\t\t\t\t\t   in the task will be given stack\n\t\t\t\t\t   execution privilege.  Only used in\n\t\t\t\t\t   MH_EXECUTE filetypes. */\n#define MH_ROOT_SAFE 0x40000           /* When this bit is set, the binary \n\t\t\t\t\t  declares it is safe for use in\n\t\t\t\t\t  processes with uid zero */\n                                         \n#define MH_SETUID_SAFE 0x80000         /* When this bit is set, the binary \n\t\t\t\t\t  declares it is safe for use in\n\t\t\t\t\t  processes when issetugid() is true */\n\n#define MH_NO_REEXPORTED_DYLIBS 0x100000 /* When this bit is set on a dylib, \n\t\t\t\t\t  the static linker does not need to\n\t\t\t\t\t  examine dependent dylibs to see\n\t\t\t\t\t  if any are re-exported */\n#define\tMH_PIE 0x200000\t\t\t/* When this bit is set, the OS will\n\t\t\t\t\t   load the main executable at a\n\t\t\t\t\t   random address.  Only used in\n\t\t\t\t\t   MH_EXECUTE filetypes. */\n#define\tMH_DEAD_STRIPPABLE_DYLIB 0x400000 /* Only for use on dylibs.  When\n\t\t\t\t\t     linking against a dylib that\n\t\t\t\t\t     has this bit set, the static linker\n\t\t\t\t\t     will automatically not create a\n\t\t\t\t\t     LC_LOAD_DYLIB load command to the\n\t\t\t\t\t     dylib if no symbols are being\n\t\t\t\t\t     referenced from the dylib. */\n#define MH_HAS_TLV_DESCRIPTORS 0x800000 /* Contains a section of type \n\t\t\t\t\t    S_THREAD_LOCAL_VARIABLES */\n\n#define MH_NO_HEAP_EXECUTION 0x1000000\t/* When this bit is set, the OS will\n\t\t\t\t\t   run the main executable with\n\t\t\t\t\t   a non-executable heap even on\n\t\t\t\t\t   platforms (e.g. i386) that don't\n\t\t\t\t\t   require it. Only used in MH_EXECUTE\n\t\t\t\t\t   filetypes. */\n\n#define MH_APP_EXTENSION_SAFE 0x02000000 /* The code was linked for use in an\n\t\t\t\t\t    application extension. */\n\n#define\tMH_NLIST_OUTOFSYNC_WITH_DYLDINFO 0x04000000 /* The external symbols\n\t\t\t\t\t   listed in the nlist symbol table do\n\t\t\t\t\t   not include all the symbols listed in\n\t\t\t\t\t   the dyld info. */\n\n#define\tMH_SIM_SUPPORT 0x08000000\t/* Allow LC_MIN_VERSION_MACOS and\n\t\t\t\t\t   LC_BUILD_VERSION load commands with\n\t\t\t\t\t   the platforms macOS, macCatalyst,\n\t\t\t\t\t   iOSSimulator, tvOSSimulator and\n\t\t\t\t\t   watchOSSimulator. */\n\t\t\t\t\t   \n#define MH_DYLIB_IN_CACHE 0x80000000\t/* Only for use on dylibs. When this bit\n\t\t\t\t\t   is set, the dylib is part of the dyld\n\t\t\t\t\t   shared cache, rather than loose in\n\t\t\t\t\t   the filesystem. */\n\n/*\n * The load commands directly follow the mach_header.  The total size of all\n * of the commands is given by the sizeofcmds field in the mach_header.  All\n * load commands must have as their first two fields cmd and cmdsize.  The cmd\n * field is filled in with a constant for that command type.  Each command type\n * has a structure specifically for it.  The cmdsize field is the size in bytes\n * of the particular load command structure plus anything that follows it that\n * is a part of the load command (i.e. section structures, strings, etc.).  To\n * advance to the next load command the cmdsize can be added to the offset or\n * pointer of the current load command.  The cmdsize for 32-bit architectures\n * MUST be a multiple of 4 bytes and for 64-bit architectures MUST be a multiple\n * of 8 bytes (these are forever the maximum alignment of any load commands).\n * The padded bytes must be zero.  All tables in the object file must also\n * follow these rules so the file can be memory mapped.  Otherwise the pointers\n * to these tables will not work well or at all on some machines.  With all\n * padding zeroed like objects will compare byte for byte.\n */\nstruct load_command {\n\tuint32_t cmd;\t\t/* type of load command */\n\tuint32_t cmdsize;\t/* total size of command in bytes */\n};\n\n/*\n * After MacOS X 10.1 when a new load command is added that is required to be\n * understood by the dynamic linker for the image to execute properly the\n * LC_REQ_DYLD bit will be or'ed into the load command constant.  If the dynamic\n * linker sees such a load command it it does not understand will issue a\n * \"unknown load command required for execution\" error and refuse to use the\n * image.  Other load commands without this bit that are not understood will\n * simply be ignored.\n */\n#define LC_REQ_DYLD 0x80000000\n\n/* Constants for the cmd field of all load commands, the type */\n#define\tLC_SEGMENT\t0x1\t/* segment of this file to be mapped */\n#define\tLC_SYMTAB\t0x2\t/* link-edit stab symbol table info */\n#define\tLC_SYMSEG\t0x3\t/* link-edit gdb symbol table info (obsolete) */\n#define\tLC_THREAD\t0x4\t/* thread */\n#define\tLC_UNIXTHREAD\t0x5\t/* unix thread (includes a stack) */\n#define\tLC_LOADFVMLIB\t0x6\t/* load a specified fixed VM shared library */\n#define\tLC_IDFVMLIB\t0x7\t/* fixed VM shared library identification */\n#define\tLC_IDENT\t0x8\t/* object identification info (obsolete) */\n#define LC_FVMFILE\t0x9\t/* fixed VM file inclusion (internal use) */\n#define LC_PREPAGE      0xa     /* prepage command (internal use) */\n#define\tLC_DYSYMTAB\t0xb\t/* dynamic link-edit symbol table info */\n#define\tLC_LOAD_DYLIB\t0xc\t/* load a dynamically linked shared library */\n#define\tLC_ID_DYLIB\t0xd\t/* dynamically linked shared lib ident */\n#define LC_LOAD_DYLINKER 0xe\t/* load a dynamic linker */\n#define LC_ID_DYLINKER\t0xf\t/* dynamic linker identification */\n#define\tLC_PREBOUND_DYLIB 0x10\t/* modules prebound for a dynamically */\n\t\t\t\t/*  linked shared library */\n#define\tLC_ROUTINES\t0x11\t/* image routines */\n#define\tLC_SUB_FRAMEWORK 0x12\t/* sub framework */\n#define\tLC_SUB_UMBRELLA 0x13\t/* sub umbrella */\n#define\tLC_SUB_CLIENT\t0x14\t/* sub client */\n#define\tLC_SUB_LIBRARY  0x15\t/* sub library */\n#define\tLC_TWOLEVEL_HINTS 0x16\t/* two-level namespace lookup hints */\n#define\tLC_PREBIND_CKSUM  0x17\t/* prebind checksum */\n\n/*\n * load a dynamically linked shared library that is allowed to be missing\n * (all symbols are weak imported).\n */\n#define\tLC_LOAD_WEAK_DYLIB (0x18 | LC_REQ_DYLD)\n\n#define\tLC_SEGMENT_64\t0x19\t/* 64-bit segment of this file to be\n\t\t\t\t   mapped */\n#define\tLC_ROUTINES_64\t0x1a\t/* 64-bit image routines */\n#define LC_UUID\t\t0x1b\t/* the uuid */\n#define LC_RPATH       (0x1c | LC_REQ_DYLD)    /* runpath additions */\n#define LC_CODE_SIGNATURE 0x1d\t/* local of code signature */\n#define LC_SEGMENT_SPLIT_INFO 0x1e /* local of info to split segments */\n#define LC_REEXPORT_DYLIB (0x1f | LC_REQ_DYLD) /* load and re-export dylib */\n#define\tLC_LAZY_LOAD_DYLIB 0x20\t/* delay load of dylib until first use */\n#define\tLC_ENCRYPTION_INFO 0x21\t/* encrypted segment information */\n#define\tLC_DYLD_INFO \t0x22\t/* compressed dyld information */\n#define\tLC_DYLD_INFO_ONLY (0x22|LC_REQ_DYLD)\t/* compressed dyld information only */\n#define\tLC_LOAD_UPWARD_DYLIB (0x23 | LC_REQ_DYLD) /* load upward dylib */\n#define LC_VERSION_MIN_MACOSX 0x24   /* build for MacOSX min OS version */\n#define LC_VERSION_MIN_IPHONEOS 0x25 /* build for iPhoneOS min OS version */\n#define LC_FUNCTION_STARTS 0x26 /* compressed table of function start addresses */\n#define LC_DYLD_ENVIRONMENT 0x27 /* string for dyld to treat\n\t\t\t\t    like environment variable */\n#define LC_MAIN (0x28|LC_REQ_DYLD) /* replacement for LC_UNIXTHREAD */\n#define LC_DATA_IN_CODE 0x29 /* table of non-instructions in __text */\n#define LC_SOURCE_VERSION 0x2A /* source version used to build binary */\n#define LC_DYLIB_CODE_SIGN_DRS 0x2B /* Code signing DRs copied from linked dylibs */\n#define\tLC_ENCRYPTION_INFO_64 0x2C /* 64-bit encrypted segment information */\n#define LC_LINKER_OPTION 0x2D /* linker options in MH_OBJECT files */\n#define LC_LINKER_OPTIMIZATION_HINT 0x2E /* optimization hints in MH_OBJECT files */\n#define LC_VERSION_MIN_TVOS 0x2F /* build for AppleTV min OS version */\n#define LC_VERSION_MIN_WATCHOS 0x30 /* build for Watch min OS version */\n#define LC_NOTE 0x31 /* arbitrary data included within a Mach-O file */\n#define LC_BUILD_VERSION 0x32 /* build for platform min OS version */\n#define LC_DYLD_EXPORTS_TRIE (0x33 | LC_REQ_DYLD) /* used with linkedit_data_command, payload is trie */\n#define LC_DYLD_CHAINED_FIXUPS (0x34 | LC_REQ_DYLD) /* used with linkedit_data_command */\n#define LC_FILESET_ENTRY (0x35 | LC_REQ_DYLD) /* used with fileset_entry_command */\n\n/*\n * A variable length string in a load command is represented by an lc_str\n * union.  The strings are stored just after the load command structure and\n * the offset is from the start of the load command structure.  The size\n * of the string is reflected in the cmdsize field of the load command.\n * Once again any padded bytes to bring the cmdsize field to a multiple\n * of 4 bytes must be zero.\n */\nunion lc_str {\n\tuint32_t\toffset;\t/* offset to the string */\n#ifndef __LP64__\n\tchar\t\t*ptr;\t/* pointer to the string */\n#endif \n};\n\n/*\n * The segment load command indicates that a part of this file is to be\n * mapped into the task's address space.  The size of this segment in memory,\n * vmsize, maybe equal to or larger than the amount to map from this file,\n * filesize.  The file is mapped starting at fileoff to the beginning of\n * the segment in memory, vmaddr.  The rest of the memory of the segment,\n * if any, is allocated zero fill on demand.  The segment's maximum virtual\n * memory protection and initial virtual memory protection are specified\n * by the maxprot and initprot fields.  If the segment has sections then the\n * section structures directly follow the segment command and their size is\n * reflected in cmdsize.\n */\nstruct segment_command { /* for 32-bit architectures */\n\tuint32_t\tcmd;\t\t/* LC_SEGMENT */\n\tuint32_t\tcmdsize;\t/* includes sizeof section structs */\n\tchar\t\tsegname[16];\t/* segment name */\n\tuint32_t\tvmaddr;\t\t/* memory address of this segment */\n\tuint32_t\tvmsize;\t\t/* memory size of this segment */\n\tuint32_t\tfileoff;\t/* file offset of this segment */\n\tuint32_t\tfilesize;\t/* amount to map from the file */\n\tvm_prot_t\tmaxprot;\t/* maximum VM protection */\n\tvm_prot_t\tinitprot;\t/* initial VM protection */\n\tuint32_t\tnsects;\t\t/* number of sections in segment */\n\tuint32_t\tflags;\t\t/* flags */\n};\n\n/*\n * The 64-bit segment load command indicates that a part of this file is to be\n * mapped into a 64-bit task's address space.  If the 64-bit segment has\n * sections then section_64 structures directly follow the 64-bit segment\n * command and their size is reflected in cmdsize.\n */\nstruct segment_command_64 { /* for 64-bit architectures */\n\tuint32_t\tcmd;\t\t/* LC_SEGMENT_64 */\n\tuint32_t\tcmdsize;\t/* includes sizeof section_64 structs */\n\tchar\t\tsegname[16];\t/* segment name */\n\tuint64_t\tvmaddr;\t\t/* memory address of this segment */\n\tuint64_t\tvmsize;\t\t/* memory size of this segment */\n\tuint64_t\tfileoff;\t/* file offset of this segment */\n\tuint64_t\tfilesize;\t/* amount to map from the file */\n\tvm_prot_t\tmaxprot;\t/* maximum VM protection */\n\tvm_prot_t\tinitprot;\t/* initial VM protection */\n\tuint32_t\tnsects;\t\t/* number of sections in segment */\n\tuint32_t\tflags;\t\t/* flags */\n};\n\n/* Constants for the flags field of the segment_command */\n#define\tSG_HIGHVM\t0x1\t/* the file contents for this segment is for\n\t\t\t\t   the high part of the VM space, the low part\n\t\t\t\t   is zero filled (for stacks in core files) */\n#define\tSG_FVMLIB\t0x2\t/* this segment is the VM that is allocated by\n\t\t\t\t   a fixed VM library, for overlap checking in\n\t\t\t\t   the link editor */\n#define\tSG_NORELOC\t0x4\t/* this segment has nothing that was relocated\n\t\t\t\t   in it and nothing relocated to it, that is\n\t\t\t\t   it maybe safely replaced without relocation*/\n#define SG_PROTECTED_VERSION_1\t0x8 /* This segment is protected.  If the\n\t\t\t\t       segment starts at file offset 0, the\n\t\t\t\t       first page of the segment is not\n\t\t\t\t       protected.  All other pages of the\n\t\t\t\t       segment are protected. */\n#define SG_READ_ONLY    0x10 /* This segment is made read-only after fixups */\n\n\n\n/*\n * A segment is made up of zero or more sections.  Non-MH_OBJECT files have\n * all of their segments with the proper sections in each, and padded to the\n * specified segment alignment when produced by the link editor.  The first\n * segment of a MH_EXECUTE and MH_FVMLIB format file contains the mach_header\n * and load commands of the object file before its first section.  The zero\n * fill sections are always last in their segment (in all formats).  This\n * allows the zeroed segment padding to be mapped into memory where zero fill\n * sections might be. The gigabyte zero fill sections, those with the section\n * type S_GB_ZEROFILL, can only be in a segment with sections of this type.\n * These segments are then placed after all other segments.\n *\n * The MH_OBJECT format has all of its sections in one segment for\n * compactness.  There is no padding to a specified segment boundary and the\n * mach_header and load commands are not part of the segment.\n *\n * Sections with the same section name, sectname, going into the same segment,\n * segname, are combined by the link editor.  The resulting section is aligned\n * to the maximum alignment of the combined sections and is the new section's\n * alignment.  The combined sections are aligned to their original alignment in\n * the combined section.  Any padded bytes to get the specified alignment are\n * zeroed.\n *\n * The format of the relocation entries referenced by the reloff and nreloc\n * fields of the section structure for mach object files is described in the\n * header file <reloc.h>.\n */\nstruct section { /* for 32-bit architectures */\n\tchar\t\tsectname[16];\t/* name of this section */\n\tchar\t\tsegname[16];\t/* segment this section goes in */\n\tuint32_t\taddr;\t\t/* memory address of this section */\n\tuint32_t\tsize;\t\t/* size in bytes of this section */\n\tuint32_t\toffset;\t\t/* file offset of this section */\n\tuint32_t\talign;\t\t/* section alignment (power of 2) */\n\tuint32_t\treloff;\t\t/* file offset of relocation entries */\n\tuint32_t\tnreloc;\t\t/* number of relocation entries */\n\tuint32_t\tflags;\t\t/* flags (section type and attributes)*/\n\tuint32_t\treserved1;\t/* reserved (for offset or index) */\n\tuint32_t\treserved2;\t/* reserved (for count or sizeof) */\n};\n\nstruct section_64 { /* for 64-bit architectures */\n\tchar\t\tsectname[16];\t/* name of this section */\n\tchar\t\tsegname[16];\t/* segment this section goes in */\n\tuint64_t\taddr;\t\t/* memory address of this section */\n\tuint64_t\tsize;\t\t/* size in bytes of this section */\n\tuint32_t\toffset;\t\t/* file offset of this section */\n\tuint32_t\talign;\t\t/* section alignment (power of 2) */\n\tuint32_t\treloff;\t\t/* file offset of relocation entries */\n\tuint32_t\tnreloc;\t\t/* number of relocation entries */\n\tuint32_t\tflags;\t\t/* flags (section type and attributes)*/\n\tuint32_t\treserved1;\t/* reserved (for offset or index) */\n\tuint32_t\treserved2;\t/* reserved (for count or sizeof) */\n\tuint32_t\treserved3;\t/* reserved */\n};\n\n/*\n * The flags field of a section structure is separated into two parts a section\n * type and section attributes.  The section types are mutually exclusive (it\n * can only have one type) but the section attributes are not (it may have more\n * than one attribute).\n */\n#define SECTION_TYPE\t\t 0x000000ff\t/* 256 section types */\n#define SECTION_ATTRIBUTES\t 0xffffff00\t/*  24 section attributes */\n\n/* Constants for the type of a section */\n#define\tS_REGULAR\t\t0x0\t/* regular section */\n#define\tS_ZEROFILL\t\t0x1\t/* zero fill on demand section */\n#define\tS_CSTRING_LITERALS\t0x2\t/* section with only literal C strings*/\n#define\tS_4BYTE_LITERALS\t0x3\t/* section with only 4 byte literals */\n#define\tS_8BYTE_LITERALS\t0x4\t/* section with only 8 byte literals */\n#define\tS_LITERAL_POINTERS\t0x5\t/* section with only pointers to */\n\t\t\t\t\t/*  literals */\n/*\n * For the two types of symbol pointers sections and the symbol stubs section\n * they have indirect symbol table entries.  For each of the entries in the\n * section the indirect symbol table entries, in corresponding order in the\n * indirect symbol table, start at the index stored in the reserved1 field\n * of the section structure.  Since the indirect symbol table entries\n * correspond to the entries in the section the number of indirect symbol table\n * entries is inferred from the size of the section divided by the size of the\n * entries in the section.  For symbol pointers sections the size of the entries\n * in the section is 4 bytes and for symbol stubs sections the byte size of the\n * stubs is stored in the reserved2 field of the section structure.\n */\n#define\tS_NON_LAZY_SYMBOL_POINTERS\t0x6\t/* section with only non-lazy\n\t\t\t\t\t\t   symbol pointers */\n#define\tS_LAZY_SYMBOL_POINTERS\t\t0x7\t/* section with only lazy symbol\n\t\t\t\t\t\t   pointers */\n#define\tS_SYMBOL_STUBS\t\t\t0x8\t/* section with only symbol\n\t\t\t\t\t\t   stubs, byte size of stub in\n\t\t\t\t\t\t   the reserved2 field */\n#define\tS_MOD_INIT_FUNC_POINTERS\t0x9\t/* section with only function\n\t\t\t\t\t\t   pointers for initialization*/\n#define\tS_MOD_TERM_FUNC_POINTERS\t0xa\t/* section with only function\n\t\t\t\t\t\t   pointers for termination */\n#define\tS_COALESCED\t\t\t0xb\t/* section contains symbols that\n\t\t\t\t\t\t   are to be coalesced */\n#define\tS_GB_ZEROFILL\t\t\t0xc\t/* zero fill on demand section\n\t\t\t\t\t\t   (that can be larger than 4\n\t\t\t\t\t\t   gigabytes) */\n#define\tS_INTERPOSING\t\t\t0xd\t/* section with only pairs of\n\t\t\t\t\t\t   function pointers for\n\t\t\t\t\t\t   interposing */\n#define\tS_16BYTE_LITERALS\t\t0xe\t/* section with only 16 byte\n\t\t\t\t\t\t   literals */\n#define\tS_DTRACE_DOF\t\t\t0xf\t/* section contains \n\t\t\t\t\t\t   DTrace Object Format */\n#define\tS_LAZY_DYLIB_SYMBOL_POINTERS\t0x10\t/* section with only lazy\n\t\t\t\t\t\t   symbol pointers to lazy\n\t\t\t\t\t\t   loaded dylibs */\n/*\n * Section types to support thread local variables\n */\n#define S_THREAD_LOCAL_REGULAR                   0x11  /* template of initial \n\t\t\t\t\t\t\t  values for TLVs */\n#define S_THREAD_LOCAL_ZEROFILL                  0x12  /* template of initial \n\t\t\t\t\t\t\t  values for TLVs */\n#define S_THREAD_LOCAL_VARIABLES                 0x13  /* TLV descriptors */\n#define S_THREAD_LOCAL_VARIABLE_POINTERS         0x14  /* pointers to TLV \n                                                          descriptors */\n#define S_THREAD_LOCAL_INIT_FUNCTION_POINTERS    0x15  /* functions to call\n\t\t\t\t\t\t\t  to initialize TLV\n\t\t\t\t\t\t\t  values */\n#define S_INIT_FUNC_OFFSETS                      0x16  /* 32-bit offsets to\n\t\t\t\t\t\t\t  initializers */\n\n/*\n * Constants for the section attributes part of the flags field of a section\n * structure.\n */\n#define SECTION_ATTRIBUTES_USR\t 0xff000000\t/* User setable attributes */\n#define S_ATTR_PURE_INSTRUCTIONS 0x80000000\t/* section contains only true\n\t\t\t\t\t\t   machine instructions */\n#define S_ATTR_NO_TOC \t\t 0x40000000\t/* section contains coalesced\n\t\t\t\t\t\t   symbols that are not to be\n\t\t\t\t\t\t   in a ranlib table of\n\t\t\t\t\t\t   contents */\n#define S_ATTR_STRIP_STATIC_SYMS 0x20000000\t/* ok to strip static symbols\n\t\t\t\t\t\t   in this section in files\n\t\t\t\t\t\t   with the MH_DYLDLINK flag */\n#define S_ATTR_NO_DEAD_STRIP\t 0x10000000\t/* no dead stripping */\n#define S_ATTR_LIVE_SUPPORT\t 0x08000000\t/* blocks are live if they\n\t\t\t\t\t\t   reference live blocks */\n#define S_ATTR_SELF_MODIFYING_CODE 0x04000000\t/* Used with i386 code stubs\n\t\t\t\t\t\t   written on by dyld */\n/*\n * If a segment contains any sections marked with S_ATTR_DEBUG then all\n * sections in that segment must have this attribute.  No section other than\n * a section marked with this attribute may reference the contents of this\n * section.  A section with this attribute may contain no symbols and must have\n * a section type S_REGULAR.  The static linker will not copy section contents\n * from sections with this attribute into its output file.  These sections\n * generally contain DWARF debugging info.\n */ \n#define\tS_ATTR_DEBUG\t\t 0x02000000\t/* a debug section */\n#define SECTION_ATTRIBUTES_SYS\t 0x00ffff00\t/* system setable attributes */\n#define S_ATTR_SOME_INSTRUCTIONS 0x00000400\t/* section contains some\n\t\t\t\t\t\t   machine instructions */\n#define S_ATTR_EXT_RELOC\t 0x00000200\t/* section has external\n\t\t\t\t\t\t   relocation entries */\n#define S_ATTR_LOC_RELOC\t 0x00000100\t/* section has local\n\t\t\t\t\t\t   relocation entries */\n\n\n/*\n * The names of segments and sections in them are mostly meaningless to the\n * link-editor.  But there are few things to support traditional UNIX\n * executables that require the link-editor and assembler to use some names\n * agreed upon by convention.\n *\n * The initial protection of the \"__TEXT\" segment has write protection turned\n * off (not writeable).\n *\n * The link-editor will allocate common symbols at the end of the \"__common\"\n * section in the \"__DATA\" segment.  It will create the section and segment\n * if needed.\n */\n\n/* The currently known segment names and the section names in those segments */\n\n#define\tSEG_PAGEZERO\t\"__PAGEZERO\"\t/* the pagezero segment which has no */\n\t\t\t\t\t/* protections and catches NULL */\n\t\t\t\t\t/* references for MH_EXECUTE files */\n\n\n#define\tSEG_TEXT\t\"__TEXT\"\t/* the tradition UNIX text segment */\n#define\tSECT_TEXT\t\"__text\"\t/* the real text part of the text */\n\t\t\t\t\t/* section no headers, and no padding */\n#define SECT_FVMLIB_INIT0 \"__fvmlib_init0\"\t/* the fvmlib initialization */\n\t\t\t\t\t\t/*  section */\n#define SECT_FVMLIB_INIT1 \"__fvmlib_init1\"\t/* the section following the */\n\t\t\t\t\t        /*  fvmlib initialization */\n\t\t\t\t\t\t/*  section */\n\n#define\tSEG_DATA\t\"__DATA\"\t/* the tradition UNIX data segment */\n#define\tSECT_DATA\t\"__data\"\t/* the real initialized data section */\n\t\t\t\t\t/* no padding, no bss overlap */\n#define\tSECT_BSS\t\"__bss\"\t\t/* the real uninitialized data section*/\n\t\t\t\t\t/* no padding */\n#define SECT_COMMON\t\"__common\"\t/* the section common symbols are */\n\t\t\t\t\t/* allocated in by the link editor */\n\n#define\tSEG_OBJC\t\"__OBJC\"\t/* objective-C runtime segment */\n#define SECT_OBJC_SYMBOLS \"__symbol_table\"\t/* symbol table */\n#define SECT_OBJC_MODULES \"__module_info\"\t/* module information */\n#define SECT_OBJC_STRINGS \"__selector_strs\"\t/* string table */\n#define SECT_OBJC_REFS \"__selector_refs\"\t/* string table */\n\n#define\tSEG_ICON\t \"__ICON\"\t/* the icon segment */\n#define\tSECT_ICON_HEADER \"__header\"\t/* the icon headers */\n#define\tSECT_ICON_TIFF   \"__tiff\"\t/* the icons in tiff format */\n\n#define\tSEG_LINKEDIT\t\"__LINKEDIT\"\t/* the segment containing all structs */\n\t\t\t\t\t/* created and maintained by the link */\n\t\t\t\t\t/* editor.  Created with -seglinkedit */\n\t\t\t\t\t/* option to ld(1) for MH_EXECUTE and */\n\t\t\t\t\t/* FVMLIB file types only */\n\n#define SEG_UNIXSTACK\t\"__UNIXSTACK\"\t/* the unix stack segment */\n\n#define SEG_IMPORT\t\"__IMPORT\"\t/* the segment for the self (dyld) */\n\t\t\t\t\t/* modifing code stubs that has read, */\n\t\t\t\t\t/* write and execute permissions */\n\n/*\n * Fixed virtual memory shared libraries are identified by two things.  The\n * target pathname (the name of the library as found for execution), and the\n * minor version number.  The address of where the headers are loaded is in\n * header_addr. (THIS IS OBSOLETE and no longer supported).\n */\nstruct fvmlib {\n\tunion lc_str\tname;\t\t/* library's target pathname */\n\tuint32_t\tminor_version;\t/* library's minor version number */\n\tuint32_t\theader_addr;\t/* library's header address */\n};\n\n/*\n * A fixed virtual shared library (filetype == MH_FVMLIB in the mach header)\n * contains a fvmlib_command (cmd == LC_IDFVMLIB) to identify the library.\n * An object that uses a fixed virtual shared library also contains a\n * fvmlib_command (cmd == LC_LOADFVMLIB) for each library it uses.\n * (THIS IS OBSOLETE and no longer supported).\n */\nstruct fvmlib_command {\n\tuint32_t\tcmd;\t\t/* LC_IDFVMLIB or LC_LOADFVMLIB */\n\tuint32_t\tcmdsize;\t/* includes pathname string */\n\tstruct fvmlib\tfvmlib;\t\t/* the library identification */\n};\n\n/*\n * Dynamicly linked shared libraries are identified by two things.  The\n * pathname (the name of the library as found for execution), and the\n * compatibility version number.  The pathname must match and the compatibility\n * number in the user of the library must be greater than or equal to the\n * library being used.  The time stamp is used to record the time a library was\n * built and copied into user so it can be use to determined if the library used\n * at runtime is exactly the same as used to built the program.\n */\nstruct dylib {\n    union lc_str  name;\t\t\t/* library's path name */\n    uint32_t timestamp;\t\t\t/* library's build time stamp */\n    uint32_t current_version;\t\t/* library's current version number */\n    uint32_t compatibility_version;\t/* library's compatibility vers number*/\n};\n\n/*\n * A dynamically linked shared library (filetype == MH_DYLIB in the mach header)\n * contains a dylib_command (cmd == LC_ID_DYLIB) to identify the library.\n * An object that uses a dynamically linked shared library also contains a\n * dylib_command (cmd == LC_LOAD_DYLIB, LC_LOAD_WEAK_DYLIB, or\n * LC_REEXPORT_DYLIB) for each library it uses.\n */\nstruct dylib_command {\n\tuint32_t\tcmd;\t\t/* LC_ID_DYLIB, LC_LOAD_{,WEAK_}DYLIB,\n\t\t\t\t\t   LC_REEXPORT_DYLIB */\n\tuint32_t\tcmdsize;\t/* includes pathname string */\n\tstruct dylib\tdylib;\t\t/* the library identification */\n};\n\n/*\n * A dynamically linked shared library may be a subframework of an umbrella\n * framework.  If so it will be linked with \"-umbrella umbrella_name\" where\n * Where \"umbrella_name\" is the name of the umbrella framework. A subframework\n * can only be linked against by its umbrella framework or other subframeworks\n * that are part of the same umbrella framework.  Otherwise the static link\n * editor produces an error and states to link against the umbrella framework.\n * The name of the umbrella framework for subframeworks is recorded in the\n * following structure.\n */\nstruct sub_framework_command {\n\tuint32_t\tcmd;\t\t/* LC_SUB_FRAMEWORK */\n\tuint32_t\tcmdsize;\t/* includes umbrella string */\n\tunion lc_str \tumbrella;\t/* the umbrella framework name */\n};\n\n/*\n * For dynamically linked shared libraries that are subframework of an umbrella\n * framework they can allow clients other than the umbrella framework or other\n * subframeworks in the same umbrella framework.  To do this the subframework\n * is built with \"-allowable_client client_name\" and an LC_SUB_CLIENT load\n * command is created for each -allowable_client flag.  The client_name is\n * usually a framework name.  It can also be a name used for bundles clients\n * where the bundle is built with \"-client_name client_name\".\n */\nstruct sub_client_command {\n\tuint32_t\tcmd;\t\t/* LC_SUB_CLIENT */\n\tuint32_t\tcmdsize;\t/* includes client string */\n\tunion lc_str \tclient;\t\t/* the client name */\n};\n\n/*\n * A dynamically linked shared library may be a sub_umbrella of an umbrella\n * framework.  If so it will be linked with \"-sub_umbrella umbrella_name\" where\n * Where \"umbrella_name\" is the name of the sub_umbrella framework.  When\n * staticly linking when -twolevel_namespace is in effect a twolevel namespace \n * umbrella framework will only cause its subframeworks and those frameworks\n * listed as sub_umbrella frameworks to be implicited linked in.  Any other\n * dependent dynamic libraries will not be linked it when -twolevel_namespace\n * is in effect.  The primary library recorded by the static linker when\n * resolving a symbol in these libraries will be the umbrella framework.\n * Zero or more sub_umbrella frameworks may be use by an umbrella framework.\n * The name of a sub_umbrella framework is recorded in the following structure.\n */\nstruct sub_umbrella_command {\n\tuint32_t\tcmd;\t\t/* LC_SUB_UMBRELLA */\n\tuint32_t\tcmdsize;\t/* includes sub_umbrella string */\n\tunion lc_str \tsub_umbrella;\t/* the sub_umbrella framework name */\n};\n\n/*\n * A dynamically linked shared library may be a sub_library of another shared\n * library.  If so it will be linked with \"-sub_library library_name\" where\n * Where \"library_name\" is the name of the sub_library shared library.  When\n * staticly linking when -twolevel_namespace is in effect a twolevel namespace \n * shared library will only cause its subframeworks and those frameworks\n * listed as sub_umbrella frameworks and libraries listed as sub_libraries to\n * be implicited linked in.  Any other dependent dynamic libraries will not be\n * linked it when -twolevel_namespace is in effect.  The primary library\n * recorded by the static linker when resolving a symbol in these libraries\n * will be the umbrella framework (or dynamic library). Zero or more sub_library\n * shared libraries may be use by an umbrella framework or (or dynamic library).\n * The name of a sub_library framework is recorded in the following structure.\n * For example /usr/lib/libobjc_profile.A.dylib would be recorded as \"libobjc\".\n */\nstruct sub_library_command {\n\tuint32_t\tcmd;\t\t/* LC_SUB_LIBRARY */\n\tuint32_t\tcmdsize;\t/* includes sub_library string */\n\tunion lc_str \tsub_library;\t/* the sub_library name */\n};\n\n/*\n * A program (filetype == MH_EXECUTE) that is\n * prebound to its dynamic libraries has one of these for each library that\n * the static linker used in prebinding.  It contains a bit vector for the\n * modules in the library.  The bits indicate which modules are bound (1) and\n * which are not (0) from the library.  The bit for module 0 is the low bit\n * of the first byte.  So the bit for the Nth module is:\n * (linked_modules[N/8] >> N%8) & 1\n */\nstruct prebound_dylib_command {\n\tuint32_t\tcmd;\t\t/* LC_PREBOUND_DYLIB */\n\tuint32_t\tcmdsize;\t/* includes strings */\n\tunion lc_str\tname;\t\t/* library's path name */\n\tuint32_t\tnmodules;\t/* number of modules in library */\n\tunion lc_str\tlinked_modules;\t/* bit vector of linked modules */\n};\n\n/*\n * A program that uses a dynamic linker contains a dylinker_command to identify\n * the name of the dynamic linker (LC_LOAD_DYLINKER).  And a dynamic linker\n * contains a dylinker_command to identify the dynamic linker (LC_ID_DYLINKER).\n * A file can have at most one of these.\n * This struct is also used for the LC_DYLD_ENVIRONMENT load command and\n * contains string for dyld to treat like environment variable.\n */\nstruct dylinker_command {\n\tuint32_t\tcmd;\t\t/* LC_ID_DYLINKER, LC_LOAD_DYLINKER or\n\t\t\t\t\t   LC_DYLD_ENVIRONMENT */\n\tuint32_t\tcmdsize;\t/* includes pathname string */\n\tunion lc_str    name;\t\t/* dynamic linker's path name */\n};\n\n/*\n * Thread commands contain machine-specific data structures suitable for\n * use in the thread state primitives.  The machine specific data structures\n * follow the struct thread_command as follows.\n * Each flavor of machine specific data structure is preceded by an uint32_t\n * constant for the flavor of that data structure, an uint32_t that is the\n * count of uint32_t's of the size of the state data structure and then\n * the state data structure follows.  This triple may be repeated for many\n * flavors.  The constants for the flavors, counts and state data structure\n * definitions are expected to be in the header file <machine/thread_status.h>.\n * These machine specific data structures sizes must be multiples of\n * 4 bytes.  The cmdsize reflects the total size of the thread_command\n * and all of the sizes of the constants for the flavors, counts and state\n * data structures.\n *\n * For executable objects that are unix processes there will be one\n * thread_command (cmd == LC_UNIXTHREAD) created for it by the link-editor.\n * This is the same as a LC_THREAD, except that a stack is automatically\n * created (based on the shell's limit for the stack size).  Command arguments\n * and environment variables are copied onto that stack.\n */\nstruct thread_command {\n\tuint32_t\tcmd;\t\t/* LC_THREAD or  LC_UNIXTHREAD */\n\tuint32_t\tcmdsize;\t/* total size of this command */\n\t/* uint32_t flavor\t\t   flavor of thread state */\n\t/* uint32_t count\t\t   count of uint32_t's in thread state */\n\t/* struct XXX_thread_state state   thread state for this flavor */\n\t/* ... */\n};\n\n/*\n * The routines command contains the address of the dynamic shared library \n * initialization routine and an index into the module table for the module\n * that defines the routine.  Before any modules are used from the library the\n * dynamic linker fully binds the module that defines the initialization routine\n * and then calls it.  This gets called before any module initialization\n * routines (used for C++ static constructors) in the library.\n */\nstruct routines_command { /* for 32-bit architectures */\n\tuint32_t\tcmd;\t\t/* LC_ROUTINES */\n\tuint32_t\tcmdsize;\t/* total size of this command */\n\tuint32_t\tinit_address;\t/* address of initialization routine */\n\tuint32_t\tinit_module;\t/* index into the module table that */\n\t\t\t\t        /*  the init routine is defined in */\n\tuint32_t\treserved1;\n\tuint32_t\treserved2;\n\tuint32_t\treserved3;\n\tuint32_t\treserved4;\n\tuint32_t\treserved5;\n\tuint32_t\treserved6;\n};\n\n/*\n * The 64-bit routines command.  Same use as above.\n */\nstruct routines_command_64 { /* for 64-bit architectures */\n\tuint32_t\tcmd;\t\t/* LC_ROUTINES_64 */\n\tuint32_t\tcmdsize;\t/* total size of this command */\n\tuint64_t\tinit_address;\t/* address of initialization routine */\n\tuint64_t\tinit_module;\t/* index into the module table that */\n\t\t\t\t\t/*  the init routine is defined in */\n\tuint64_t\treserved1;\n\tuint64_t\treserved2;\n\tuint64_t\treserved3;\n\tuint64_t\treserved4;\n\tuint64_t\treserved5;\n\tuint64_t\treserved6;\n};\n\n/*\n * The symtab_command contains the offsets and sizes of the link-edit 4.3BSD\n * \"stab\" style symbol table information as described in the header files\n * <nlist.h> and <stab.h>.\n */\nstruct symtab_command {\n\tuint32_t\tcmd;\t\t/* LC_SYMTAB */\n\tuint32_t\tcmdsize;\t/* sizeof(struct symtab_command) */\n\tuint32_t\tsymoff;\t\t/* symbol table offset */\n\tuint32_t\tnsyms;\t\t/* number of symbol table entries */\n\tuint32_t\tstroff;\t\t/* string table offset */\n\tuint32_t\tstrsize;\t/* string table size in bytes */\n};\n\n/*\n * This is the second set of the symbolic information which is used to support\n * the data structures for the dynamically link editor.\n *\n * The original set of symbolic information in the symtab_command which contains\n * the symbol and string tables must also be present when this load command is\n * present.  When this load command is present the symbol table is organized\n * into three groups of symbols:\n *\tlocal symbols (static and debugging symbols) - grouped by module\n *\tdefined external symbols - grouped by module (sorted by name if not lib)\n *\tundefined external symbols (sorted by name if MH_BINDATLOAD is not set,\n *\t     \t\t\t    and in order the were seen by the static\n *\t\t\t\t    linker if MH_BINDATLOAD is set)\n * In this load command there are offsets and counts to each of the three groups\n * of symbols.\n *\n * This load command contains a the offsets and sizes of the following new\n * symbolic information tables:\n *\ttable of contents\n *\tmodule table\n *\treference symbol table\n *\tindirect symbol table\n * The first three tables above (the table of contents, module table and\n * reference symbol table) are only present if the file is a dynamically linked\n * shared library.  For executable and object modules, which are files\n * containing only one module, the information that would be in these three\n * tables is determined as follows:\n * \ttable of contents - the defined external symbols are sorted by name\n *\tmodule table - the file contains only one module so everything in the\n *\t\t       file is part of the module.\n *\treference symbol table - is the defined and undefined external symbols\n *\n * For dynamically linked shared library files this load command also contains\n * offsets and sizes to the pool of relocation entries for all sections\n * separated into two groups:\n *\texternal relocation entries\n *\tlocal relocation entries\n * For executable and object modules the relocation entries continue to hang\n * off the section structures.\n */\nstruct dysymtab_command {\n    uint32_t cmd;\t/* LC_DYSYMTAB */\n    uint32_t cmdsize;\t/* sizeof(struct dysymtab_command) */\n\n    /*\n     * The symbols indicated by symoff and nsyms of the LC_SYMTAB load command\n     * are grouped into the following three groups:\n     *    local symbols (further grouped by the module they are from)\n     *    defined external symbols (further grouped by the module they are from)\n     *    undefined symbols\n     *\n     * The local symbols are used only for debugging.  The dynamic binding\n     * process may have to use them to indicate to the debugger the local\n     * symbols for a module that is being bound.\n     *\n     * The last two groups are used by the dynamic binding process to do the\n     * binding (indirectly through the module table and the reference symbol\n     * table when this is a dynamically linked shared library file).\n     */\n    uint32_t ilocalsym;\t/* index to local symbols */\n    uint32_t nlocalsym;\t/* number of local symbols */\n\n    uint32_t iextdefsym;/* index to externally defined symbols */\n    uint32_t nextdefsym;/* number of externally defined symbols */\n\n    uint32_t iundefsym;\t/* index to undefined symbols */\n    uint32_t nundefsym;\t/* number of undefined symbols */\n\n    /*\n     * For the for the dynamic binding process to find which module a symbol\n     * is defined in the table of contents is used (analogous to the ranlib\n     * structure in an archive) which maps defined external symbols to modules\n     * they are defined in.  This exists only in a dynamically linked shared\n     * library file.  For executable and object modules the defined external\n     * symbols are sorted by name and is use as the table of contents.\n     */\n    uint32_t tocoff;\t/* file offset to table of contents */\n    uint32_t ntoc;\t/* number of entries in table of contents */\n\n    /*\n     * To support dynamic binding of \"modules\" (whole object files) the symbol\n     * table must reflect the modules that the file was created from.  This is\n     * done by having a module table that has indexes and counts into the merged\n     * tables for each module.  The module structure that these two entries\n     * refer to is described below.  This exists only in a dynamically linked\n     * shared library file.  For executable and object modules the file only\n     * contains one module so everything in the file belongs to the module.\n     */\n    uint32_t modtaboff;\t/* file offset to module table */\n    uint32_t nmodtab;\t/* number of module table entries */\n\n    /*\n     * To support dynamic module binding the module structure for each module\n     * indicates the external references (defined and undefined) each module\n     * makes.  For each module there is an offset and a count into the\n     * reference symbol table for the symbols that the module references.\n     * This exists only in a dynamically linked shared library file.  For\n     * executable and object modules the defined external symbols and the\n     * undefined external symbols indicates the external references.\n     */\n    uint32_t extrefsymoff;\t/* offset to referenced symbol table */\n    uint32_t nextrefsyms;\t/* number of referenced symbol table entries */\n\n    /*\n     * The sections that contain \"symbol pointers\" and \"routine stubs\" have\n     * indexes and (implied counts based on the size of the section and fixed\n     * size of the entry) into the \"indirect symbol\" table for each pointer\n     * and stub.  For every section of these two types the index into the\n     * indirect symbol table is stored in the section header in the field\n     * reserved1.  An indirect symbol table entry is simply a 32bit index into\n     * the symbol table to the symbol that the pointer or stub is referring to.\n     * The indirect symbol table is ordered to match the entries in the section.\n     */\n    uint32_t indirectsymoff; /* file offset to the indirect symbol table */\n    uint32_t nindirectsyms;  /* number of indirect symbol table entries */\n\n    /*\n     * To support relocating an individual module in a library file quickly the\n     * external relocation entries for each module in the library need to be\n     * accessed efficiently.  Since the relocation entries can't be accessed\n     * through the section headers for a library file they are separated into\n     * groups of local and external entries further grouped by module.  In this\n     * case the presents of this load command who's extreloff, nextrel,\n     * locreloff and nlocrel fields are non-zero indicates that the relocation\n     * entries of non-merged sections are not referenced through the section\n     * structures (and the reloff and nreloc fields in the section headers are\n     * set to zero).\n     *\n     * Since the relocation entries are not accessed through the section headers\n     * this requires the r_address field to be something other than a section\n     * offset to identify the item to be relocated.  In this case r_address is\n     * set to the offset from the vmaddr of the first LC_SEGMENT command.\n     * For MH_SPLIT_SEGS images r_address is set to the the offset from the\n     * vmaddr of the first read-write LC_SEGMENT command.\n     *\n     * The relocation entries are grouped by module and the module table\n     * entries have indexes and counts into them for the group of external\n     * relocation entries for that the module.\n     *\n     * For sections that are merged across modules there must not be any\n     * remaining external relocation entries for them (for merged sections\n     * remaining relocation entries must be local).\n     */\n    uint32_t extreloff;\t/* offset to external relocation entries */\n    uint32_t nextrel;\t/* number of external relocation entries */\n\n    /*\n     * All the local relocation entries are grouped together (they are not\n     * grouped by their module since they are only used if the object is moved\n     * from it staticly link edited address).\n     */\n    uint32_t locreloff;\t/* offset to local relocation entries */\n    uint32_t nlocrel;\t/* number of local relocation entries */\n\n};\t\n\n/*\n * An indirect symbol table entry is simply a 32bit index into the symbol table \n * to the symbol that the pointer or stub is refering to.  Unless it is for a\n * non-lazy symbol pointer section for a defined symbol which strip(1) as \n * removed.  In which case it has the value INDIRECT_SYMBOL_LOCAL.  If the\n * symbol was also absolute INDIRECT_SYMBOL_ABS is or'ed with that.\n */\n#define INDIRECT_SYMBOL_LOCAL\t0x80000000\n#define INDIRECT_SYMBOL_ABS\t0x40000000\n\n\n/* a table of contents entry */\nstruct dylib_table_of_contents {\n    uint32_t symbol_index;\t/* the defined external symbol\n\t\t\t\t   (index into the symbol table) */\n    uint32_t module_index;\t/* index into the module table this symbol\n\t\t\t\t   is defined in */\n};\t\n\n/* a module table entry */\nstruct dylib_module {\n    uint32_t module_name;\t/* the module name (index into string table) */\n\n    uint32_t iextdefsym;\t/* index into externally defined symbols */\n    uint32_t nextdefsym;\t/* number of externally defined symbols */\n    uint32_t irefsym;\t\t/* index into reference symbol table */\n    uint32_t nrefsym;\t\t/* number of reference symbol table entries */\n    uint32_t ilocalsym;\t\t/* index into symbols for local symbols */\n    uint32_t nlocalsym;\t\t/* number of local symbols */\n\n    uint32_t iextrel;\t\t/* index into external relocation entries */\n    uint32_t nextrel;\t\t/* number of external relocation entries */\n\n    uint32_t iinit_iterm;\t/* low 16 bits are the index into the init\n\t\t\t\t   section, high 16 bits are the index into\n\t\t\t           the term section */\n    uint32_t ninit_nterm;\t/* low 16 bits are the number of init section\n\t\t\t\t   entries, high 16 bits are the number of\n\t\t\t\t   term section entries */\n\n    uint32_t\t\t\t/* for this module address of the start of */\n\tobjc_module_info_addr;  /*  the (__OBJC,__module_info) section */\n    uint32_t\t\t\t/* for this module size of */\n\tobjc_module_info_size;\t/*  the (__OBJC,__module_info) section */\n};\t\n\n/* a 64-bit module table entry */\nstruct dylib_module_64 {\n    uint32_t module_name;\t/* the module name (index into string table) */\n\n    uint32_t iextdefsym;\t/* index into externally defined symbols */\n    uint32_t nextdefsym;\t/* number of externally defined symbols */\n    uint32_t irefsym;\t\t/* index into reference symbol table */\n    uint32_t nrefsym;\t\t/* number of reference symbol table entries */\n    uint32_t ilocalsym;\t\t/* index into symbols for local symbols */\n    uint32_t nlocalsym;\t\t/* number of local symbols */\n\n    uint32_t iextrel;\t\t/* index into external relocation entries */\n    uint32_t nextrel;\t\t/* number of external relocation entries */\n\n    uint32_t iinit_iterm;\t/* low 16 bits are the index into the init\n\t\t\t\t   section, high 16 bits are the index into\n\t\t\t\t   the term section */\n    uint32_t ninit_nterm;      /* low 16 bits are the number of init section\n\t\t\t\t  entries, high 16 bits are the number of\n\t\t\t\t  term section entries */\n\n    uint32_t\t\t\t/* for this module size of */\n        objc_module_info_size;\t/*  the (__OBJC,__module_info) section */\n    uint64_t\t\t\t/* for this module address of the start of */\n        objc_module_info_addr;\t/*  the (__OBJC,__module_info) section */\n};\n\n/* \n * The entries in the reference symbol table are used when loading the module\n * (both by the static and dynamic link editors) and if the module is unloaded\n * or replaced.  Therefore all external symbols (defined and undefined) are\n * listed in the module's reference table.  The flags describe the type of\n * reference that is being made.  The constants for the flags are defined in\n * <mach-o/nlist.h> as they are also used for symbol table entries.\n */\nstruct dylib_reference {\n    uint32_t isym:24,\t\t/* index into the symbol table */\n    \t\t  flags:8;\t/* flags to indicate the type of reference */\n};\n\n/*\n * The twolevel_hints_command contains the offset and number of hints in the\n * two-level namespace lookup hints table.\n */\nstruct twolevel_hints_command {\n    uint32_t cmd;\t/* LC_TWOLEVEL_HINTS */\n    uint32_t cmdsize;\t/* sizeof(struct twolevel_hints_command) */\n    uint32_t offset;\t/* offset to the hint table */\n    uint32_t nhints;\t/* number of hints in the hint table */\n};\n\n/*\n * The entries in the two-level namespace lookup hints table are twolevel_hint\n * structs.  These provide hints to the dynamic link editor where to start\n * looking for an undefined symbol in a two-level namespace image.  The\n * isub_image field is an index into the sub-images (sub-frameworks and\n * sub-umbrellas list) that made up the two-level image that the undefined\n * symbol was found in when it was built by the static link editor.  If\n * isub-image is 0 the the symbol is expected to be defined in library and not\n * in the sub-images.  If isub-image is non-zero it is an index into the array\n * of sub-images for the umbrella with the first index in the sub-images being\n * 1. The array of sub-images is the ordered list of sub-images of the umbrella\n * that would be searched for a symbol that has the umbrella recorded as its\n * primary library.  The table of contents index is an index into the\n * library's table of contents.  This is used as the starting point of the\n * binary search or a directed linear search.\n */\nstruct twolevel_hint {\n    uint32_t \n\tisub_image:8,\t/* index into the sub images */\n\titoc:24;\t/* index into the table of contents */\n};\n\n/*\n * The prebind_cksum_command contains the value of the original check sum for\n * prebound files or zero.  When a prebound file is first created or modified\n * for other than updating its prebinding information the value of the check sum\n * is set to zero.  When the file has it prebinding re-done and if the value of\n * the check sum is zero the original check sum is calculated and stored in\n * cksum field of this load command in the output file.  If when the prebinding\n * is re-done and the cksum field is non-zero it is left unchanged from the\n * input file.\n */\nstruct prebind_cksum_command {\n    uint32_t cmd;\t/* LC_PREBIND_CKSUM */\n    uint32_t cmdsize;\t/* sizeof(struct prebind_cksum_command) */\n    uint32_t cksum;\t/* the check sum or zero */\n};\n\n/*\n * The uuid load command contains a single 128-bit unique random number that\n * identifies an object produced by the static link editor.\n */\nstruct uuid_command {\n    uint32_t\tcmd;\t\t/* LC_UUID */\n    uint32_t\tcmdsize;\t/* sizeof(struct uuid_command) */\n    uint8_t\tuuid[16];\t/* the 128-bit uuid */\n};\n\n/*\n * The rpath_command contains a path which at runtime should be added to\n * the current run path used to find @rpath prefixed dylibs.\n */\nstruct rpath_command {\n    uint32_t\t cmd;\t\t/* LC_RPATH */\n    uint32_t\t cmdsize;\t/* includes string */\n    union lc_str path;\t\t/* path to add to run path */\n};\n\n/*\n * The linkedit_data_command contains the offsets and sizes of a blob\n * of data in the __LINKEDIT segment.  \n */\nstruct linkedit_data_command {\n    uint32_t\tcmd;\t\t/* LC_CODE_SIGNATURE, LC_SEGMENT_SPLIT_INFO,\n\t\t\t\t   LC_FUNCTION_STARTS, LC_DATA_IN_CODE,\n\t\t\t\t   LC_DYLIB_CODE_SIGN_DRS,\n\t\t\t\t   LC_LINKER_OPTIMIZATION_HINT,\n\t\t\t\t   LC_DYLD_EXPORTS_TRIE, or\n\t\t\t\t   LC_DYLD_CHAINED_FIXUPS. */\n    uint32_t\tcmdsize;\t/* sizeof(struct linkedit_data_command) */\n    uint32_t\tdataoff;\t/* file offset of data in __LINKEDIT segment */\n    uint32_t\tdatasize;\t/* file size of data in __LINKEDIT segment  */\n};\n\n/*\n * The encryption_info_command contains the file offset and size of an\n * of an encrypted segment.\n */\nstruct encryption_info_command {\n   uint32_t\tcmd;\t\t/* LC_ENCRYPTION_INFO */\n   uint32_t\tcmdsize;\t/* sizeof(struct encryption_info_command) */\n   uint32_t\tcryptoff;\t/* file offset of encrypted range */\n   uint32_t\tcryptsize;\t/* file size of encrypted range */\n   uint32_t\tcryptid;\t/* which enryption system,\n\t\t\t\t   0 means not-encrypted yet */\n};\n\n/*\n * The encryption_info_command_64 contains the file offset and size of an\n * of an encrypted segment (for use in x86_64 targets).\n */\nstruct encryption_info_command_64 {\n   uint32_t\tcmd;\t\t/* LC_ENCRYPTION_INFO_64 */\n   uint32_t\tcmdsize;\t/* sizeof(struct encryption_info_command_64) */\n   uint32_t\tcryptoff;\t/* file offset of encrypted range */\n   uint32_t\tcryptsize;\t/* file size of encrypted range */\n   uint32_t\tcryptid;\t/* which enryption system,\n\t\t\t\t   0 means not-encrypted yet */\n   uint32_t\tpad;\t\t/* padding to make this struct's size a multiple\n\t\t\t\t   of 8 bytes */\n};\n\n/*\n * The version_min_command contains the min OS version on which this \n * binary was built to run.\n */\nstruct version_min_command {\n    uint32_t\tcmd;\t\t/* LC_VERSION_MIN_MACOSX or\n\t\t\t\t   LC_VERSION_MIN_IPHONEOS or\n\t\t\t\t   LC_VERSION_MIN_WATCHOS or\n\t\t\t\t   LC_VERSION_MIN_TVOS */\n    uint32_t\tcmdsize;\t/* sizeof(struct min_version_command) */\n    uint32_t\tversion;\t/* X.Y.Z is encoded in nibbles xxxx.yy.zz */\n    uint32_t\tsdk;\t\t/* X.Y.Z is encoded in nibbles xxxx.yy.zz */\n};\n\n/*\n * The build_version_command contains the min OS version on which this \n * binary was built to run for its platform.  The list of known platforms and\n * tool values following it.\n */\nstruct build_version_command {\n    uint32_t\tcmd;\t\t/* LC_BUILD_VERSION */\n    uint32_t\tcmdsize;\t/* sizeof(struct build_version_command) plus */\n\t\t\t\t/* ntools * sizeof(struct build_tool_version) */\n    uint32_t\tplatform;\t/* platform */\n    uint32_t\tminos;\t\t/* X.Y.Z is encoded in nibbles xxxx.yy.zz */\n    uint32_t\tsdk;\t\t/* X.Y.Z is encoded in nibbles xxxx.yy.zz */\n    uint32_t\tntools;\t\t/* number of tool entries following this */\n};\n\nstruct build_tool_version {\n    uint32_t\ttool;\t\t/* enum for the tool */\n    uint32_t\tversion;\t/* version number of the tool */\n};\n\n/* Known values for the platform field above. */\n#define PLATFORM_MACOS 1\n#define PLATFORM_IOS 2\n#define PLATFORM_TVOS 3\n#define PLATFORM_WATCHOS 4\n#define PLATFORM_BRIDGEOS 5\n#define PLATFORM_MACCATALYST 6\n#define PLATFORM_IOSSIMULATOR 7\n#define PLATFORM_TVOSSIMULATOR 8\n#define PLATFORM_WATCHOSSIMULATOR 9\n#define PLATFORM_DRIVERKIT 10\n\n\n\n/* Known values for the tool field above. */\n#define TOOL_CLANG 1\n#define TOOL_SWIFT 2\n#define TOOL_LD\t3\n\n/*\n * The dyld_info_command contains the file offsets and sizes of \n * the new compressed form of the information dyld needs to \n * load the image.  This information is used by dyld on Mac OS X\n * 10.6 and later.  All information pointed to by this command\n * is encoded using byte streams, so no endian swapping is needed\n * to interpret it. \n */\nstruct dyld_info_command {\n   uint32_t   cmd;\t\t/* LC_DYLD_INFO or LC_DYLD_INFO_ONLY */\n   uint32_t   cmdsize;\t\t/* sizeof(struct dyld_info_command) */\n\n    /*\n     * Dyld rebases an image whenever dyld loads it at an address different\n     * from its preferred address.  The rebase information is a stream\n     * of byte sized opcodes whose symbolic names start with REBASE_OPCODE_.\n     * Conceptually the rebase information is a table of tuples:\n     *    <seg-index, seg-offset, type>\n     * The opcodes are a compressed way to encode the table by only\n     * encoding when a column changes.  In addition simple patterns\n     * like \"every n'th offset for m times\" can be encoded in a few\n     * bytes.\n     */\n    uint32_t   rebase_off;\t/* file offset to rebase info  */\n    uint32_t   rebase_size;\t/* size of rebase info   */\n    \n    /*\n     * Dyld binds an image during the loading process, if the image\n     * requires any pointers to be initialized to symbols in other images.  \n     * The bind information is a stream of byte sized \n     * opcodes whose symbolic names start with BIND_OPCODE_.\n     * Conceptually the bind information is a table of tuples:\n     *    <seg-index, seg-offset, type, symbol-library-ordinal, symbol-name, addend>\n     * The opcodes are a compressed way to encode the table by only\n     * encoding when a column changes.  In addition simple patterns\n     * like for runs of pointers initialzed to the same value can be \n     * encoded in a few bytes.\n     */\n    uint32_t   bind_off;\t/* file offset to binding info   */\n    uint32_t   bind_size;\t/* size of binding info  */\n        \n    /*\n     * Some C++ programs require dyld to unique symbols so that all\n     * images in the process use the same copy of some code/data.\n     * This step is done after binding. The content of the weak_bind\n     * info is an opcode stream like the bind_info.  But it is sorted\n     * alphabetically by symbol name.  This enable dyld to walk \n     * all images with weak binding information in order and look\n     * for collisions.  If there are no collisions, dyld does\n     * no updating.  That means that some fixups are also encoded\n     * in the bind_info.  For instance, all calls to \"operator new\"\n     * are first bound to libstdc++.dylib using the information\n     * in bind_info.  Then if some image overrides operator new\n     * that is detected when the weak_bind information is processed\n     * and the call to operator new is then rebound.\n     */\n    uint32_t   weak_bind_off;\t/* file offset to weak binding info   */\n    uint32_t   weak_bind_size;  /* size of weak binding info  */\n    \n    /*\n     * Some uses of external symbols do not need to be bound immediately.\n     * Instead they can be lazily bound on first use.  The lazy_bind\n     * are contains a stream of BIND opcodes to bind all lazy symbols.\n     * Normal use is that dyld ignores the lazy_bind section when\n     * loading an image.  Instead the static linker arranged for the\n     * lazy pointer to initially point to a helper function which \n     * pushes the offset into the lazy_bind area for the symbol\n     * needing to be bound, then jumps to dyld which simply adds\n     * the offset to lazy_bind_off to get the information on what \n     * to bind.  \n     */\n    uint32_t   lazy_bind_off;\t/* file offset to lazy binding info */\n    uint32_t   lazy_bind_size;  /* size of lazy binding infs */\n    \n    /*\n     * The symbols exported by a dylib are encoded in a trie.  This\n     * is a compact representation that factors out common prefixes.\n     * It also reduces LINKEDIT pages in RAM because it encodes all  \n     * information (name, address, flags) in one small, contiguous range.\n     * The export area is a stream of nodes.  The first node sequentially\n     * is the start node for the trie.  \n     *\n     * Nodes for a symbol start with a uleb128 that is the length of\n     * the exported symbol information for the string so far.\n     * If there is no exported symbol, the node starts with a zero byte. \n     * If there is exported info, it follows the length.  \n     *\n     * First is a uleb128 containing flags. Normally, it is followed by\n     * a uleb128 encoded offset which is location of the content named\n     * by the symbol from the mach_header for the image.  If the flags\n     * is EXPORT_SYMBOL_FLAGS_REEXPORT, then following the flags is\n     * a uleb128 encoded library ordinal, then a zero terminated\n     * UTF8 string.  If the string is zero length, then the symbol\n     * is re-export from the specified dylib with the same name.\n     * If the flags is EXPORT_SYMBOL_FLAGS_STUB_AND_RESOLVER, then following\n     * the flags is two uleb128s: the stub offset and the resolver offset.\n     * The stub is used by non-lazy pointers.  The resolver is used\n     * by lazy pointers and must be called to get the actual address to use.\n     *\n     * After the optional exported symbol information is a byte of\n     * how many edges (0-255) that this node has leaving it, \n     * followed by each edge.\n     * Each edge is a zero terminated UTF8 of the addition chars\n     * in the symbol, followed by a uleb128 offset for the node that\n     * edge points to.\n     *  \n     */\n    uint32_t   export_off;\t/* file offset to lazy binding info */\n    uint32_t   export_size;\t/* size of lazy binding infs */\n};\n\n/*\n * The following are used to encode rebasing information\n */\n#define REBASE_TYPE_POINTER\t\t\t\t\t1\n#define REBASE_TYPE_TEXT_ABSOLUTE32\t\t\t\t2\n#define REBASE_TYPE_TEXT_PCREL32\t\t\t\t3\n\n#define REBASE_OPCODE_MASK\t\t\t\t\t0xF0\n#define REBASE_IMMEDIATE_MASK\t\t\t\t\t0x0F\n#define REBASE_OPCODE_DONE\t\t\t\t\t0x00\n#define REBASE_OPCODE_SET_TYPE_IMM\t\t\t\t0x10\n#define REBASE_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB\t\t0x20\n#define REBASE_OPCODE_ADD_ADDR_ULEB\t\t\t\t0x30\n#define REBASE_OPCODE_ADD_ADDR_IMM_SCALED\t\t\t0x40\n#define REBASE_OPCODE_DO_REBASE_IMM_TIMES\t\t\t0x50\n#define REBASE_OPCODE_DO_REBASE_ULEB_TIMES\t\t\t0x60\n#define REBASE_OPCODE_DO_REBASE_ADD_ADDR_ULEB\t\t\t0x70\n#define REBASE_OPCODE_DO_REBASE_ULEB_TIMES_SKIPPING_ULEB\t0x80\n\n\n/*\n * The following are used to encode binding information\n */\n#define BIND_TYPE_POINTER\t\t\t\t\t1\n#define BIND_TYPE_TEXT_ABSOLUTE32\t\t\t\t2\n#define BIND_TYPE_TEXT_PCREL32\t\t\t\t\t3\n\n#define BIND_SPECIAL_DYLIB_SELF\t\t\t\t\t 0\n#define BIND_SPECIAL_DYLIB_MAIN_EXECUTABLE\t\t\t-1\n#define BIND_SPECIAL_DYLIB_FLAT_LOOKUP\t\t\t\t-2\n#define BIND_SPECIAL_DYLIB_WEAK_LOOKUP\t\t\t\t-3\n\n#define BIND_SYMBOL_FLAGS_WEAK_IMPORT\t\t\t\t0x1\n#define BIND_SYMBOL_FLAGS_NON_WEAK_DEFINITION\t\t\t0x8\n\n#define BIND_OPCODE_MASK\t\t\t\t\t0xF0\n#define BIND_IMMEDIATE_MASK\t\t\t\t\t0x0F\n#define BIND_OPCODE_DONE\t\t\t\t\t0x00\n#define BIND_OPCODE_SET_DYLIB_ORDINAL_IMM\t\t\t0x10\n#define BIND_OPCODE_SET_DYLIB_ORDINAL_ULEB\t\t\t0x20\n#define BIND_OPCODE_SET_DYLIB_SPECIAL_IMM\t\t\t0x30\n#define BIND_OPCODE_SET_SYMBOL_TRAILING_FLAGS_IMM\t\t0x40\n#define BIND_OPCODE_SET_TYPE_IMM\t\t\t\t0x50\n#define BIND_OPCODE_SET_ADDEND_SLEB\t\t\t\t0x60\n#define BIND_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB\t\t\t0x70\n#define BIND_OPCODE_ADD_ADDR_ULEB\t\t\t\t0x80\n#define BIND_OPCODE_DO_BIND\t\t\t\t\t0x90\n#define BIND_OPCODE_DO_BIND_ADD_ADDR_ULEB\t\t\t0xA0\n#define BIND_OPCODE_DO_BIND_ADD_ADDR_IMM_SCALED\t\t\t0xB0\n#define BIND_OPCODE_DO_BIND_ULEB_TIMES_SKIPPING_ULEB\t\t0xC0\n#define\tBIND_OPCODE_THREADED\t\t\t\t\t0xD0\n#define\tBIND_SUBOPCODE_THREADED_SET_BIND_ORDINAL_TABLE_SIZE_ULEB 0x00\n#define\tBIND_SUBOPCODE_THREADED_APPLY\t\t\t\t 0x01\n\n\n/*\n * The following are used on the flags byte of a terminal node\n * in the export information.\n */\n#define EXPORT_SYMBOL_FLAGS_KIND_MASK\t\t\t\t0x03\n#define EXPORT_SYMBOL_FLAGS_KIND_REGULAR\t\t\t0x00\n#define EXPORT_SYMBOL_FLAGS_KIND_THREAD_LOCAL\t\t\t0x01\n#define EXPORT_SYMBOL_FLAGS_KIND_ABSOLUTE\t\t\t0x02\n#define EXPORT_SYMBOL_FLAGS_WEAK_DEFINITION\t\t\t0x04\n#define EXPORT_SYMBOL_FLAGS_REEXPORT\t\t\t\t0x08\n#define EXPORT_SYMBOL_FLAGS_STUB_AND_RESOLVER\t\t\t0x10\n#define EXPORT_SYMBOL_FLAGS_STATIC_RESOLVER\t\t\t0x20\n\n\n/*\n * The linker_option_command contains linker options embedded in object files.\n */\nstruct linker_option_command {\n    uint32_t  cmd;\t/* LC_LINKER_OPTION only used in MH_OBJECT filetypes */\n    uint32_t  cmdsize;\n    uint32_t  count;\t/* number of strings */\n    /* concatenation of zero terminated UTF8 strings.\n       Zero filled at end to align */\n};\n\n/*\n * The symseg_command contains the offset and size of the GNU style\n * symbol table information as described in the header file <symseg.h>.\n * The symbol roots of the symbol segments must also be aligned properly\n * in the file.  So the requirement of keeping the offsets aligned to a\n * multiple of a 4 bytes translates to the length field of the symbol\n * roots also being a multiple of a long.  Also the padding must again be\n * zeroed. (THIS IS OBSOLETE and no longer supported).\n */\nstruct symseg_command {\n\tuint32_t\tcmd;\t\t/* LC_SYMSEG */\n\tuint32_t\tcmdsize;\t/* sizeof(struct symseg_command) */\n\tuint32_t\toffset;\t\t/* symbol segment offset */\n\tuint32_t\tsize;\t\t/* symbol segment size in bytes */\n};\n\n/*\n * The ident_command contains a free format string table following the\n * ident_command structure.  The strings are null terminated and the size of\n * the command is padded out with zero bytes to a multiple of 4 bytes/\n * (THIS IS OBSOLETE and no longer supported).\n */\nstruct ident_command {\n\tuint32_t cmd;\t\t/* LC_IDENT */\n\tuint32_t cmdsize;\t/* strings that follow this command */\n};\n\n/*\n * The fvmfile_command contains a reference to a file to be loaded at the\n * specified virtual address.  (Presently, this command is reserved for\n * internal use.  The kernel ignores this command when loading a program into\n * memory).\n */\nstruct fvmfile_command {\n\tuint32_t cmd;\t\t\t/* LC_FVMFILE */\n\tuint32_t cmdsize;\t\t/* includes pathname string */\n\tunion lc_str\tname;\t\t/* files pathname */\n\tuint32_t\theader_addr;\t/* files virtual address */\n};\n\n\n/*\n * The entry_point_command is a replacement for thread_command.\n * It is used for main executables to specify the location (file offset)\n * of main().  If -stack_size was used at link time, the stacksize\n * field will contain the stack size need for the main thread.\n */\nstruct entry_point_command {\n    uint32_t  cmd;\t/* LC_MAIN only used in MH_EXECUTE filetypes */\n    uint32_t  cmdsize;\t/* 24 */\n    uint64_t  entryoff;\t/* file (__TEXT) offset of main() */\n    uint64_t  stacksize;/* if not zero, initial stack size */\n};\n\n\n/*\n * The source_version_command is an optional load command containing\n * the version of the sources used to build the binary.\n */\nstruct source_version_command {\n    uint32_t  cmd;\t/* LC_SOURCE_VERSION */\n    uint32_t  cmdsize;\t/* 16 */\n    uint64_t  version;\t/* A.B.C.D.E packed as a24.b10.c10.d10.e10 */\n};\n\n\n/*\n * The LC_DATA_IN_CODE load commands uses a linkedit_data_command \n * to point to an array of data_in_code_entry entries. Each entry\n * describes a range of data in a code section.\n */\nstruct data_in_code_entry {\n    uint32_t\toffset;  /* from mach_header to start of data range*/\n    uint16_t\tlength;  /* number of bytes in data range */\n    uint16_t\tkind;    /* a DICE_KIND_* value  */\n};\n#define DICE_KIND_DATA              0x0001\n#define DICE_KIND_JUMP_TABLE8       0x0002\n#define DICE_KIND_JUMP_TABLE16      0x0003\n#define DICE_KIND_JUMP_TABLE32      0x0004\n#define DICE_KIND_ABS_JUMP_TABLE32  0x0005\n\n\n\n/*\n * Sections of type S_THREAD_LOCAL_VARIABLES contain an array \n * of tlv_descriptor structures.\n */\nstruct tlv_descriptor\n{\n\tvoid*\t\t(*thunk)(struct tlv_descriptor*);\n\tunsigned long\tkey;\n\tunsigned long\toffset;\n};\n\n/*\n * LC_NOTE commands describe a region of arbitrary data included in a Mach-O\n * file.  Its initial use is to record extra data in MH_CORE files.\n */\nstruct note_command {\n    uint32_t\tcmd;\t\t/* LC_NOTE */\n    uint32_t\tcmdsize;\t/* sizeof(struct note_command) */\n    char\tdata_owner[16];\t/* owner name for this LC_NOTE */\n    uint64_t\toffset;\t\t/* file offset of this data */\n    uint64_t\tsize;\t\t/* length of data region */\n};\n\n/*\n * LC_FILESET_ENTRY commands describe constituent Mach-O files that are part\n * of a fileset. In one implementation, entries are dylibs with individual\n * mach headers and repositionable text and data segments. Each entry is\n * further described by its own mach header.\n */\nstruct fileset_entry_command {\n    uint32_t     cmd;        /* LC_FILESET_ENTRY */\n    uint32_t     cmdsize;    /* includes entry_id string */\n    uint64_t     vmaddr;     /* memory address of the entry */\n    uint64_t     fileoff;    /* file offset of the entry */\n    union lc_str entry_id;   /* contained entry id */\n    uint32_t     reserved;   /* reserved */\n};\n\n/*\n * These deprecated values may still be used within Apple but are mechanically\n * removed from public API. The mechanical process may produce unusual results.\n */\n#if (!defined(PLATFORM_MACCATALYST))\n#define PLATFORM_MACCATALYST PLATFORM_MACCATALYST\n#endif\n\n#endif /* _MACHO_LOADER_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/mach-o/module.modulemap",
    "content": "module MachO [system] [extern_c] {\n\n  extern module dyld \"dyld.modulemap\"\n\n  extern module compact_unwind_encoding \"compact_unwind_encoding.modulemap\"\n\n  export *\n\n  module arch {\n    header \"arch.h\"\n    export *\n  }\n\n  module fat {\n    header \"fat.h\"\n    export *\n  }\n\n  module getsect {\n    header \"getsect.h\"\n    export *\n  }\n\n  module ldsyms {\n    header \"ldsyms.h\"\n    export *\n  }\n\n  module loader {\n    header \"loader.h\"\n    export *\n  }\n\n  module nlist {\n    header \"nlist.h\"\n    export *\n  }\n\n  module ranlib {\n    header \"ranlib.h\"\n    export *\n  }\n\n  module reloc {\n    header \"reloc.h\"\n    export *\n  }\n\n  module stab {\n    header \"stab.h\"\n    export *\n  }\n\n  module swap {\n    header \"swap.h\"\n    export *\n  }\n}\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/mach-o/nlist.h",
    "content": "/*\n * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.\n * \n * @APPLE_LICENSE_HEADER_START@\n * \n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this\n * file.\n * \n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n * \n * @APPLE_LICENSE_HEADER_END@\n */\n#ifndef _MACHO_NLIST_H_\n#define _MACHO_NLIST_H_\n/*\t$NetBSD: nlist.h,v 1.5 1994/10/26 00:56:11 cgd Exp $\t*/\n\n/*-\n * Copyright (c) 1991, 1993\n *\tThe Regents of the University of California.  All rights reserved.\n * (c) UNIX System Laboratories, Inc.\n * All or some portions of this file are derived from material licensed\n * to the University of California by American Telephone and Telegraph\n * Co. or Unix System Laboratories, Inc. and are reproduced herein with\n * the permission of UNIX System Laboratories, Inc.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *\tThis product includes software developed by the University of\n *\tCalifornia, Berkeley and its contributors.\n * 4. Neither the name of the University nor the names of its contributors\n *    may be used to endorse or promote products derived from this software\n *    without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n *\t@(#)nlist.h\t8.2 (Berkeley) 1/21/94\n */\n#include <stdint.h>\n\n/*\n * Format of a symbol table entry of a Mach-O file for 32-bit architectures.\n * Modified from the BSD format.  The modifications from the original format\n * were changing n_other (an unused field) to n_sect and the addition of the\n * N_SECT type.  These modifications are required to support symbols in a larger\n * number of sections not just the three sections (text, data and bss) in a BSD\n * file.\n */\nstruct nlist {\n\tunion {\n#ifndef __LP64__\n\t\tchar *n_name;\t/* for use when in-core */\n#endif\n\t\tuint32_t n_strx;\t/* index into the string table */\n\t} n_un;\n\tuint8_t n_type;\t\t/* type flag, see below */\n\tuint8_t n_sect;\t\t/* section number or NO_SECT */\n\tint16_t n_desc;\t\t/* see <mach-o/stab.h> */\n\tuint32_t n_value;\t/* value of this symbol (or stab offset) */\n};\n\n/*\n * This is the symbol table entry structure for 64-bit architectures.\n */\nstruct nlist_64 {\n    union {\n        uint32_t  n_strx; /* index into the string table */\n    } n_un;\n    uint8_t n_type;        /* type flag, see below */\n    uint8_t n_sect;        /* section number or NO_SECT */\n    uint16_t n_desc;       /* see <mach-o/stab.h> */\n    uint64_t n_value;      /* value of this symbol (or stab offset) */\n};\n\n/*\n * Symbols with a index into the string table of zero (n_un.n_strx == 0) are\n * defined to have a null, \"\", name.  Therefore all string indexes to non null\n * names must not have a zero string index.  This is bit historical information\n * that has never been well documented.\n */\n\n/*\n * The n_type field really contains four fields:\n *\tunsigned char N_STAB:3,\n *\t\t      N_PEXT:1,\n *\t\t      N_TYPE:3,\n *\t\t      N_EXT:1;\n * which are used via the following masks.\n */\n#define\tN_STAB\t0xe0  /* if any of these bits set, a symbolic debugging entry */\n#define\tN_PEXT\t0x10  /* private external symbol bit */\n#define\tN_TYPE\t0x0e  /* mask for the type bits */\n#define\tN_EXT\t0x01  /* external symbol bit, set for external symbols */\n\n/*\n * Only symbolic debugging entries have some of the N_STAB bits set and if any\n * of these bits are set then it is a symbolic debugging entry (a stab).  In\n * which case then the values of the n_type field (the entire field) are given\n * in <mach-o/stab.h>\n */\n\n/*\n * Values for N_TYPE bits of the n_type field.\n */\n#define\tN_UNDF\t0x0\t\t/* undefined, n_sect == NO_SECT */\n#define\tN_ABS\t0x2\t\t/* absolute, n_sect == NO_SECT */\n#define\tN_SECT\t0xe\t\t/* defined in section number n_sect */\n#define\tN_PBUD\t0xc\t\t/* prebound undefined (defined in a dylib) */\n#define N_INDR\t0xa\t\t/* indirect */\n\n/* \n * If the type is N_INDR then the symbol is defined to be the same as another\n * symbol.  In this case the n_value field is an index into the string table\n * of the other symbol's name.  When the other symbol is defined then they both\n * take on the defined type and value.\n */\n\n/*\n * If the type is N_SECT then the n_sect field contains an ordinal of the\n * section the symbol is defined in.  The sections are numbered from 1 and \n * refer to sections in order they appear in the load commands for the file\n * they are in.  This means the same ordinal may very well refer to different\n * sections in different files.\n *\n * The n_value field for all symbol table entries (including N_STAB's) gets\n * updated by the link editor based on the value of it's n_sect field and where\n * the section n_sect references gets relocated.  If the value of the n_sect \n * field is NO_SECT then it's n_value field is not changed by the link editor.\n */\n#define\tNO_SECT\t\t0\t/* symbol is not in any section */\n#define MAX_SECT\t255\t/* 1 thru 255 inclusive */\n\n/*\n * Common symbols are represented by undefined (N_UNDF) external (N_EXT) types\n * who's values (n_value) are non-zero.  In which case the value of the n_value\n * field is the size (in bytes) of the common symbol.  The n_sect field is set\n * to NO_SECT.  The alignment of a common symbol may be set as a power of 2\n * between 2^1 and 2^15 as part of the n_desc field using the macros below. If\n * the alignment is not set (a value of zero) then natural alignment based on\n * the size is used.\n */\n#define GET_COMM_ALIGN(n_desc) (((n_desc) >> 8) & 0x0f)\n#define SET_COMM_ALIGN(n_desc,align) \\\n    (n_desc) = (((n_desc) & 0xf0ff) | (((align) & 0x0f) << 8))\n\n/*\n * To support the lazy binding of undefined symbols in the dynamic link-editor,\n * the undefined symbols in the symbol table (the nlist structures) are marked\n * with the indication if the undefined reference is a lazy reference or\n * non-lazy reference.  If both a non-lazy reference and a lazy reference is\n * made to the same symbol the non-lazy reference takes precedence.  A reference\n * is lazy only when all references to that symbol are made through a symbol\n * pointer in a lazy symbol pointer section.\n *\n * The implementation of marking nlist structures in the symbol table for\n * undefined symbols will be to use some of the bits of the n_desc field as a\n * reference type.  The mask REFERENCE_TYPE will be applied to the n_desc field\n * of an nlist structure for an undefined symbol to determine the type of\n * undefined reference (lazy or non-lazy).\n *\n * The constants for the REFERENCE FLAGS are propagated to the reference table\n * in a shared library file.  In that case the constant for a defined symbol,\n * REFERENCE_FLAG_DEFINED, is also used.\n */\n/* Reference type bits of the n_desc field of undefined symbols */\n#define REFERENCE_TYPE\t\t\t\t0x7\n/* types of references */\n#define REFERENCE_FLAG_UNDEFINED_NON_LAZY\t\t0\n#define REFERENCE_FLAG_UNDEFINED_LAZY\t\t\t1\n#define REFERENCE_FLAG_DEFINED\t\t\t\t2\n#define REFERENCE_FLAG_PRIVATE_DEFINED\t\t\t3\n#define REFERENCE_FLAG_PRIVATE_UNDEFINED_NON_LAZY\t4\n#define REFERENCE_FLAG_PRIVATE_UNDEFINED_LAZY\t\t5\n\n/*\n * To simplify stripping of objects that use are used with the dynamic link\n * editor, the static link editor marks the symbols defined an object that are\n * referenced by a dynamicly bound object (dynamic shared libraries, bundles).\n * With this marking strip knows not to strip these symbols.\n */\n#define REFERENCED_DYNAMICALLY\t0x0010\n\n/*\n * For images created by the static link editor with the -twolevel_namespace\n * option in effect the flags field of the mach header is marked with\n * MH_TWOLEVEL.  And the binding of the undefined references of the image are\n * determined by the static link editor.  Which library an undefined symbol is\n * bound to is recorded by the static linker in the high 8 bits of the n_desc\n * field using the SET_LIBRARY_ORDINAL macro below.  The ordinal recorded\n * references the libraries listed in the Mach-O's LC_LOAD_DYLIB,\n * LC_LOAD_WEAK_DYLIB, LC_REEXPORT_DYLIB, LC_LOAD_UPWARD_DYLIB, and\n * LC_LAZY_LOAD_DYLIB, etc. load commands in the order they appear in the\n * headers.   The library ordinals start from 1.\n * For a dynamic library that is built as a two-level namespace image the\n * undefined references from module defined in another use the same nlist struct\n * an in that case SELF_LIBRARY_ORDINAL is used as the library ordinal.  For\n * defined symbols in all images they also must have the library ordinal set to\n * SELF_LIBRARY_ORDINAL.  The EXECUTABLE_ORDINAL refers to the executable\n * image for references from plugins that refer to the executable that loads\n * them.\n * \n * The DYNAMIC_LOOKUP_ORDINAL is for undefined symbols in a two-level namespace\n * image that are looked up by the dynamic linker with flat namespace semantics.\n * This ordinal was added as a feature in Mac OS X 10.3 by reducing the\n * value of MAX_LIBRARY_ORDINAL by one.  So it is legal for existing binaries\n * or binaries built with older tools to have 0xfe (254) dynamic libraries.  In\n * this case the ordinal value 0xfe (254) must be treated as a library ordinal\n * for compatibility. \n */\n#define GET_LIBRARY_ORDINAL(n_desc) (((n_desc) >> 8) & 0xff)\n#define SET_LIBRARY_ORDINAL(n_desc,ordinal) \\\n\t(n_desc) = (((n_desc) & 0x00ff) | (((ordinal) & 0xff) << 8))\n#define SELF_LIBRARY_ORDINAL 0x0\n#define MAX_LIBRARY_ORDINAL 0xfd\n#define DYNAMIC_LOOKUP_ORDINAL 0xfe\n#define EXECUTABLE_ORDINAL 0xff\n\n/*\n * The bit 0x0020 of the n_desc field is used for two non-overlapping purposes\n * and has two different symbolic names, N_NO_DEAD_STRIP and N_DESC_DISCARDED.\n */\n\n/*\n * The N_NO_DEAD_STRIP bit of the n_desc field only ever appears in a \n * relocatable .o file (MH_OBJECT filetype). And is used to indicate to the\n * static link editor it is never to dead strip the symbol.\n */\n#define N_NO_DEAD_STRIP 0x0020 /* symbol is not to be dead stripped */\n\n/*\n * The N_DESC_DISCARDED bit of the n_desc field never appears in linked image.\n * But is used in very rare cases by the dynamic link editor to mark an in\n * memory symbol as discared and longer used for linking.\n */\n#define N_DESC_DISCARDED 0x0020\t/* symbol is discarded */\n\n/*\n * The N_WEAK_REF bit of the n_desc field indicates to the dynamic linker that\n * the undefined symbol is allowed to be missing and is to have the address of\n * zero when missing.\n */\n#define N_WEAK_REF\t0x0040 /* symbol is weak referenced */\n\n/*\n * The N_WEAK_DEF bit of the n_desc field indicates to the static and dynamic\n * linkers that the symbol definition is weak, allowing a non-weak symbol to\n * also be used which causes the weak definition to be discared.  Currently this\n * is only supported for symbols in coalesed sections.\n */\n#define N_WEAK_DEF\t0x0080 /* coalesed symbol is a weak definition */\n\n/*\n * The N_REF_TO_WEAK bit of the n_desc field indicates to the dynamic linker\n * that the undefined symbol should be resolved using flat namespace searching.\n */\n#define\tN_REF_TO_WEAK\t0x0080 /* reference to a weak symbol */\n\n/*\n * The N_ARM_THUMB_DEF bit of the n_desc field indicates that the symbol is\n * a defintion of a Thumb function.\n */\n#define N_ARM_THUMB_DEF\t0x0008 /* symbol is a Thumb function (ARM) */\n\n/*\n * The N_SYMBOL_RESOLVER bit of the n_desc field indicates that the\n * that the function is actually a resolver function and should\n * be called to get the address of the real function to use.\n * This bit is only available in .o files (MH_OBJECT filetype)\n */\n#define N_SYMBOL_RESOLVER  0x0100 \n\n/*\n * The N_ALT_ENTRY bit of the n_desc field indicates that the\n * symbol is pinned to the previous content.\n */\n#define N_ALT_ENTRY 0x0200\n\n/*\n * The N_COLD_FUNC bit of the n_desc field indicates that the symbol is used\n * infrequently and the linker should order it towards the end of the section.\n */\n#define N_COLD_FUNC 0x0400\n\n#ifndef __STRICT_BSD__\n#ifdef __cplusplus\nextern \"C\" {\n#endif /* __cplusplus */\n/*\n * The function nlist(3) from the C library.\n */\nextern int nlist (const char *filename, struct nlist *list);\n#ifdef __cplusplus\n}\n#endif /* __cplusplus */\n#endif /* __STRICT_BSD__ */\n\n#endif /* _MACHO_LIST_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/mach-o/ranlib.h",
    "content": "/*\n * Copyright (c) 2016 Apple, Inc. All rights reserved.\n *\n * @APPLE_LICENSE_HEADER_START@\n * \n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this\n * file.\n * \n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n * \n * @APPLE_LICENSE_HEADER_END@\n */\n/*\tranlib.h\t4.1\t83/05/03\t*/\n#ifndef _MACH_O_RANLIB_H_\n#define _MACH_O_RANLIB_H_\n\n#include <stdint.h>\n#include <sys/types.h>\t\t/* off_t */\n\n/*\n * There are two known orders of table of contents for archives.  The first is\n * the order ranlib(1) originally produced and still produces without any\n * options.  This table of contents has the archive member name \"__.SYMDEF\"\n * This order has the ranlib structures in the order the objects appear in the\n * archive and the symbol names of those objects in the order of symbol table.\n * The second know order is sorted by symbol name and is produced with the -s\n * option to ranlib(1).  This table of contents has the archive member name\n * \"__.SYMDEF SORTED\" and many programs (notably the 1.0 version of ld(1) can't\n * tell the difference between names because of the imbedded blank in the name\n * and works with either table of contents).  This second order is used by the\n * post 1.0 link editor to produce faster linking.  The original 1.0 version of\n * ranlib(1) gets confused when it is run on a archive with the second type of\n * table of contents because it and ar(1) which it uses use different ways to\n * determined the member name (ar(1) treats all blanks in the name as\n * significant and ranlib(1) only checks for the first one).\n */\n#define SYMDEF\t\t\"__.SYMDEF\"\n#define SYMDEF_SORTED\t\"__.SYMDEF SORTED\"\n\n/*\n * Structure of the __.SYMDEF table of contents for an archive.\n * __.SYMDEF begins with a uint32_t giving the size in bytes of the ranlib\n * structures which immediately follow, and then continues with a string\n * table consisting of a uint32_t giving the number of bytes of strings which\n * follow and then the strings themselves.  The ran_strx fields index the\n * string table whose first byte is numbered 0.\n */\nstruct\tranlib {\n    union {\n\tuint32_t\tran_strx;\t/* string table index of */\n#ifndef __LP64__\n\tchar\t\t*ran_name;\t/* symbol defined by */\n#endif\n    } ran_un;\n    uint32_t\t\tran_off;\t/* library member at this offset */\n};\n\n#define SYMDEF_64\t\t\"__.SYMDEF_64\"\n#define SYMDEF_64_SORTED\t\"__.SYMDEF_64 SORTED\"\n\n/*\n * The support for the 64-bit table of contents described here is a work in\n * progress and not yet fully supported in all the Apple Developer Tools.\n *\n * When an archive offset to a library member is more than 32-bits then this is\n * the structure of the __.SYMDEF_64 table of contents for an archive.\n * __.SYMDEF_64 begins with a uint64_t giving the size in bytes of the ranlib\n * structures which immediately follow, and then continues with a string\n * table consisting of a uint64_t giving the number of bytes of strings which\n * follow and then the strings themselves.  The ran_strx fields index the\n * string table whose first byte is numbered 0.\n */\n\nstruct\tranlib_64 {\n    union {\n\tuint64_t\tran_strx;\t/* string table index of */\n    } ran_un;\n    uint64_t\t\tran_off;\t/* library member at this offset */\n};\n#endif /* _MACH_O_RANLIB_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/mach-o/reloc.h",
    "content": "/*\n * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_LICENSE_HEADER_START@\n * \n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this\n * file.\n * \n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n * \n * @APPLE_LICENSE_HEADER_END@\n */\n/*\t$NetBSD: exec.h,v 1.6 1994/10/27 04:16:05 cgd Exp $\t*/\n\n/*\n * Copyright (c) 1993 Christopher G. Demetriou\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. The name of the author may not be used to endorse or promote products\n *    derived from this software without specific prior written permission\n *\n * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,\n * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\n * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n#ifndef _MACHO_RELOC_H_\n#define _MACHO_RELOC_H_\n#include <stdint.h>\n\n/*\n * Format of a relocation entry of a Mach-O file.  Modified from the 4.3BSD\n * format.  The modifications from the original format were changing the value\n * of the r_symbolnum field for \"local\" (r_extern == 0) relocation entries.\n * This modification is required to support symbols in an arbitrary number of\n * sections not just the three sections (text, data and bss) in a 4.3BSD file.\n * Also the last 4 bits have had the r_type tag added to them.\n */\nstruct relocation_info {\n   int32_t\tr_address;\t/* offset in the section to what is being\n\t\t\t\t   relocated */\n   uint32_t     r_symbolnum:24,\t/* symbol index if r_extern == 1 or section\n\t\t\t\t   ordinal if r_extern == 0 */\n\t\tr_pcrel:1, \t/* was relocated pc relative already */\n\t\tr_length:2,\t/* 0=byte, 1=word, 2=long, 3=quad */\n\t\tr_extern:1,\t/* does not include value of sym referenced */\n\t\tr_type:4;\t/* if not 0, machine specific relocation type */\n};\n#define\tR_ABS\t0\t\t/* absolute relocation type for Mach-O files */\n\n/*\n * The r_address is not really the address as it's name indicates but an offset.\n * In 4.3BSD a.out objects this offset is from the start of the \"segment\" for\n * which relocation entry is for (text or data).  For Mach-O object files it is\n * also an offset but from the start of the \"section\" for which the relocation\n * entry is for.  See comments in <mach-o/loader.h> about the r_address feild\n * in images for used with the dynamic linker.\n * \n * In 4.3BSD a.out objects if r_extern is zero then r_symbolnum is an ordinal\n * for the segment the symbol being relocated is in.  These ordinals are the\n * symbol types N_TEXT, N_DATA, N_BSS or N_ABS.  In Mach-O object files these\n * ordinals refer to the sections in the object file in the order their section\n * structures appear in the headers of the object file they are in.  The first\n * section has the ordinal 1, the second 2, and so on.  This means that the\n * same ordinal in two different object files could refer to two different\n * sections.  And further could have still different ordinals when combined\n * by the link-editor.  The value R_ABS is used for relocation entries for\n * absolute symbols which need no further relocation.\n */\n\n/*\n * For RISC machines some of the references are split across two instructions\n * and the instruction does not contain the complete value of the reference.\n * In these cases a second, or paired relocation entry, follows each of these\n * relocation entries, using a PAIR r_type, which contains the other part of the\n * reference not contained in the instruction.  This other part is stored in the\n * pair's r_address field.  The exact number of bits of the other part of the\n * reference store in the r_address field is dependent on the particular\n * relocation type for the particular architecture.\n */\n\n/*\n * To make scattered loading by the link editor work correctly \"local\"\n * relocation entries can't be used when the item to be relocated is the value\n * of a symbol plus an offset (where the resulting expresion is outside the\n * block the link editor is moving, a blocks are divided at symbol addresses).\n * In this case. where the item is a symbol value plus offset, the link editor\n * needs to know more than just the section the symbol was defined.  What is\n * needed is the actual value of the symbol without the offset so it can do the\n * relocation correctly based on where the value of the symbol got relocated to\n * not the value of the expression (with the offset added to the symbol value).\n * So for the NeXT 2.0 release no \"local\" relocation entries are ever used when\n * there is a non-zero offset added to a symbol.  The \"external\" and \"local\"\n * relocation entries remain unchanged.\n *\n * The implemention is quite messy given the compatibility with the existing\n * relocation entry format.  The ASSUMPTION is that a section will never be\n * bigger than 2**24 - 1 (0x00ffffff or 16,777,215) bytes.  This assumption\n * allows the r_address (which is really an offset) to fit in 24 bits and high\n * bit of the r_address field in the relocation_info structure to indicate\n * it is really a scattered_relocation_info structure.  Since these are only\n * used in places where \"local\" relocation entries are used and not where\n * \"external\" relocation entries are used the r_extern field has been removed.\n *\n * For scattered loading to work on a RISC machine where some of the references\n * are split across two instructions the link editor needs to be assured that\n * each reference has a unique 32 bit reference (that more than one reference is\n * NOT sharing the same high 16 bits for example) so it move each referenced\n * item independent of each other.  Some compilers guarantees this but the\n * compilers don't so scattered loading can be done on those that do guarantee\n * this.\n */\n#if defined(__BIG_ENDIAN__) || defined(__LITTLE_ENDIAN__)\n/*\n * The reason for the ifdef's of __BIG_ENDIAN__ and __LITTLE_ENDIAN__ are that\n * when stattered relocation entries were added the mistake of using a mask\n * against a structure that is made up of bit fields was used.  To make this\n * design work this structure must be laid out in memory the same way so the\n * mask can be applied can check the same bit each time (r_scattered).\n */\n#endif /* defined(__BIG_ENDIAN__) || defined(__LITTLE_ENDIAN__) */\n#define R_SCATTERED 0x80000000\t/* mask to be applied to the r_address field \n\t\t\t\t   of a relocation_info structure to tell that\n\t\t\t\t   is is really a scattered_relocation_info\n\t\t\t\t   stucture */\nstruct scattered_relocation_info {\n#ifdef __BIG_ENDIAN__\n   uint32_t\tr_scattered:1,\t/* 1=scattered, 0=non-scattered (see above) */\n\t\tr_pcrel:1, \t/* was relocated pc relative already */\n\t\tr_length:2,\t/* 0=byte, 1=word, 2=long, 3=quad */\n\t\tr_type:4,\t/* if not 0, machine specific relocation type */\n   \t\tr_address:24;\t/* offset in the section to what is being\n\t\t\t\t   relocated */\n   int32_t\tr_value;\t/* the value the item to be relocated is\n\t\t\t\t   refering to (without any offset added) */\n#endif /* __BIG_ENDIAN__ */\n#ifdef __LITTLE_ENDIAN__\n   uint32_t\n   \t\tr_address:24,\t/* offset in the section to what is being\n\t\t\t\t   relocated */\n\t\tr_type:4,\t/* if not 0, machine specific relocation type */\n\t\tr_length:2,\t/* 0=byte, 1=word, 2=long, 3=quad */\n\t\tr_pcrel:1, \t/* was relocated pc relative already */\n\t\tr_scattered:1;\t/* 1=scattered, 0=non-scattered (see above) */\n   int32_t\tr_value;\t/* the value the item to be relocated is\n\t\t\t\t   refering to (without any offset added) */\n#endif /* __LITTLE_ENDIAN__ */\n};\n\n/*\n * Relocation types used in a generic implementation.  Relocation entries for\n * normal things use the generic relocation as discribed above and their r_type\n * is GENERIC_RELOC_VANILLA (a value of zero).\n *\n * Another type of generic relocation, GENERIC_RELOC_SECTDIFF, is to support\n * the difference of two symbols defined in different sections.  That is the\n * expression \"symbol1 - symbol2 + constant\" is a relocatable expression when\n * both symbols are defined in some section.  For this type of relocation the\n * both relocations entries are scattered relocation entries.  The value of\n * symbol1 is stored in the first relocation entry's r_value field and the\n * value of symbol2 is stored in the pair's r_value field.\n *\n * A special case for a prebound lazy pointer is needed to beable to set the\n * value of the lazy pointer back to its non-prebound state.  This is done\n * using the GENERIC_RELOC_PB_LA_PTR r_type.  This is a scattered relocation\n * entry where the r_value feild is the value of the lazy pointer not prebound.\n */\nenum reloc_type_generic\n{\n    GENERIC_RELOC_VANILLA,\t/* generic relocation as discribed above */\n    GENERIC_RELOC_PAIR,\t\t/* Only follows a GENERIC_RELOC_SECTDIFF */\n    GENERIC_RELOC_SECTDIFF,\n    GENERIC_RELOC_PB_LA_PTR,\t/* prebound lazy pointer */\n    GENERIC_RELOC_LOCAL_SECTDIFF,\n    GENERIC_RELOC_TLV\t\t/* thread local variables */\n};\n\n#endif /* _MACHO_RELOC_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/mach-o/stab.h",
    "content": "/*\n * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_LICENSE_HEADER_START@\n * \n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this\n * file.\n * \n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n * \n * @APPLE_LICENSE_HEADER_END@\n */\n#ifndef _MACHO_STAB_H_\n#define _MACHO_STAB_H_\n/*\t$NetBSD: stab.h,v 1.4 1994/10/26 00:56:25 cgd Exp $\t*/\n\n/*-\n * Copyright (c) 1991 The Regents of the University of California.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *\tThis product includes software developed by the University of\n *\tCalifornia, Berkeley and its contributors.\n * 4. Neither the name of the University nor the names of its contributors\n *    may be used to endorse or promote products derived from this software\n *    without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n *\t@(#)stab.h\t5.2 (Berkeley) 4/4/91\n */\n\n/*\n * This file gives definitions supplementing <nlist.h> for permanent symbol\n * table entries of Mach-O files.  Modified from the BSD definitions.  The\n * modifications from the original definitions were changing what the values of\n * what was the n_other field (an unused field) which is now the n_sect field.\n * These modifications are required to support symbols in an arbitrary number of\n * sections not just the three sections (text, data and bss) in a BSD file.\n * The values of the defined constants have NOT been changed.\n *\n * These must have one of the N_STAB bits on.  The n_value fields are subject\n * to relocation according to the value of their n_sect field.  So for types\n * that refer to things in sections the n_sect field must be filled in with the\n * proper section ordinal.  For types that are not to have their n_value field \n * relocatated the n_sect field must be NO_SECT.\n */\n\n/*\n * Symbolic debugger symbols.  The comments give the conventional use for\n * \n * \t.stabs \"n_name\", n_type, n_sect, n_desc, n_value\n *\n * where n_type is the defined constant and not listed in the comment.  Other\n * fields not listed are zero. n_sect is the section ordinal the entry is\n * refering to.\n */\n#define\tN_GSYM\t0x20\t/* global symbol: name,,NO_SECT,type,0 */\n#define\tN_FNAME\t0x22\t/* procedure name (f77 kludge): name,,NO_SECT,0,0 */\n#define\tN_FUN\t0x24\t/* procedure: name,,n_sect,linenumber,address */\n#define\tN_STSYM\t0x26\t/* static symbol: name,,n_sect,type,address */\n#define\tN_LCSYM\t0x28\t/* .lcomm symbol: name,,n_sect,type,address */\n#define N_BNSYM 0x2e\t/* begin nsect sym: 0,,n_sect,0,address */\n#define N_AST\t0x32\t/* AST file path: name,,NO_SECT,0,0 */\n#define N_OPT\t0x3c\t/* emitted with gcc2_compiled and in gcc source */\n#define\tN_RSYM\t0x40\t/* register sym: name,,NO_SECT,type,register */\n#define\tN_SLINE\t0x44\t/* src line: 0,,n_sect,linenumber,address */\n#define N_ENSYM 0x4e\t/* end nsect sym: 0,,n_sect,0,address */\n#define\tN_SSYM\t0x60\t/* structure elt: name,,NO_SECT,type,struct_offset */\n#define\tN_SO\t0x64\t/* source file name: name,,n_sect,0,address */\n#define\tN_OSO\t0x66\t/* object file name: name,,(see below),0,st_mtime */\n\t\t\t/*   historically N_OSO set n_sect to 0. The N_OSO\n\t\t\t *   n_sect may instead hold the low byte of the\n\t\t\t *   cpusubtype value from the Mach-O header. */\n#define\tN_LSYM\t0x80\t/* local sym: name,,NO_SECT,type,offset */\n#define N_BINCL\t0x82\t/* include file beginning: name,,NO_SECT,0,sum */\n#define\tN_SOL\t0x84\t/* #included file name: name,,n_sect,0,address */\n#define\tN_PARAMS  0x86\t/* compiler parameters: name,,NO_SECT,0,0 */\n#define\tN_VERSION 0x88\t/* compiler version: name,,NO_SECT,0,0 */\n#define\tN_OLEVEL  0x8A\t/* compiler -O level: name,,NO_SECT,0,0 */\n#define\tN_PSYM\t0xa0\t/* parameter: name,,NO_SECT,type,offset */\n#define N_EINCL\t0xa2\t/* include file end: name,,NO_SECT,0,0 */\n#define\tN_ENTRY\t0xa4\t/* alternate entry: name,,n_sect,linenumber,address */\n#define\tN_LBRAC\t0xc0\t/* left bracket: 0,,NO_SECT,nesting level,address */\n#define N_EXCL\t0xc2\t/* deleted include file: name,,NO_SECT,0,sum */\n#define\tN_RBRAC\t0xe0\t/* right bracket: 0,,NO_SECT,nesting level,address */\n#define\tN_BCOMM\t0xe2\t/* begin common: name,,NO_SECT,0,0 */\n#define\tN_ECOMM\t0xe4\t/* end common: name,,n_sect,0,0 */\n#define\tN_ECOML\t0xe8\t/* end common (local name): 0,,n_sect,0,address */\n#define\tN_LENG\t0xfe\t/* second stab entry with length information */\n\n/*\n * for the berkeley pascal compiler, pc(1):\n */\n#define\tN_PC\t0x30\t/* global pascal symbol: name,,NO_SECT,subtype,line */\n\n#endif /* _MACHO_STAB_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/mach-o/swap.h",
    "content": "/*\n * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_LICENSE_HEADER_START@\n * \n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this\n * file.\n * \n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n * \n * @APPLE_LICENSE_HEADER_END@\n */\n#ifndef _MACH_O_SWAP_H_\n#define _MACH_O_SWAP_H_\n\n#include <stdint.h>\n#include <architecture/byte_order.h>\n#include <mach-o/fat.h>\n#include <mach-o/loader.h>\n#include <mach-o/nlist.h>\n#include <mach-o/reloc.h>\n#include <mach-o/ranlib.h>\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif /* __cplusplus */\n\nextern void swap_fat_header(\n    struct fat_header *fat_header,\n    enum NXByteOrder target_byte_order);\n\nextern void swap_fat_arch(\n    struct fat_arch *fat_archs,\n    uint32_t nfat_arch,\n    enum NXByteOrder target_byte_order);\n\nextern void swap_fat_arch_64(\n    struct fat_arch_64 *fat_archs64,\n    uint32_t nfat_arch,\n    enum NXByteOrder target_byte_order);\n\nextern void swap_mach_header(\n    struct mach_header *mh,\n    enum NXByteOrder target_byte_order);\n\nextern void swap_mach_header_64(\n    struct mach_header_64 *mh,\n    enum NXByteOrder target_byte_order);\n\nextern void swap_load_command(\n    struct load_command *lc,\n    enum NXByteOrder target_byte_order);\n\nextern void swap_segment_command(\n    struct segment_command *sg,\n    enum NXByteOrder target_byte_order);\n\nextern void swap_segment_command_64(\n    struct segment_command_64 *sg,\n    enum NXByteOrder target_byte_order);\n\nextern void swap_section(\n    struct section *s,\n    uint32_t nsects,\n    enum NXByteOrder target_byte_order);\n\nextern void swap_section_64(\n    struct section_64 *s,\n    uint32_t nsects,\n    enum NXByteOrder target_byte_order);\n\nextern void swap_symtab_command(\n    struct symtab_command *st,\n    enum NXByteOrder target_byte_order);\n\nextern void swap_dysymtab_command(\n    struct dysymtab_command *dyst,\n    enum NXByteOrder target_byte_sex);\n\nextern void swap_symseg_command(\n    struct symseg_command *ss,\n    enum NXByteOrder target_byte_order);\n\nextern void swap_fvmlib_command(\n    struct fvmlib_command *fl,\n    enum NXByteOrder target_byte_order);\n\nextern void swap_dylib_command(\n    struct dylib_command *dl,\n    enum NXByteOrder target_byte_sex);\n\nextern void swap_sub_framework_command(\n    struct sub_framework_command *sub,\n    enum NXByteOrder target_byte_sex);\n\nextern void swap_sub_umbrella_command(\n    struct sub_umbrella_command *usub,\n    enum NXByteOrder target_byte_sex);\n\nextern void swap_sub_library_command(\n    struct sub_library_command *lsub,\n    enum NXByteOrder target_byte_sex);\n\nextern void swap_sub_client_command(\n    struct sub_client_command *csub,\n    enum NXByteOrder target_byte_sex);\n\nextern void swap_prebound_dylib_command(\n    struct prebound_dylib_command *pbdylib,\n    enum NXByteOrder target_byte_sex);\n\nextern void swap_dylinker_command(\n    struct dylinker_command *dyld,\n    enum NXByteOrder target_byte_sex);\n\nextern void swap_fvmfile_command(\n    struct fvmfile_command *ff,\n    enum NXByteOrder target_byte_order);\n\nextern void swap_thread_command(\n    struct thread_command *ut,\n    enum NXByteOrder target_byte_order);\n\nextern void swap_ident_command(\n    struct ident_command *ident,\n    enum NXByteOrder target_byte_order);\n\nextern void swap_routines_command(\n    struct routines_command *r_cmd,\n    enum NXByteOrder target_byte_sex);\n\nextern void swap_routines_command_64(\n    struct routines_command_64 *r_cmd,\n    enum NXByteOrder target_byte_sex);\n\nextern void swap_twolevel_hints_command(\n    struct twolevel_hints_command *hints_cmd,\n    enum NXByteOrder target_byte_sex);\n\nextern void swap_prebind_cksum_command(\n    struct prebind_cksum_command *cksum_cmd,\n    enum NXByteOrder target_byte_sex);\n\nextern void swap_uuid_command(\n    struct uuid_command *uuid_cmd,\n    enum NXByteOrder target_byte_sex);\n\nextern void swap_linkedit_data_command(\n    struct linkedit_data_command *ld,\n    enum NXByteOrder target_byte_sex);\n\nextern void swap_version_min_command(\n    struct version_min_command *ver_cmd,\n    enum NXByteOrder target_byte_sex);\n\nextern void swap_rpath_command(\n    struct rpath_command *rpath_cmd,\n    enum NXByteOrder target_byte_sex);\n\nextern void swap_encryption_command(\n    struct encryption_info_command *ec,\n    enum NXByteOrder target_byte_sex);\n\nextern void swap_encryption_command_64(\n    struct encryption_info_command_64 *ec,\n    enum NXByteOrder target_byte_sex);\n\nextern void swap_linker_option_command(\n    struct linker_option_command *lo,\n    enum NXByteOrder target_byte_sex);\n\nextern void swap_dyld_info_command(\n    struct dyld_info_command *ed,\n    enum NXByteOrder target_byte_sex);\n\nextern void swap_entry_point_command(\n    struct entry_point_command *ep,\n    enum NXByteOrder target_byte_sex);\n\nextern void swap_source_version_command(\n    struct source_version_command *sv,\n    enum NXByteOrder target_byte_sex);\n\nextern void swap_note_command(\n    struct note_command *nc,\n    enum NXByteOrder target_byte_sex);\n\nextern void swap_build_version_command(\n    struct build_version_command *bv,\n    enum NXByteOrder target_byte_sex);\n\nextern void swap_build_tool_version(\n    struct build_tool_version *bt,\n    uint32_t ntools,\n    enum NXByteOrder target_byte_sex);\n\nextern void swap_prebind_cksum_command(\n    struct prebind_cksum_command *cksum_cmd,\n    enum NXByteOrder target_byte_sex);\n\nextern void swap_uuid_command(\n    struct uuid_command *uuid_cmd,\n    enum NXByteOrder target_byte_sex);\n\nextern void swap_twolevel_hint(\n    struct twolevel_hint *hints,\n    uint32_t nhints,\n    enum NXByteOrder target_byte_sex);\n\nextern void swap_fileset_entry_command(\n    struct fileset_entry_command *lc,\n    enum NXByteOrder target_byte_sex);\n\nextern void swap_nlist(\n    struct nlist *symbols,\n    uint32_t nsymbols,\n    enum NXByteOrder target_byte_order);\n\nextern void swap_nlist_64(\n    struct nlist_64 *symbols,\n    uint32_t nsymbols,\n    enum NXByteOrder target_byte_order);\n\nextern void swap_ranlib(\n    struct ranlib *ranlibs,\n    uint32_t nranlibs,\n    enum NXByteOrder target_byte_order);\n\nextern void swap_ranlib_64(\n    struct ranlib_64 *ranlibs,\n    uint64_t nranlibs,\n    enum NXByteOrder target_byte_order);\n\nextern void swap_relocation_info(\n    struct relocation_info *relocs,\n    uint32_t nrelocs,\n    enum NXByteOrder target_byte_order);\n\nextern void swap_indirect_symbols(\n    uint32_t *indirect_symbols,\n    uint32_t nindirect_symbols,\n    enum NXByteOrder target_byte_sex);\n\nextern void swap_dylib_reference(\n    struct dylib_reference *refs,  \n    uint32_t nrefs,\n    enum NXByteOrder target_byte_sex);\n\nextern void swap_dylib_module(  \n    struct dylib_module *mods,\n    uint32_t nmods, \n    enum NXByteOrder target_byte_sex);\n\nextern void swap_dylib_module_64(  \n    struct dylib_module_64 *mods,\n    uint32_t nmods, \n    enum NXByteOrder target_byte_sex);\n\nextern void swap_dylib_table_of_contents(\n    struct dylib_table_of_contents *tocs,\n    uint32_t ntocs,\n    enum NXByteOrder target_byte_sex);\n\n#ifdef __cplusplus\n}\n#endif /* __cplusplus */\n\n#endif /* _MACH_O_SWAP_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/mach-o/x86_64/reloc.h",
    "content": "/*\n * Copyright (c) 2006 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_LICENSE_HEADER_START@\n * \n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this\n * file.\n * \n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n * \n * @APPLE_LICENSE_HEADER_END@\n */\n/*\n * Relocations for x86_64 are a bit different than for other architectures in\n * Mach-O: Scattered relocations are not used.  Almost all relocations produced\n * by the compiler are external relocations.  An external relocation has the\n * r_extern bit set to 1 and the r_symbolnum field contains the symbol table\n * index of the target label.\n * \n * When the assembler is generating relocations, if the target label is a local\n * label (begins with 'L'), then the previous non-local label in the same\n * section is used as the target of the external relocation.  An addend is used\n * with the distance from that non-local label to the target label.  Only when\n * there is no previous non-local label in the section is an internal\n * relocation used.\n * \n * The addend (i.e. the 4 in _foo+4) is encoded in the instruction (Mach-O does\n * not have RELA relocations).  For PC-relative relocations, the addend is\n * stored directly in the instruction.  This is different from other Mach-O\n * architectures, which encode the addend minus the current section offset.\n * \n * The relocation types are:\n * \n * \tX86_64_RELOC_UNSIGNED\t// for absolute addresses\n * \tX86_64_RELOC_SIGNED\t\t// for signed 32-bit displacement\n * \tX86_64_RELOC_BRANCH\t\t// a CALL/JMP instruction with 32-bit displacement\n * \tX86_64_RELOC_GOT_LOAD\t// a MOVQ load of a GOT entry\n * \tX86_64_RELOC_GOT\t\t// other GOT references\n * \tX86_64_RELOC_SUBTRACTOR\t// must be followed by a X86_64_RELOC_UNSIGNED\n * \n * The following are sample assembly instructions, followed by the relocation\n * and section content they generate in an object file:\n * \n * \tcall _foo\n * \t\tr_type=X86_64_RELOC_BRANCH, r_length=2, r_extern=1, r_pcrel=1, r_symbolnum=_foo\n * \t\tE8 00 00 00 00\n * \n * \tcall _foo+4\n * \t\tr_type=X86_64_RELOC_BRANCH, r_length=2, r_extern=1, r_pcrel=1, r_symbolnum=_foo\n * \t\tE8 04 00 00 00 \n * \n * \tmovq _foo@GOTPCREL(%rip), %rax\n * \t\tr_type=X86_64_RELOC_GOT_LOAD, r_length=2, r_extern=1, r_pcrel=1, r_symbolnum=_foo\n * \t\t48 8B 05 00 00 00 00\n * \t\n * \tpushq _foo@GOTPCREL(%rip)\n * \t\tr_type=X86_64_RELOC_GOT, r_length=2, r_extern=1, r_pcrel=1, r_symbolnum=_foo\n * \t\tFF 35 00 00 00 00\n * \t\n * \tmovl _foo(%rip), %eax\n * \t\tr_type=X86_64_RELOC_SIGNED, r_length=2, r_extern=1, r_pcrel=1, r_symbolnum=_foo\n * \t\t8B 05 00 00 00 00\n * \n * \tmovl _foo+4(%rip), %eax\n * \t\tr_type=X86_64_RELOC_SIGNED, r_length=2, r_extern=1, r_pcrel=1, r_symbolnum=_foo\n * \t\t8B 05 04 00 00 00\n * \n * \tmovb  $0x12, _foo(%rip)\n * \t\tr_type=X86_64_RELOC_SIGNED, r_length=2, r_extern=1, r_pcrel=1, r_symbolnum=_foo\n * \t\tC6 05 FF FF FF FF 12\n * \n * \tmovl  $0x12345678, _foo(%rip)\n * \t\tr_type=X86_64_RELOC_SIGNED, r_length=2, r_extern=1, r_pcrel=1, r_symbolnum=_foo\n * \t\tC7 05 FC FF FF FF 78 56 34 12\n * \n * \t.quad _foo\n * \t\tr_type=X86_64_RELOC_UNSIGNED, r_length=3, r_extern=1, r_pcrel=0, r_symbolnum=_foo\n * \t\t00 00 00 00 00 00 00 00\n * \n * \t.quad _foo+4\n * \t\tr_type=X86_64_RELOC_UNSIGNED, r_length=3, r_extern=1, r_pcrel=0, r_symbolnum=_foo\n * \t\t04 00 00 00 00 00 00 00\n * \n * \t.quad _foo - _bar\n * \t\tr_type=X86_64_RELOC_SUBTRACTOR, r_length=3, r_extern=1, r_pcrel=0, r_symbolnum=_bar\n * \t\tr_type=X86_64_RELOC_UNSIGNED, r_length=3, r_extern=1, r_pcrel=0, r_symbolnum=_foo\n * \t\t00 00 00 00 00 00 00 00\n * \n * \t.quad _foo - _bar + 4\n * \t\tr_type=X86_64_RELOC_SUBTRACTOR, r_length=3, r_extern=1, r_pcrel=0, r_symbolnum=_bar\n * \t\tr_type=X86_64_RELOC_UNSIGNED, r_length=3, r_extern=1, r_pcrel=0, r_symbolnum=_foo\n * \t\t04 00 00 00 00 00 00 00\n * \t\n * \t.long _foo - _bar\n * \t\tr_type=X86_64_RELOC_SUBTRACTOR, r_length=2, r_extern=1, r_pcrel=0, r_symbolnum=_bar\n * \t\tr_type=X86_64_RELOC_UNSIGNED, r_length=2, r_extern=1, r_pcrel=0, r_symbolnum=_foo\n * \t\t00 00 00 00\n * \n * \tlea L1(%rip), %rax\n * \t\tr_type=X86_64_RELOC_SIGNED, r_length=2, r_extern=1, r_pcrel=1, r_symbolnum=_prev\n * \t\t48 8d 05 12 00 00 00\n * \t\t// assumes _prev is the first non-local label 0x12 bytes before L1\n * \n * \tlea L0(%rip), %rax\n * \t\tr_type=X86_64_RELOC_SIGNED, r_length=2, r_extern=0, r_pcrel=1, r_symbolnum=3\n * \t\t48 8d 05 56 00 00 00\n *\t\t// assumes L0 is in third section and there is no previous non-local label.\n *\t\t// The rip-relative-offset of 0x00000056 is L0-address_of_next_instruction.\n *\t\t// address_of_next_instruction is the address of the relocation + 4.\n *\n *     add     $6,L0(%rip)\n *             r_type=X86_64_RELOC_SIGNED_1, r_length=2, r_extern=0, r_pcrel=1, r_symbolnum=3\n *\t\t83 05 18 00 00 00 06\n *\t\t// assumes L0 is in third section and there is no previous non-local label.\n *\t\t// The rip-relative-offset of 0x00000018 is L0-address_of_next_instruction.\n *\t\t// address_of_next_instruction is the address of the relocation + 4 + 1.\n *\t\t// The +1 comes from SIGNED_1.  This is used because the relocation is not\n *\t\t// at the end of the instruction.\n *\n * \t.quad L1\n * \t\tr_type=X86_64_RELOC_UNSIGNED, r_length=3, r_extern=1, r_pcrel=0, r_symbolnum=_prev\n * \t\t12 00 00 00 00 00 00 00\n * \t\t// assumes _prev is the first non-local label 0x12 bytes before L1\n * \n * \t.quad L0\n * \t\tr_type=X86_64_RELOC_UNSIGNED, r_length=3, r_extern=0, r_pcrel=0, r_symbolnum=3\n * \t\t56 00 00 00 00 00 00 00\n * \t\t// assumes L0 is in third section, has an address of 0x00000056 in .o\n * \t\t// file, and there is no previous non-local label\n * \n * \t.quad _foo - .\n * \t\tr_type=X86_64_RELOC_SUBTRACTOR, r_length=3, r_extern=1, r_pcrel=0, r_symbolnum=_prev\n * \t\tr_type=X86_64_RELOC_UNSIGNED, r_length=3, r_extern=1, r_pcrel=0, r_symbolnum=_foo\n * \t\tEE FF FF FF FF FF FF FF\n * \t\t// assumes _prev is the first non-local label 0x12 bytes before this\n * \t\t// .quad\n * \n * \t.quad _foo - L1\n * \t\tr_type=X86_64_RELOC_SUBTRACTOR, r_length=3, r_extern=1, r_pcrel=0, r_symbolnum=_prev\n * \t\tr_type=X86_64_RELOC_UNSIGNED, r_length=3, r_extern=1, r_pcrel=0, r_symbolnum=_foo\n * \t\tEE FF FF FF FF FF FF FF\n * \t\t// assumes _prev is the first non-local label 0x12 bytes before L1\n * \n * \t.quad L1 - _prev\n * \t\t// No relocations.  This is an assembly time constant.\n * \t\t12 00 00 00 00 00 00 00\n * \t\t// assumes _prev is the first non-local label 0x12 bytes before L1\n *\n *\n *\n * In final linked images, there are only two valid relocation kinds:\n *\n *     r_type=X86_64_RELOC_UNSIGNED, r_length=3, r_pcrel=0, r_extern=1, r_symbolnum=sym_index\n *\tThis tells dyld to add the address of a symbol to a pointer sized (8-byte)\n *  piece of data (i.e on disk the 8-byte piece of data contains the addend). The \n *  r_symbolnum contains the index into the symbol table of the target symbol.\n *\n *     r_type=X86_64_RELOC_UNSIGNED, r_length=3, r_pcrel=0, r_extern=0, r_symbolnum=0\n * This tells dyld to adjust the pointer sized (8-byte) piece of data by the amount\n * the containing image was loaded from its base address (e.g. slide).\n *\n */ \nenum reloc_type_x86_64\n{\n\tX86_64_RELOC_UNSIGNED,\t\t// for absolute addresses\n\tX86_64_RELOC_SIGNED,\t\t// for signed 32-bit displacement\n\tX86_64_RELOC_BRANCH,\t\t// a CALL/JMP instruction with 32-bit displacement\n\tX86_64_RELOC_GOT_LOAD,\t\t// a MOVQ load of a GOT entry\n\tX86_64_RELOC_GOT,\t\t\t// other GOT references\n\tX86_64_RELOC_SUBTRACTOR,\t// must be followed by a X86_64_RELOC_UNSIGNED\n\tX86_64_RELOC_SIGNED_1,\t\t// for signed 32-bit displacement with a -1 addend\n\tX86_64_RELOC_SIGNED_2,\t\t// for signed 32-bit displacement with a -2 addend\n\tX86_64_RELOC_SIGNED_4,\t\t// for signed 32-bit displacement with a -4 addend\n\tX86_64_RELOC_TLV,\t\t// for thread local variables\n};\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/os/_workgroup.h",
    "content": "/*\n * Copyright (c) 2020 Apple Inc. All rights reserved.\n *\n * @APPLE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this\n * file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_LICENSE_HEADER_END@\n */\n\n#ifndef ___WORKGROUP_H__\n#define ___WORKGROUP_H__\n\n#if !defined(__has_feature)\n# define __has_feature(x) 0\n#endif\n#if (!__has_feature(modules))\n  #error \"Do not include this header directly, please include <os/workgroup.h> instead\"\n#endif\n\n#include <os/workgroup.h>\n\n#endif /* ___WORKGROUP_H__ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/os/activity.h",
    "content": "/*\n * Copyright (c) 2013-2016 Apple Inc. All rights reserved.\n */\n\n#ifndef __OS_ACTIVITY_H__\n#define __OS_ACTIVITY_H__\n\n#include <os/trace_base.h>\n\n__BEGIN_DECLS\n\nOS_ASSUME_NONNULL_BEGIN\n\n#pragma mark - types and globals\n\n#if OS_LOG_TARGET_HAS_10_12_FEATURES\n#ifndef OS_ACTIVITY_OBJECT_API\n#define OS_ACTIVITY_OBJECT_API 1\n#endif // OS_ACTIVITY_OBJECT_API\n#else\n#if OS_ACTIVITY_OBJECT_API\n#error Please change your minimum OS requirements because OS_ACTIVITY_OBJECT_API is not available\n#endif // OS_ACTIVITY_OBJECT_API\n#define OS_ACTIVITY_OBJECT_API 0\n#endif // OS_LOG_TARGET_HAS_10_12_FEATURES\n\n/*!\n * @enum os_activity_flag_t\n *\n * @discussion\n * Support flags for os_activity_create or os_activity_start.\n *\n * @constant OS_ACTIVITY_FLAG_DEFAULT\n * Use the default flags.\n *\n * @constant OS_ACTIVITY_FLAG_DETACHED\n * Detach the newly created activity from the provided activity (if any).  If\n * passed in conjunction with an exiting activity, the activity will only note\n * what activity \"created\" the new one, but will make the new activity a top\n * level activity.  This allows users to see what activity triggered work\n * without actually relating the activities.\n *\n * @constant OS_ACTIVITY_FLAG_IF_NONE_PRESENT\n * Will only create a new activity if none present.  If an activity ID is\n * already present, a new object will be returned with the same activity ID\n * underneath.\n *\n * Passing both OS_ACTIVITY_FLAG_DETACHED and OS_ACTIVITY_FLAG_IF_NONE_PRESENT\n * is undefined.\n */\nOS_ENUM(os_activity_flag, uint32_t,\n    OS_ACTIVITY_FLAG_DEFAULT = 0,\n    OS_ACTIVITY_FLAG_DETACHED = 0x1,\n    OS_ACTIVITY_FLAG_IF_NONE_PRESENT = 0x2\n);\n\n#if OS_ACTIVITY_OBJECT_API\n\n#define OS_ACTIVITY_NULL NULL\n\n/*!\n * @typedef os_activity_t\n * An opaque activity object.\n */\nAPI_AVAILABLE(macos(10.12), ios(10.0), watchos(3.0), tvos(10.0))\n#if OS_OBJECT_USE_OBJC\nOS_OBJECT_DECL(os_activity);\n#else\ntypedef struct os_activity_s *os_activity_t;\n#endif /* OS_OBJECT_USE_OBJC */\n\n/*!\n * @const OS_ACTIVITY_NONE\n *\n * @discussion\n * Create activity with no current traits, this is the equivalent of a\n * detached activity.\n */\n#define OS_ACTIVITY_NONE OS_OBJECT_GLOBAL_OBJECT(os_activity_t, _os_activity_none)\nAPI_AVAILABLE(macos(10.12), ios(10.0), watchos(3.0), tvos(10.0))\nOS_EXPORT\nstruct os_activity_s _os_activity_none;\n\n/*!\n * @const OS_ACTIVITY_CURRENT\n *\n * @discussion\n * Create activity and links to the current activity if one is present.\n * If no activity is present it is treated as if it is detached.\n */\n#define OS_ACTIVITY_CURRENT OS_OBJECT_GLOBAL_OBJECT(os_activity_t, _os_activity_current)\nAPI_AVAILABLE(macos(10.12), ios(10.0), watchos(3.0), tvos(10.0))\nOS_EXPORT\nstruct os_activity_s _os_activity_current;\n\n#else // !OS_ACTIVITY_OBJECT_API\n\n#define OS_ACTIVITY_NULL 0\n\n/*!\n * @typedef os_activity_t\n * An opaque activity identifier.\n */\nAPI_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0))\ntypedef uint64_t os_activity_t;\n\n#endif // OS_ACTIVITY_OBJECT_API\n\n/*!\n * @typedef os_activity_id_t\n * An value representing the activity ID assigned to an newly created activity.\n */\nAPI_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0))\ntypedef uint64_t os_activity_id_t;\n\n/*!\n * @typedef os_activity_scope_state_t\n * Structure that is populated by os_activity_scope_enter and restored using\n * os_activity_scope_leave.\n */\nAPI_AVAILABLE(macos(10.12), ios(10.0), watchos(3.0), tvos(10.0))\ntypedef struct os_activity_scope_state_s {\n    uint64_t opaque[2];\n} *os_activity_scope_state_t;\n\n#pragma mark - Internal support functions\n\n#if OS_ACTIVITY_OBJECT_API\nAPI_AVAILABLE(macos(10.12), ios(10.0), watchos(3.0), tvos(10.0))\nOS_EXPORT OS_NOTHROW OS_WARN_RESULT_NEEDS_RELEASE OS_NOT_TAIL_CALLED\nOS_OBJECT_RETURNS_RETAINED\nos_activity_t\n_os_activity_create(void *dso, const char *description, os_activity_t activity,\n        os_activity_flag_t flags);\n#endif\n\n/*!\n * @function _os_activity_label_useraction\n *\n * @abstract\n * Internal function for use by os_activity_label_useraction.\n *\n * @warning\n * Do not use directly.\n */\nAPI_AVAILABLE(macos(10.12), ios(10.0), watchos(3.0), tvos(10.0))\nOS_EXPORT OS_NOTHROW OS_NOT_TAIL_CALLED\nvoid\n_os_activity_label_useraction(void *dso, const char *name);\n\n/*!\n * @function _os_activity_initiate\n *\n * @abstract\n * Do not use directly because your description will not be preserved.\n */\nAPI_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0))\nOS_EXPORT OS_NOTHROW OS_NOT_TAIL_CALLED\nvoid\n_os_activity_initiate(void *dso, const char *description,\n        os_activity_flag_t flags, os_block_t activity_block OS_NOESCAPE);\n\n/*!\n * @function _os_activity_initiate_f\n *\n * @abstract\n * Do not use directly because your description will not be preserved.\n */\nAPI_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0))\nOS_EXPORT OS_NOTHROW OS_NOT_TAIL_CALLED\nvoid\n_os_activity_initiate_f(void *dso, const char *description,\n        os_activity_flag_t flags, void *context, os_function_t function);\n\n#pragma mark - activity related\n\n/*!\n * @function os_activity_initiate\n *\n * @abstract\n * Synchronously initiates an activity using provided block.\n *\n * @discussion\n * Synchronously initiates an activity using the provided block and creates\n * a tracing buffer as appropriate.  All new activities are created as a\n * subactivity of an existing activity on the current thread.\n *\n * <code>\n *     os_activity_initiate(\"indexing database\", OS_ACTIVITY_FLAG_DEFAULT, ^(void) {\n *         // either do work directly or issue work asynchronously\n *     });\n * </code>\n *\n * @param description\n * A constant string describing the activity, e.g., \"performClick\" or\n * \"menuSelection\".\n *\n * @param flags\n * Flags to be used when initiating the activity, typically\n * OS_ACTIVITY_FLAG_DEFAULT.\n *\n * @param activity_block\n * The block to execute a given activity\n */\n#define os_activity_initiate(description, flags, activity_block) __extension__({ \\\n    OS_LOG_STRING(ACT, __description, description); \\\n    _os_activity_initiate(&__dso_handle, __description, flags, activity_block); \\\n})\n\n/*!\n * @function os_activity_initiate_f\n *\n * @abstract\n * Synchronously initiates an activity using the provided function.\n *\n * @discussion\n * Synchronously initiates an activity using the provided function and creates\n * a tracing buffer as appropriate.  All new activities are created as a\n * subactivity of an existing activity on the current thread.\n *\n * <code>\n *     os_activity_initiate_f(\"indexing database\", OS_ACTIVITY_FLAG_DEFAULT, context, function);\n * </code>\n *\n * @param description\n * A constant string describing the activity, e.g., \"performClick\" or\n * \"menuSelection\".\n *\n * @param flags\n * Flags to be used when initiating the activity, typically\n * OS_ACTIVITY_FLAG_DEFAULT.\n *\n * @param context\n * An optional context that will be supplied to the activity function.\n *\n * @param activity_func\n * The function to execute for the new activity.\n */\n#define os_activity_initiate_f(description, flags, context, function) __extension__({ \\\n    OS_LOG_STRING(ACT, __description, description); \\\n    _os_activity_initiate_f(&__dso_handle, __description, flags, context, function); \\\n})\n\n#if OS_ACTIVITY_OBJECT_API\n/*!\n * @function os_activity_create\n *\n * @abstract\n * Creates an os_activity_t object which can be passed to os_activity_apply\n * function.\n *\n * @param description\n * Pass a description for the activity.  The description must be a constant\n * string within the calling executable or library.\n *\n * @param parent_activity\n * Depending on flags will link the newly created activity to the value passed\n * or note where the activity was created.  Possible activities include:\n * OS_ACTIVITY_NONE, OS_ACTIVITY_CURRENT or any existing os_activity_t object\n * created using os_activity_create.\n *\n * @param flags\n * A valid os_activity_flag_t which will determine behavior of the newly created\n * activity.\n *\n * If the OS_ACTIVITY_FLAG_DETACHED flag is passed, the value passed to the\n * parent_activity argument is ignored, and OS_ACTIVITY_NONE is used instead.\n *\n * If the OS_ACTIVITY_FLAG_IF_NONE_PRESENT flag is passed, then passing another\n * value than OS_ACTIVITY_CURRENT to the parent_activity argument is undefined.\n *\n * @result\n * Returns an os_activity_t object which can be used with os_activity_apply.\n */\n#define os_activity_create(description, parent_activity, flags) __extension__({ \\\n    OS_LOG_STRING(ACT, __description, description); \\\n    _os_activity_create(&__dso_handle, __description, parent_activity, flags); \\\n})\n\n/*!\n * @function os_activity_apply\n *\n * @abstract\n * Execute a block using a given activity object.\n *\n * @param activity\n * The given activity object created with os_activity_create() or\n * OS_ACTIVITY_NONE.\n *\n * @param block\n * Pass the block to be executed within the context of the given activity.\n */\nAPI_AVAILABLE(macos(10.12), ios(10.0), watchos(3.0), tvos(10.0))\nOS_EXPORT OS_NOTHROW\nvoid\nos_activity_apply(os_activity_t activity, os_block_t block OS_NOESCAPE);\n\n/*!\n * @function os_activity_apply_f\n *\n * @abstract\n * Execute a given function with a provided activity.\n *\n * @param activity\n * The given activity object created with os_activity_create() or\n * OS_ACTIVITY_NONE.\n *\n * @param context\n * Context to pass to the function which may be NULL.\n *\n * @param function\n * Pass the function to be executed within the context of the given activity.\n */\nAPI_AVAILABLE(macos(10.12), ios(10.0), watchos(3.0), tvos(10.0))\nOS_EXPORT OS_NOTHROW\nvoid\nos_activity_apply_f(os_activity_t activity, void *context,\n        os_function_t function);\n\n/*!\n * @function os_activity_scope_enter\n *\n * @abstract\n * Will change the current execution context to use the provided activity.\n *\n * @discussion\n * Will change the current execution context to use the provided activity.\n * An activity can be created and then applied to the current scope by doing:\n *\n * <code>\n *     struct os_activity_scope_state_s state;\n *     os_activity_t activity = os_activity_create(\"my new activity\", 0);\n *     os_activity_scope_enter(activity, &state);\n *     ... do some work ...\n *     os_activity_scope_leave(&state);\n * </code>\n *\n * To auto-cleanup state call:\n *\n *      os_activity_scope(activity);\n *\n * @param activity\n * Pass a valid activity created with os_activity_create or any global object.\n *\n * @param state\n * A stack-based struct os_activity_scope_state_s to store the state.\n */\nAPI_AVAILABLE(macos(10.12), ios(10.0), watchos(3.0), tvos(10.0))\nOS_EXPORT OS_NOTHROW\nvoid\nos_activity_scope_enter(os_activity_t activity, os_activity_scope_state_t state);\n\n/*!\n * @function os_activity_scope_leave\n *\n * @abstract\n * Will pop state up to the state provided.\n *\n * @discussion\n * Will leave scope using the state provided.  If state is not present an error\n * will be generated.\n *\n * @param state\n * Must be a valid value filled by os_activity_scope_enter call.\n */\nAPI_AVAILABLE(macos(10.12), ios(10.0), watchos(3.0), tvos(10.0))\nOS_EXPORT OS_NOTHROW\nvoid\nos_activity_scope_leave(os_activity_scope_state_t state);\n\n#if defined(__GNUC__)\n#define _os_activity_scope(var, activity) \\\n    struct os_activity_scope_state_s var __attribute__((__cleanup__(os_activity_scope_leave))); \\\n    os_activity_scope_enter(activity, &var)\n#define os_activity_scope(activity) _os_activity_scope(OS_CONCAT(scope, __COUNTER__), activity)\n#endif\n\n#endif // OS_ACTIVITY_OBJECT_API\n\n/*!\n * @function os_activity_get_active\n *\n * @abstract\n * Returns the stack of nested activities associated with the current thread.\n *\n * @discussion\n * Activities have a sense of nesting and therefore there could be more than\n * one activity involved on the current thread.  This should be used by\n * diagnostic tools only for making additional decisions about a situation.\n *\n * @param entries\n * Pass a buffer of sufficient size to hold the the number of os_activity_id_t\n * being requested.\n *\n * @param count\n * Pointer to the requested number of activity identifiers.\n * On output will be filled with the number of activities that are available.\n *\n * @result\n * Number of activity identifiers written to 'entries'\n */\nAPI_DEPRECATED(\"No longer supported\", macos(10.10, 10.12), ios(8.0, 10.0),\n        watchos(2.0, 3.0), tvos(9.0, 10.0))\nOS_EXPORT OS_NOTHROW\nunsigned int\nos_activity_get_active(os_activity_id_t *entries, unsigned int *count);\n\n/*!\n * @function os_activity_get_identifier\n *\n * @abstract\n * Returns the current activity ID and will fill the parent_id if present.\n *\n * @discussion\n * Returns the current activity ID and will fill the parent_id if present.\n *\n * @param parent_id\n * If non-null will set the parent activity ID.\n *\n * @result\n * The identifier for the provided activity.\n */\nAPI_AVAILABLE(macos(10.12), ios(10.0), watchos(3.0), tvos(10.0))\nOS_EXPORT OS_NOTHROW OS_WARN_RESULT\nos_activity_id_t\nos_activity_get_identifier(os_activity_t activity,\n        os_activity_id_t *_Nullable parent_id);\n\n/*!\n * @function os_activity_label_useraction\n *\n * @abstract\n * Label an activity that is auto-generated by AppKit/UIKit with a name that is\n * useful for debugging macro-level user actions.\n *\n * @discussion\n * Label an activity that is auto-generated by AppKit/UIKit with a name that is\n * useful for debugging macro-level user actions.  The API should be called\n * early within the scope of the IBAction and before any sub-activities are\n * created.  The name provided will be shown in tools in additon to the\n * underlying AppKit/UIKit provided name.  This API can only be called once and\n * only on the activity created by AppKit/UIKit.  These actions help determine\n * workflow of the user in order to reproduce problems that occur.  For example,\n * a control press and/or menu item selection can be labeled:\n *\n * <code>\n *     os_activity_label_useraction(\"New mail message\");\n *     os_activity_label_useraction(\"Empty trash\");\n * </code>\n *\n * Where the underlying AppKit/UIKit name will be \"gesture:\" or \"menuSelect:\".\n *\n * @param name\n * A constant string that describes the the action.\n */\n#define os_activity_label_useraction(label) __extension__({ \\\n    OS_LOG_STRING(ACT, __label, label); \\\n    _os_activity_label_useraction(&__dso_handle, __label); \\\n})\n\n#pragma mark - deprecated function support\n\n/*!\n * @function _os_activity_start\n *\n * @abstract\n * Internal function for activity start, do not use directly will not preserve\n * description.\n */\nAPI_DEPRECATED(\"use combination of os_activity_create and os_activity_apply/os_activity_scope\",\n        macos(10.10, 10.12), ios(8.0, 10.0), watchos(2.0, 3.0), tvos(9.0, 10.0))\nOS_EXPORT OS_NOTHROW OS_WARN_RESULT OS_NOT_TAIL_CALLED\nos_activity_t\n_os_activity_start(void *dso, const char *description, os_activity_flag_t flags);\n\n/*!\n * @function os_activity_start\n *\n * @warning\n * Deprecated please use new os_activity_create and os_activity_apply.\n */\n#define os_activity_start(description, flags) __extension__({ \\\n    OS_LOG_STRING(ACT, __description, description); \\\n    _os_activity_start(&__dso_handle, __description, flags); \\\n})\n\n/*!\n * @function os_activity_end\n *\n * @warning\n * Deprecated please use new os_activity_create and os_activity_apply.\n */\nAPI_DEPRECATED(\"use combination of os_activity_create and os_activity_apply/os_activity_scope\",\n        macos(10.10, 10.12), ios(8.0, 10.0), watchos(2.0, 3.0), tvos(9.0, 10.0))\nOS_EXPORT OS_NOTHROW\nvoid\nos_activity_end(os_activity_t activity);\n\n/*!\n * @typedef os_breadcrumb_t\n * An opaque value for the breadcrumb ID.\n */\nAPI_DEPRECATED(\"No longer supported\", macos(10.10, 10.12), ios(8.0, 10.0),\n        watchos(2.0, 3.0), tvos(9.0, 10.0))\ntypedef uint32_t os_breadcrumb_t;\n\n/*!\n * @function _os_activity_set_breadcrumb\n *\n * @warning\n * Deprecated, please use os_activity_label_useraction.\n */\nAPI_DEPRECATED_WITH_REPLACEMENT(\"os_activity_label_useraction\",\n        macos(10.10, 10.12), ios(8.0, 10.0), watchos(2.0, 3.0), tvos(9.0, 10.0))\nOS_EXPORT OS_NOTHROW OS_NOT_TAIL_CALLED\nvoid\n_os_activity_set_breadcrumb(void *dso, const char *name);\n\n/*!\n * @function os_activity_set_breadcrumb\n *\n * @warning\n * Deprecated, please use os_activity_label_useraction.\n */\n#define os_activity_set_breadcrumb(name) __extension__({ \\\n    OS_LOG_STRING(ACT, __name, name); \\\n    _os_activity_set_breadcrumb(&__dso_handle, __name); \\\n})\n\nOS_ASSUME_NONNULL_END\n\n__END_DECLS\n\n#endif // __OS_ACTIVITY_H__\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/os/atomic.h",
    "content": "/*\n * Copyright (c) 2019 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n\n#ifndef __OS_ATOMIC_H__\n#define __OS_ATOMIC_H__\n\n/*!\n * @file <os/atomic.h>\n *\n * @brief\n * Small header that helps write code that works with both C11 and C++11,\n * or pre-C11 type declarations.\n *\n * @discussion\n * The macros below allow to write code like this, that can be put in a header\n * and will work with both C11 and C++11:\n *\n * <code>\n * struct old_type {\n *     int atomic_field;\n * } old_variable;\n *\n * os_atomic_std(atomic_fetch_add_explicit)(\n *     os_cast_to_atomic_pointer(&old_variable), 1,\n *     os_atomic_std(memory_order_relaxed));\n * </code>\n */\n\n#include <os/base.h>\n\n#ifndef OS_ATOMIC_USES_CXX\n#if   defined(__cplusplus) && __cplusplus >= 201103L\n#define OS_ATOMIC_USES_CXX 1\n#else\n#define OS_ATOMIC_USES_CXX 0\n#endif\n#endif\n\n#if OS_ATOMIC_USES_CXX\n#include <atomic>\n#define OS_ATOMIC_STD                    std::\n#define os_atomic_std(op)                std::op\n#define os_atomic(type)                  std::atomic<type> volatile\n#define os_cast_to_atomic_pointer(p)     os::cast_to_atomic_pointer(p)\n#define os_atomic_basetypeof(p)          decltype(os_cast_to_atomic_pointer(p)->load())\n#define os_cast_to_nonatomic_pointer(p)  os::cast_to_nonatomic_pointer(p)\n#else /* !OS_ATOMIC_USES_CXX */\n#include <stdatomic.h>\n#define OS_ATOMIC_STD\n#define os_atomic_std(op)                op\n#define os_atomic(type)                  type volatile _Atomic\n#define os_cast_to_atomic_pointer(p)     (__typeof__(*(p)) volatile _Atomic *)(uintptr_t)(p)\n#define os_atomic_basetypeof(p)          __typeof__(atomic_load(os_cast_to_atomic_pointer(p)))\n#define os_cast_to_nonatomic_pointer(p)  (os_atomic_basetypeof(p) *)(uintptr_t)(p)\n#endif /* !OS_ATOMIC_USES_CXX */\n\n/*!\n * @group Internal implementation details\n *\n * @discussion The functions below are not intended to be used directly.\n */\n\n#if OS_ATOMIC_USES_CXX\n#include <type_traits>\n\nnamespace os {\ntemplate <class T> using add_volatile_t = typename std::add_volatile<T>::type;\ntemplate <class T> using remove_volatile_t = typename std::remove_volatile<T>::type;\n\ntemplate <class T>\ninline add_volatile_t<std::atomic<remove_volatile_t<T> > > *\ncast_to_atomic_pointer(T *v)\n{\n\treturn reinterpret_cast<add_volatile_t<std::atomic<remove_volatile_t<T> > > *>(v);\n}\n\ntemplate <class T>\ninline add_volatile_t<std::atomic<remove_volatile_t<T> > > *\ncast_to_atomic_pointer(std::atomic<T> *v)\n{\n\treturn reinterpret_cast<add_volatile_t<std::atomic<remove_volatile_t<T> > > *>(v);\n}\n\ntemplate <class T>\ninline remove_volatile_t<T> *\ncast_to_nonatomic_pointer(T *v)\n{\n\treturn const_cast<remove_volatile_t<T> *>(v);\n}\n\ntemplate <class T>\ninline remove_volatile_t<T> *\ncast_to_nonatomic_pointer(std::atomic<T> *v)\n{\n\treturn reinterpret_cast<remove_volatile_t<T> *>(v);\n}\n\ntemplate <class T>\ninline remove_volatile_t<T> *\ncast_to_nonatomic_pointer(volatile std::atomic<T> *v)\n{\n\tauto _v = const_cast<std::atomic<T> *>(v);\n\treturn reinterpret_cast<remove_volatile_t<T> *>(_v);\n}\n};\n#endif /* OS_ATOMIC_USES_CXX */\n\n#endif /* __OS_ATOMIC_H__ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/os/availability.h",
    "content": "/*\n * Copyright (c) 2008-2017 Apple Inc. All rights reserved.\n *\n * @APPLE_APACHE_LICENSE_HEADER_START@\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * @APPLE_APACHE_LICENSE_HEADER_END@\n */\n \n#ifndef __OS_AVAILABILITY__\n#define __OS_AVAILABILITY__\n\n/* \n * API_TO_BE_DEPRECATED is used as a version number in API that will be deprecated \n * in an upcoming release. This soft deprecation is an intermediate step before formal \n * deprecation to notify developers about the API before compiler warnings are generated.\n * You can find all places in your code that use soft deprecated API by redefining the \n * value of this macro to your current minimum deployment target, for example:\n * (macOS)\n *   clang -DAPI_TO_BE_DEPRECATED=10.12 <other compiler flags>\n * (iOS)\n *   clang -DAPI_TO_BE_DEPRECATED=11.0 <other compiler flags>\n */\n \n#ifndef API_TO_BE_DEPRECATED\n#define API_TO_BE_DEPRECATED 100000\n#endif\n\n#include <AvailabilityInternal.h>\n\n\n\n#if defined(__has_feature) && defined(__has_attribute)\n #if __has_attribute(availability)\n\n    /*\n     * API Introductions\n     *\n     * Use to specify the release that a particular API became available.\n     *\n     * Platform names:\n     *   macos, ios, tvos, watchos\n     *\n     * Examples:\n     *    API_AVAILABLE(macos(10.10))\n     *    API_AVAILABLE(macos(10.9), ios(10.0))\n     *    API_AVAILABLE(macos(10.4), ios(8.0), watchos(2.0), tvos(10.0))\n     */\n\n    #define API_AVAILABLE(...) __API_AVAILABLE_GET_MACRO(__VA_ARGS__,__API_AVAILABLE7, __API_AVAILABLE6, __API_AVAILABLE5, __API_AVAILABLE4, __API_AVAILABLE3, __API_AVAILABLE2, __API_AVAILABLE1, 0)(__VA_ARGS__)\n\n    #define API_AVAILABLE_BEGIN(...) _Pragma(\"clang attribute push\") __API_AVAILABLE_BEGIN_GET_MACRO(__VA_ARGS__,__API_AVAILABLE_BEGIN7,__API_AVAILABLE_BEGIN6, __API_AVAILABLE_BEGIN5, __API_AVAILABLE_BEGIN4, __API_AVAILABLE_BEGIN3, __API_AVAILABLE_BEGIN2, __API_AVAILABLE_BEGIN1, 0)(__VA_ARGS__)\n    #define API_AVAILABLE_END _Pragma(\"clang attribute pop\")\n\n    /*\n     * API Deprecations\n     *\n     * Use to specify the release that a particular API became unavailable.\n     *\n     * Platform names:\n     *   macos, ios, tvos, watchos\n     *\n     * Examples:\n     *\n     *    API_DEPRECATED(\"No longer supported\", macos(10.4, 10.8))\n     *    API_DEPRECATED(\"No longer supported\", macos(10.4, 10.8), ios(2.0, 3.0), watchos(2.0, 3.0), tvos(9.0, 10.0))\n     *\n     *    API_DEPRECATED_WITH_REPLACEMENT(\"-setName:\", tvos(10.0, 10.4), ios(9.0, 10.0))\n     *    API_DEPRECATED_WITH_REPLACEMENT(\"SomeClassName\", macos(10.4, 10.6), watchos(2.0, 3.0))\n     */\n\n    #define API_DEPRECATED(...) __API_DEPRECATED_MSG_GET_MACRO(__VA_ARGS__,__API_DEPRECATED_MSG8,__API_DEPRECATED_MSG7, __API_DEPRECATED_MSG6,__API_DEPRECATED_MSG5,__API_DEPRECATED_MSG4,__API_DEPRECATED_MSG3,__API_DEPRECATED_MSG2,__API_DEPRECATED_MSG1, 0)(__VA_ARGS__)\n    #define API_DEPRECATED_WITH_REPLACEMENT(...) __API_DEPRECATED_REP_GET_MACRO(__VA_ARGS__,__API_DEPRECATED_REP8,__API_DEPRECATED_REP7, __API_DEPRECATED_REP6,__API_DEPRECATED_REP5,__API_DEPRECATED_REP4,__API_DEPRECATED_REP3,__API_DEPRECATED_REP2,__API_DEPRECATED_REP1, 0)(__VA_ARGS__)\n\n    #define API_DEPRECATED_BEGIN(...) _Pragma(\"clang attribute push\") __API_DEPRECATED_BEGIN_MSG_GET_MACRO(__VA_ARGS__,__API_DEPRECATED_BEGIN_MSG8,__API_DEPRECATED_BEGIN_MSG7, __API_DEPRECATED_BEGIN_MSG6, __API_DEPRECATED_BEGIN_MSG5, __API_DEPRECATED_BEGIN_MSG4, __API_DEPRECATED_BEGIN_MSG3, __API_DEPRECATED_BEGIN_MSG2, __API_DEPRECATED_BEGIN_MSG1, 0)(__VA_ARGS__)\n    #define API_DEPRECATED_END _Pragma(\"clang attribute pop\")\n\n    #define API_DEPRECATED_WITH_REPLACEMENT_BEGIN(...) _Pragma(\"clang attribute push\") __API_DEPRECATED_BEGIN_REP_GET_MACRO(__VA_ARGS__,__API_DEPRECATED_BEGIN_REP8,__API_DEPRECATED_BEGIN_REP7, __API_DEPRECATED_BEGIN_REP6, __API_DEPRECATED_BEGIN_REP5, __API_DEPRECATED_BEGIN_REP4, __API_DEPRECATED_BEGIN_REP3, __API_DEPRECATED_BEGIN_REP2, __API_DEPRECATED_BEGIN_REP1, 0)(__VA_ARGS__)\n    #define API_DEPRECATED_WITH_REPLACEMENT_END _Pragma(\"clang attribute pop\")\n\n\n    /*\n     * API Unavailability\n     * Use to specify that an API is unavailable for a particular platform.\n     *\n     * Example:\n     *    API_UNAVAILABLE(macos)\n     *    API_UNAVAILABLE(watchos, tvos)\n     */\n\n    #define API_UNAVAILABLE(...) __API_UNAVAILABLE_GET_MACRO(__VA_ARGS__,__API_UNAVAILABLE7,__API_UNAVAILABLE6, __API_UNAVAILABLE5, __API_UNAVAILABLE4,__API_UNAVAILABLE3,__API_UNAVAILABLE2,__API_UNAVAILABLE1, 0)(__VA_ARGS__)\n\n    #define API_UNAVAILABLE_BEGIN(...) _Pragma(\"clang attribute push\") __API_UNAVAILABLE_BEGIN_GET_MACRO(__VA_ARGS__,__API_UNAVAILABLE_BEGIN7,__API_UNAVAILABLE_BEGIN6, __API_UNAVAILABLE_BEGIN5, __API_UNAVAILABLE_BEGIN4, __API_UNAVAILABLE_BEGIN3, __API_UNAVAILABLE_BEGIN2, __API_UNAVAILABLE_BEGIN1, 0)(__VA_ARGS__)\n    #define API_UNAVAILABLE_END _Pragma(\"clang attribute pop\")\n #else\n\n    /* \n     * Evaluate to nothing for compilers that don't support availability.\n     */\n   \n     #define API_AVAILABLE(...)\n     #define API_AVAILABLE_BEGIN(...)\n     #define API_AVAILABLE_END\n     #define API_DEPRECATED(...)\n     #define API_DEPRECATED_WITH_REPLACEMENT(...)\n     #define API_DEPRECATED_BEGIN(...)\n     #define API_DEPRECATED_END\n     #define API_DEPRECATED_WITH_REPLACEMENT_BEGIN(...)\n     #define API_DEPRECATED_WITH_REPLACEMENT_END\n     #define API_UNAVAILABLE(...)\n     #define API_UNAVAILABLE_BEGIN(...)\n     #define API_UNAVAILABLE_END\n #endif /* __has_attribute(availability) */\n#else\n\n    /* \n     * Evaluate to nothing for compilers that don't support clang language extensions.\n     */\n\n    #define API_AVAILABLE(...)\n    #define API_AVAILABLE_BEGIN(...)\n    #define API_AVAILABLE_END\n    #define API_DEPRECATED(...)\n    #define API_DEPRECATED_WITH_REPLACEMENT(...)\n    #define API_DEPRECATED_BEGIN(...)\n    #define API_DEPRECATED_END\n    #define API_DEPRECATED_WITH_REPLACEMENT_BEGIN(...)\n    #define API_DEPRECATED_WITH_REPLACEMENT_END\n    #define API_UNAVAILABLE(...)\n    #define API_UNAVAILABLE_BEGIN(...)\n    #define API_UNAVAILABLE_END\n#endif /* #if defined(__has_feature) && defined(__has_attribute) */\n\n#if __has_include(<AvailabilityProhibitedInternal.h>)\n  #include <AvailabilityProhibitedInternal.h>\n#endif\n\n/*\n * If SPI decorations have not been defined elsewhere, disable them.\n */\n\n#ifndef SPI_AVAILABLE\n  #define SPI_AVAILABLE(...)\n#endif\n\n#ifndef SPI_DEPRECATED\n  #define SPI_DEPRECATED(...)\n#endif\n\n#ifndef SPI_DEPRECATED_WITH_REPLACEMENT\n  #define SPI_DEPRECATED_WITH_REPLACEMENT(...)\n#endif\n\n#endif /* __OS_AVAILABILITY__ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/os/base.h",
    "content": "/*\n * Copyright (c) 2008-2020 Apple Inc. All rights reserved.\n *\n * @APPLE_APACHE_LICENSE_HEADER_START@\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * @APPLE_APACHE_LICENSE_HEADER_END@\n */\n\n#ifndef __OS_BASE__\n#define __OS_BASE__\n\n#include <sys/cdefs.h>\n\n\n#ifndef __has_builtin\n#define __has_builtin(x) 0\n#endif\n#ifndef __has_include\n#define __has_include(x) 0\n#endif\n#ifndef __has_feature\n#define __has_feature(x) 0\n#endif\n#ifndef __has_attribute\n#define __has_attribute(x) 0\n#endif\n#ifndef __has_extension\n#define __has_extension(x) 0\n#endif\n\n#undef OS_INLINE // <sys/_types/_os_inline.h>\n#if __GNUC__\n#define OS_NORETURN __attribute__((__noreturn__))\n#define OS_NOTHROW __attribute__((__nothrow__))\n#define OS_NONNULL1 __attribute__((__nonnull__(1)))\n#define OS_NONNULL2 __attribute__((__nonnull__(2)))\n#define OS_NONNULL3 __attribute__((__nonnull__(3)))\n#define OS_NONNULL4 __attribute__((__nonnull__(4)))\n#define OS_NONNULL5 __attribute__((__nonnull__(5)))\n#define OS_NONNULL6 __attribute__((__nonnull__(6)))\n#define OS_NONNULL7 __attribute__((__nonnull__(7)))\n#define OS_NONNULL8 __attribute__((__nonnull__(8)))\n#define OS_NONNULL9 __attribute__((__nonnull__(9)))\n#define OS_NONNULL10 __attribute__((__nonnull__(10)))\n#define OS_NONNULL11 __attribute__((__nonnull__(11)))\n#define OS_NONNULL12 __attribute__((__nonnull__(12)))\n#define OS_NONNULL13 __attribute__((__nonnull__(13)))\n#define OS_NONNULL14 __attribute__((__nonnull__(14)))\n#define OS_NONNULL15 __attribute__((__nonnull__(15)))\n#define OS_NONNULL_ALL __attribute__((__nonnull__))\n#define OS_SENTINEL __attribute__((__sentinel__))\n#define OS_PURE __attribute__((__pure__))\n#define OS_CONST __attribute__((__const__))\n#define OS_WARN_RESULT __attribute__((__warn_unused_result__))\n#define OS_MALLOC __attribute__((__malloc__))\n#define OS_USED __attribute__((__used__))\n#define OS_UNUSED __attribute__((__unused__))\n#define OS_COLD __attribute__((__cold__))\n#define OS_WEAK __attribute__((__weak__))\n#define OS_WEAK_IMPORT __attribute__((__weak_import__))\n#define OS_NOINLINE __attribute__((__noinline__))\n#define OS_ALWAYS_INLINE __attribute__((__always_inline__))\n#define OS_TRANSPARENT_UNION __attribute__((__transparent_union__))\n#define OS_ALIGNED(n) __attribute__((__aligned__((n))))\n#define OS_FORMAT_PRINTF(x, y) __attribute__((__format__(printf,x,y)))\n#define OS_EXPORT extern __attribute__((__visibility__(\"default\")))\n#define OS_INLINE static __inline__\n#define OS_EXPECT(x, v) __builtin_expect((x), (v))\n#else\n#define OS_NORETURN\n#define OS_NOTHROW\n#define OS_NONNULL1\n#define OS_NONNULL2\n#define OS_NONNULL3\n#define OS_NONNULL4\n#define OS_NONNULL5\n#define OS_NONNULL6\n#define OS_NONNULL7\n#define OS_NONNULL8\n#define OS_NONNULL9\n#define OS_NONNULL10\n#define OS_NONNULL11\n#define OS_NONNULL12\n#define OS_NONNULL13\n#define OS_NONNULL14\n#define OS_NONNULL15\n#define OS_NONNULL_ALL\n#define OS_SENTINEL\n#define OS_PURE\n#define OS_CONST\n#define OS_WARN_RESULT\n#define OS_MALLOC\n#define OS_USED\n#define OS_UNUSED\n#define OS_COLD\n#define OS_WEAK\n#define OS_WEAK_IMPORT\n#define OS_NOINLINE\n#define OS_ALWAYS_INLINE\n#define OS_TRANSPARENT_UNION\n#define OS_ALIGNED(n)\n#define OS_FORMAT_PRINTF(x, y)\n#define OS_EXPORT extern\n#define OS_INLINE static inline\n#define OS_EXPECT(x, v) (x)\n#endif\n\n#if __has_attribute(noescape)\n#define OS_NOESCAPE __attribute__((__noescape__))\n#else\n#define OS_NOESCAPE\n#endif\n\n#if defined(__cplusplus) && defined(__clang__)\n#define OS_FALLTHROUGH [[clang::fallthrough]]\n#elif __has_attribute(fallthrough)\n#define OS_FALLTHROUGH __attribute__((__fallthrough__))\n#else\n#define OS_FALLTHROUGH\n#endif\n\n#if __has_feature(assume_nonnull)\n#define OS_ASSUME_NONNULL_BEGIN _Pragma(\"clang assume_nonnull begin\")\n#define OS_ASSUME_NONNULL_END   _Pragma(\"clang assume_nonnull end\")\n#else\n#define OS_ASSUME_NONNULL_BEGIN\n#define OS_ASSUME_NONNULL_END\n#endif\n\n#if __has_builtin(__builtin_assume)\n#define OS_COMPILER_CAN_ASSUME(expr) __builtin_assume(expr)\n#else\n#define OS_COMPILER_CAN_ASSUME(expr) ((void)(expr))\n#endif\n\n#if __has_extension(attribute_overloadable)\n#define OS_OVERLOADABLE __attribute__((__overloadable__))\n#else\n#define OS_OVERLOADABLE\n#endif\n\n#if __has_attribute(analyzer_suppress)\n#define OS_ANALYZER_SUPPRESS(RADAR) __attribute__((analyzer_suppress))\n#else\n#define OS_ANALYZER_SUPPRESS(RADAR)\n#endif\n\n#if __has_attribute(enum_extensibility)\n#define __OS_ENUM_ATTR __attribute__((enum_extensibility(open)))\n#define __OS_ENUM_ATTR_CLOSED __attribute__((enum_extensibility(closed)))\n#else\n#define __OS_ENUM_ATTR\n#define __OS_ENUM_ATTR_CLOSED\n#endif // __has_attribute(enum_extensibility)\n\n#if __has_attribute(flag_enum)\n/*!\n * Compile with -Wflag-enum and -Wassign-enum to enforce at definition and\n * assignment, respectively, i.e. -Wflag-enum prevents you from creating new\n * enumeration values from illegal values within the enum definition, and\n * -Wassign-enum prevents you from assigning illegal values to a variable of the\n * enum type.\n */\n#define __OS_OPTIONS_ATTR __attribute__((flag_enum))\n#else\n#define __OS_OPTIONS_ATTR\n#endif // __has_attribute(flag_enum)\n\n#if __has_feature(objc_fixed_enum) || __has_extension(cxx_fixed_enum) || \\\n        __has_extension(cxx_strong_enums)\n#define OS_ENUM(_name, _type, ...) \\\n\ttypedef enum : _type { __VA_ARGS__ } _name##_t\n#define OS_CLOSED_ENUM(_name, _type, ...) \\\n\ttypedef enum : _type { __VA_ARGS__ } __OS_ENUM_ATTR_CLOSED _name##_t\n#define OS_OPTIONS(_name, _type, ...) \\\n\ttypedef enum : _type { __VA_ARGS__ } __OS_ENUM_ATTR __OS_OPTIONS_ATTR _name##_t\n#define OS_CLOSED_OPTIONS(_name, _type, ...) \\\n\ttypedef enum : _type { __VA_ARGS__ } __OS_ENUM_ATTR_CLOSED __OS_OPTIONS_ATTR _name##_t\n#else\n/*!\n * There is unfortunately no good way in plain C to have both fixed-type enums\n * and enforcement for clang's enum_extensibility extensions. The primary goal\n * of these macros is to allow you to define an enum and specify its width in a\n * single statement, and for plain C that is accomplished by defining an\n * anonymous enum and then separately typedef'ing the requested type name to the\n * requested underlying integer type. So the type emitted actually has no\n * relationship at all to the enum, and therefore while the compiler could\n * enforce enum extensibility if you used the enum type, it cannot do so if you\n * use the \"_t\" type resulting from this expression.\n *\n * But we still define a named enum type and decorate it appropriately for you,\n * so if you really want the enum extensibility enforcement, you can use the\n * enum type yourself, i.e. when compiling with a C compiler:\n *\n *     OS_CLOSED_ENUM(my_type, uint64_t,\n *         FOO,\n *         BAR,\n *         BAZ,\n *     );\n *\n *     my_type_t mt = 98; // legal\n *     enum my_type emt = 98; // illegal\n *\n * But be aware that the underlying enum type's width is subject only to the C\n * language's guarantees -- namely that it will be compatible with int, char,\n * and unsigned char. It is not safe to rely on the size of this type.\n *\n * When compiling in ObjC or C++, both of the above assignments are illegal.\n */\n#define __OS_ENUM_C_FALLBACK(_name, _type, ...) \\\n\ttypedef _type _name##_t; enum _name { __VA_ARGS__ }\n\n#define OS_ENUM(_name, _type, ...) \\\n\ttypedef _type _name##_t; enum { __VA_ARGS__ }\n#define OS_CLOSED_ENUM(_name, _type, ...) \\\n\t__OS_ENUM_C_FALLBACK(_name, _type, ## __VA_ARGS__) \\\n\t__OS_ENUM_ATTR_CLOSED\n#define OS_OPTIONS(_name, _type, ...) \\\n\t__OS_ENUM_C_FALLBACK(_name, _type, ## __VA_ARGS__) \\\n\t__OS_ENUM_ATTR __OS_OPTIONS_ATTR\n#define OS_CLOSED_OPTIONS(_name, _type, ...) \\\n\t__OS_ENUM_C_FALLBACK(_name, _type, ## __VA_ARGS__) \\\n\t__OS_ENUM_ATTR_CLOSED __OS_OPTIONS_ATTR\n#endif // __has_feature(objc_fixed_enum) || __has_extension(cxx_strong_enums)\n\n#if __has_feature(attribute_availability_swift)\n// equivalent to __SWIFT_UNAVAILABLE from Availability.h\n#define OS_SWIFT_UNAVAILABLE(_msg) \\\n\t__attribute__((__availability__(swift, unavailable, message=_msg)))\n#else\n#define OS_SWIFT_UNAVAILABLE(_msg)\n#endif\n\n#if __has_attribute(swift_private)\n# define OS_REFINED_FOR_SWIFT __attribute__((__swift_private__))\n#else\n# define OS_REFINED_FOR_SWIFT\n#endif\n\n#if __has_attribute(swift_name)\n# define OS_SWIFT_NAME(_name) __attribute__((__swift_name__(#_name)))\n#else\n# define OS_SWIFT_NAME(_name)\n#endif\n\n#define __OS_STRINGIFY(s) #s\n#define OS_STRINGIFY(s) __OS_STRINGIFY(s)\n#define __OS_CONCAT(x, y) x ## y\n#define OS_CONCAT(x, y) __OS_CONCAT(x, y)\n\n#ifdef __GNUC__\n#define os_prevent_tail_call_optimization()  __asm__(\"\")\n#define os_is_compile_time_constant(expr)    __builtin_constant_p(expr)\n#define os_compiler_barrier()                __asm__ __volatile__(\"\" ::: \"memory\")\n#else\n#define os_prevent_tail_call_optimization()  do { } while (0)\n#define os_is_compile_time_constant(expr)    0\n#define os_compiler_barrier()                do { } while (0)\n#endif\n\n#if __has_attribute(not_tail_called)\n#define OS_NOT_TAIL_CALLED __attribute__((__not_tail_called__))\n#else\n#define OS_NOT_TAIL_CALLED\n#endif\n\n\ntypedef void (*os_function_t)(void *_Nullable);\n\n#ifdef __BLOCKS__\n/*!\n * @typedef os_block_t\n *\n * @abstract\n * Generic type for a block taking no arguments and returning no value.\n *\n * @discussion\n * When not building with Objective-C ARC, a block object allocated on or\n * copied to the heap must be released with a -[release] message or the\n * Block_release() function.\n *\n * The declaration of a block literal allocates storage on the stack.\n * Therefore, this is an invalid construct:\n * <code>\n * os_block_t block;\n * if (x) {\n *     block = ^{ printf(\"true\\n\"); };\n * } else {\n *     block = ^{ printf(\"false\\n\"); };\n * }\n * block(); // unsafe!!!\n * </code>\n *\n * What is happening behind the scenes:\n * <code>\n * if (x) {\n *     struct Block __tmp_1 = ...; // setup details\n *     block = &__tmp_1;\n * } else {\n *     struct Block __tmp_2 = ...; // setup details\n *     block = &__tmp_2;\n * }\n * </code>\n *\n * As the example demonstrates, the address of a stack variable is escaping the\n * scope in which it is allocated. That is a classic C bug.\n *\n * Instead, the block literal must be copied to the heap with the Block_copy()\n * function or by sending it a -[copy] message.\n */\ntypedef void (^os_block_t)(void);\n#endif\n\n\n\n#endif // __OS_BASE__\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/os/clock.h",
    "content": "#ifndef __OS_CLOCK__\n#define __OS_CLOCK__\n\n#include <os/base.h>\n#include <stdint.h>\n\n/*\n * @typedef os_clockid_t\n *\n * @abstract\n * Describes the kind of clock that the workgroup timestamp parameters are\n * specified in\n */\nOS_ENUM(os_clockid, uint32_t,\n\t\tOS_CLOCK_MACH_ABSOLUTE_TIME = 32,\n);\n\n#endif /* __OS_CLOCK__ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/os/lock.h",
    "content": "/*\n * Copyright (c) 2016 Apple Inc. All rights reserved.\n *\n * @APPLE_APACHE_LICENSE_HEADER_START@\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * @APPLE_APACHE_LICENSE_HEADER_END@\n */\n\n#ifndef __OS_LOCK__\n#define __OS_LOCK__\n\n#include <Availability.h>\n#include <sys/cdefs.h>\n#include <stddef.h>\n#include <stdint.h>\n#include <stdbool.h>\n#include <os/base.h>\n\nOS_ASSUME_NONNULL_BEGIN\n\n/*! @header\n * Low-level lock API.\n */\n\n#define OS_LOCK_API_VERSION 20160309\n\n__BEGIN_DECLS\n\n#define OS_UNFAIR_LOCK_AVAILABILITY \\\n\t\t__API_AVAILABLE(macos(10.12), ios(10.0), tvos(10.0), watchos(3.0))\n\n/*!\n * @typedef os_unfair_lock\n *\n * @abstract\n * Low-level lock that allows waiters to block efficiently on contention.\n *\n * In general, higher level synchronization primitives such as those provided by\n * the pthread or dispatch subsystems should be preferred.\n *\n * The values stored in the lock should be considered opaque and implementation\n * defined, they contain thread ownership information that the system may use\n * to attempt to resolve priority inversions.\n *\n * This lock must be unlocked from the same thread that locked it, attempts to\n * unlock from a different thread will cause an assertion aborting the process.\n *\n * This lock must not be accessed from multiple processes or threads via shared\n * or multiply-mapped memory, the lock implementation relies on the address of\n * the lock value and owning process.\n *\n * Must be initialized with OS_UNFAIR_LOCK_INIT\n *\n * @discussion\n * Replacement for the deprecated OSSpinLock. Does not spin on contention but\n * waits in the kernel to be woken up by an unlock.\n *\n * As with OSSpinLock there is no attempt at fairness or lock ordering, e.g. an\n * unlocker can potentially immediately reacquire the lock before a woken up\n * waiter gets an opportunity to attempt to acquire the lock. This may be\n * advantageous for performance reasons, but also makes starvation of waiters a\n * possibility.\n */\nOS_UNFAIR_LOCK_AVAILABILITY\ntypedef struct os_unfair_lock_s {\n\tuint32_t _os_unfair_lock_opaque;\n} os_unfair_lock, *os_unfair_lock_t;\n\n#ifndef OS_UNFAIR_LOCK_INIT\n#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L\n#define OS_UNFAIR_LOCK_INIT ((os_unfair_lock){0})\n#elif defined(__cplusplus) && __cplusplus >= 201103L\n#define OS_UNFAIR_LOCK_INIT (os_unfair_lock{})\n#elif defined(__cplusplus)\n#define OS_UNFAIR_LOCK_INIT (os_unfair_lock())\n#else\n#define OS_UNFAIR_LOCK_INIT {0}\n#endif\n#endif // OS_UNFAIR_LOCK_INIT\n\n/*!\n * @function os_unfair_lock_lock\n *\n * @abstract\n * Locks an os_unfair_lock.\n *\n * @param lock\n * Pointer to an os_unfair_lock.\n */\nOS_UNFAIR_LOCK_AVAILABILITY\nOS_EXPORT OS_NOTHROW OS_NONNULL_ALL\nvoid os_unfair_lock_lock(os_unfair_lock_t lock);\n\n/*!\n * @function os_unfair_lock_trylock\n *\n * @abstract\n * Locks an os_unfair_lock if it is not already locked.\n *\n * @discussion\n * It is invalid to surround this function with a retry loop, if this function\n * returns false, the program must be able to proceed without having acquired\n * the lock, or it must call os_unfair_lock_lock() directly (a retry loop around\n * os_unfair_lock_trylock() amounts to an inefficient implementation of\n * os_unfair_lock_lock() that hides the lock waiter from the system and prevents\n * resolution of priority inversions).\n *\n * @param lock\n * Pointer to an os_unfair_lock.\n *\n * @result\n * Returns true if the lock was succesfully locked and false if the lock was\n * already locked.\n */\nOS_UNFAIR_LOCK_AVAILABILITY\nOS_EXPORT OS_NOTHROW OS_WARN_RESULT OS_NONNULL_ALL\nbool os_unfair_lock_trylock(os_unfair_lock_t lock);\n\n/*!\n * @function os_unfair_lock_unlock\n *\n * @abstract\n * Unlocks an os_unfair_lock.\n *\n * @param lock\n * Pointer to an os_unfair_lock.\n */\nOS_UNFAIR_LOCK_AVAILABILITY\nOS_EXPORT OS_NOTHROW OS_NONNULL_ALL\nvoid os_unfair_lock_unlock(os_unfair_lock_t lock);\n\n/*!\n * @function os_unfair_lock_assert_owner\n *\n * @abstract\n * Asserts that the calling thread is the current owner of the specified\n * unfair lock.\n *\n * @discussion\n * If the lock is currently owned by the calling thread, this function returns.\n *\n * If the lock is unlocked or owned by a different thread, this function\n * asserts and terminates the process.\n *\n * @param lock\n * Pointer to an os_unfair_lock.\n */\nOS_UNFAIR_LOCK_AVAILABILITY\nOS_EXPORT OS_NOTHROW OS_NONNULL_ALL\nvoid os_unfair_lock_assert_owner(os_unfair_lock_t lock);\n\n/*!\n * @function os_unfair_lock_assert_not_owner\n *\n * @abstract\n * Asserts that the calling thread is not the current owner of the specified\n * unfair lock.\n *\n * @discussion\n * If the lock is unlocked or owned by a different thread, this function\n * returns.\n *\n * If the lock is currently owned by the current thread, this function asserts\n * and terminates the process.\n *\n * @param lock\n * Pointer to an os_unfair_lock.\n */\nOS_UNFAIR_LOCK_AVAILABILITY\nOS_EXPORT OS_NOTHROW OS_NONNULL_ALL\nvoid os_unfair_lock_assert_not_owner(os_unfair_lock_t lock);\n\n__END_DECLS\n\nOS_ASSUME_NONNULL_END\n\n#endif // __OS_LOCK__\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/os/log.h",
    "content": "/*\n * Copyright (c) 2015-2016 Apple Inc. All rights reserved.\n */\n\n#ifndef __OS_LOG_H__\n#define __OS_LOG_H__\n\n#include <stdint.h>\n#include <stdbool.h>\n#include <mach-o/loader.h>\n#include <os/availability.h>\n#include <os/base.h>\n#include <os/object.h>\n#include <os/trace.h>\n\n#if !__has_builtin(__builtin_os_log_format)\n#error using os/log.h requires Xcode 8 or later\n#endif\n\n__BEGIN_DECLS\n\n#if OS_OBJECT_SWIFT3\nOS_OBJECT_DECL_SWIFT(os_log);\n#elif OS_OBJECT_USE_OBJC\nOS_OBJECT_DECL(os_log);\n#else\ntypedef struct os_log_s *os_log_t;\n#endif /* OS_OBJECT_USE_OBJC */\n\n/*!\n * @const OS_LOG_DISABLED\n *\n * @discussion\n * Use this to disable a specific log message.\n */\n#if OS_LOG_TARGET_HAS_10_13_FEATURES\n#define OS_LOG_DISABLED OS_OBJECT_GLOBAL_OBJECT(os_log_t, _os_log_disabled)\nAPI_AVAILABLE(macosx(10.13), ios(11.0), watchos(4.0), tvos(11.0))\nOS_EXPORT\nstruct os_log_s _os_log_disabled;\n#else\n#define OS_LOG_DISABLED ((os_log_t _Nonnull)NULL)\n#endif\n\n/*!\n * @const OS_LOG_DEFAULT\n *\n * @discussion\n * Use this to log a message in accordance with current system settings.\n */\n#define OS_LOG_DEFAULT OS_OBJECT_GLOBAL_OBJECT(os_log_t, _os_log_default)\nAPI_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0))\nOS_EXPORT\nstruct os_log_s _os_log_default;\n\n/*!\n * @enum os_log_type_t\n *\n * @discussion\n * Supported log message types.\n *\n * @constant OS_LOG_TYPE_DEFAULT\n * Equivalent type for \"os_log()\" messages, i.e., default messages that are\n * always captured to memory or disk.\n *\n * @constant OS_LOG_TYPE_INFO\n * Equivalent type for \"os_log_info()\" messages, i.e., additional informational\n * messages.\n *\n * @constant OS_LOG_TYPE_DEBUG\n * Equivalent type for \"os_log_debug()\" messages, i.e., debug messages.\n *\n * @constant OS_LOG_TYPE_ERROR\n * Equivalent type for \"os_log_error()\" messages, i.e., messages indicating\n * error conditions.\n *\n * @constant OS_LOG_TYPE_FAULT\n * Equivalent type for \"os_log_fault()\" messages, i.e., messages indicating\n * that an unexpected condition occurred that likely indicates the presence of a\n * bug.\n */\nOS_ENUM(os_log_type, uint8_t,\n    OS_LOG_TYPE_DEFAULT = 0x00,\n    OS_LOG_TYPE_INFO    = 0x01,\n    OS_LOG_TYPE_DEBUG   = 0x02,\n    OS_LOG_TYPE_ERROR   = 0x10,\n    OS_LOG_TYPE_FAULT   = 0x11,\n);\n\n/*!\n * @function os_log_create\n *\n * @abstract\n * Creates a log object to be used with other log related functions.\n *\n * @discussion\n * Creates a log object to be used with other log related functions.  The\n * log object serves two purposes:  (1) tag related messages by subsystem\n * and category name for easy filtering, and (2) control logging system\n * behavior for messages.\n *\n * @param subsystem\n * The identifier of the given subsystem should be in reverse DNS form\n * (i.e., com.company.mysubsystem).\n *\n * @param category\n * The category within the given subsystem that specifies the settings for\n * the log object.\n *\n * @result\n * Returns an os_log_t value to be passed to other os_log API calls.  The\n * logging runtime maintains a global collection of all os_log_t objects, one\n * per subsystem/category pair.  The os_log_t for a given subsystem/category is\n * created upon the first call to os_log_create and any subsequent calls return\n * the same object.  These objects are never deallocated, so dynamic creation\n * (e.g. on a per-operation basis) is generally inappropriate.\n *\n * A value will always be returned to allow for dynamic enablement.\n */\nAPI_AVAILABLE(macos(10.12), ios(10.0), watchos(3.0), tvos(10.0))\nOS_EXPORT OS_NOTHROW OS_WARN_RESULT OS_OBJECT_RETURNS_RETAINED OS_NONNULL_ALL\nos_log_t\nos_log_create(const char *subsystem, const char *category);\n\n/*!\n * @function os_log_info_enabled\n *\n * @abstract\n * Returns if additional information is enabled\n *\n * @discussion\n * Returns if additional information is enabled\n *\n * @param log\n * Pass OS_LOG_DEFAULT or a log object previously created with os_log_create.\n *\n * @result\n * Returns ‘true’ if info log messages are enabled.\n */\n#define os_log_info_enabled(log) os_log_type_enabled(log, OS_LOG_TYPE_INFO)\n\n/*!\n * @function os_log_debug_enabled\n *\n * @abstract\n * Returns if debug log messages are enabled for a particular log object.\n *\n * @discussion\n * Returns if debug log messages are enabled for a particular log object.\n *\n * @param log\n * Pass OS_LOG_DEFAULT or a log object previously created with os_log_create.\n *\n * @result\n * Returns ‘true’ if debug log messages are enabled.\n */\n#define os_log_debug_enabled(log)  os_log_type_enabled(log, OS_LOG_TYPE_DEBUG)\n\n/*!\n * @function os_log_with_type\n *\n * @abstract\n * Log a message using a specific type.\n *\n * @discussion\n * Will log a message with the provided os_log_type_t.\n *\n * @param log\n * Pass OS_LOG_DEFAULT or a log object previously created with os_log_create.\n *\n * @param type\n * Pass a valid type from os_log_type_t.\n *\n * @param format\n * A format string to generate a human-readable log message when the log\n * line is decoded.  This string must be a constant string, not dynamically\n * generated.  Supports all standard printf types in addition to %@ (objects).\n */\n#define os_log_with_type(log, type, format, ...) __extension__({ \\\n    os_log_t _log_tmp = (log); \\\n    os_log_type_t _type_tmp = (type); \\\n    if (os_log_type_enabled(_log_tmp, _type_tmp)) { \\\n        OS_LOG_CALL_WITH_FORMAT(_os_log_impl, \\\n                (&__dso_handle, _log_tmp, _type_tmp), format, ##__VA_ARGS__); \\\n    } \\\n})\n\n/*!\n * @function os_log\n *\n * @abstract\n * Insert a log message into the Unified Logging and Tracing system.\n *\n * @discussion\n * Insert a log message into the Unified Logging and Tracing system in\n * accordance with the preferences specified by the provided log object.\n * These messages cannot be disabled and therefore always captured either\n * to memory or disk.\n *\n * When an os_activity_id_t is present, the log message will also be scoped by\n * that identifier.  Activities provide granular filtering of log messages\n * across threads and processes.\n *\n * There is a physical cap of 1024 bytes per log line for dynamic content,\n * such as %s and %@, that can be written to the persistence store.\n * All content exceeding the limit will be truncated before it is\n * written to disk.\n *\n * @param log\n * Pass OS_LOG_DEFAULT or a log object previously created with os_log_create.\n *\n * @param format\n * A format string to generate a human-readable log message when the log\n * line is decoded.  This string must be a constant string, not dynamically\n * generated.  Supports all standard printf types and %@ (objects).\n */\n#define os_log(log, format, ...) \\\n        os_log_with_type(log, OS_LOG_TYPE_DEFAULT, format, ##__VA_ARGS__)\n\n/*!\n * @function os_log_info\n *\n * @abstract\n * Insert an additional information log message into the Unified Logging\n * and Tracing system.\n *\n * @discussion\n * Insert a log message into the Unified Logging and Tracing system in\n * accordance with the preferences specified by the provided log object.\n *\n * When an os_activity_id_t is present, the log message will also be scoped by\n * that identifier.  Activities provide granular filtering of log messages\n * across threads and processes.\n *\n * There is a physical cap of 256 bytes per entry for dynamic content,\n * i.e., %s and %@, that can be written to the persistence store.  As such,\n * all content exceeding the limit will be truncated before written to disk.\n * Live streams will continue to show the full content.\n *\n * @param log\n * Pass OS_LOG_DEFAULT or a log object previously created with os_log_create.\n *\n * @param format\n * A format string to generate a human-readable log message when the log\n * line is decoded.  This string must be a constant string, not dynamically\n * generated.  Supports all standard printf types and %@ (objects).\n */\n#define os_log_info(log, format, ...) \\\n        os_log_with_type(log, OS_LOG_TYPE_INFO, format, ##__VA_ARGS__)\n\n/*!\n * @function os_log_debug\n *\n * @abstract\n * Insert a debug log message into the Unified Logging and Tracing system.\n *\n * @discussion\n * Insert a debug log message into the Unified Logging and Tracing system in\n * accordance with the preferences specified by the provided log object.\n *\n * When an os_activity_id_t is present, the log message will also be scoped by\n * that identifier.  Activities provide granular filtering of log messages\n * across threads and processes.\n *\n * There is a physical cap of 256 bytes per entry for dynamic content,\n * i.e., %s and %@, that can be written to the persistence store.  As such,\n * all content exceeding the limit will be truncated before written to disk.\n * Live streams will continue to show the full content.\n *\n * @param log\n * Pass OS_LOG_DEFAULT or a log object previously created with os_log_create.\n *\n * @param format\n * A format string to generate a human-readable log message when the log\n * line is decoded.  This string must be a constant string, not dynamically\n * generated.  Supports all standard printf types and %@ (objects).\n */\n#if OS_LOG_TARGET_HAS_10_15_FEATURES\n#define os_log_debug(log, format, ...) __extension__({ \\\n    os_log_t _log_tmp = (log); \\\n    os_log_type_t _type_tmp = OS_LOG_TYPE_DEBUG; \\\n    if (os_log_type_enabled(_log_tmp, _type_tmp)) { \\\n        OS_LOG_CALL_WITH_FORMAT(_os_log_debug_impl, \\\n                (&__dso_handle, _log_tmp, _type_tmp), format, ##__VA_ARGS__); \\\n    } \\\n})\n#else\n#define os_log_debug(log, format, ...) \\\n        os_log_with_type(log, OS_LOG_TYPE_DEBUG, format, ##__VA_ARGS__)\n#endif // OS_LOG_TARGET_HAS_10_15_FEATURES\n\n/*!\n * @function os_log_error\n *\n * @abstract\n * Insert an error log message into the Unified Logging and Tracing system.\n *\n * @discussion\n * Insert an error log message into the Unified Logging and Tracing system.\n *\n * When an os_activity_id_t is present, the log message will also be scoped by\n * that identifier.  Activities provide granular filtering of log messages\n * across threads and processes.\n *\n * There is a physical cap of 256 bytes per entry for dynamic content,\n * i.e., %s and %@, that can be written to the persistence store.  As such,\n * all content exceeding the limit will be truncated before written to disk.\n * Live streams will continue to show the full content.\n *\n * Note, in a debugger, it is possible to set a breakpoint on _os_log_error_impl\n * to break on any error being emitted.\n *\n * A common use of os_log_error is to log failures from system calls and\n * library functions, including the value of errno.  Like other system calls\n * and library functions, the os_log functions do not preserve the value of\n * errno across calls.  errno can change even if the log message is logged\n * successfully.  Consider saving errno into a local variable before calling\n * os_log, if you still need errno's value afterward.\n *\n * @param log\n * Pass OS_LOG_DEFAULT or a log object previously created with os_log_create.\n *\n * @param format\n * A format string to generate a human-readable log message when the log\n * line is decoded.  This string must be a constant string, not dynamically\n * generated.  Supports all standard printf types and %@ (objects).\n */\n#if OS_LOG_TARGET_HAS_10_13_FEATURES\n#define os_log_error(log, format, ...) __extension__({ \\\n    os_log_t _log_tmp = (log); \\\n    os_log_type_t _type_tmp = OS_LOG_TYPE_ERROR; \\\n    if (os_log_type_enabled(_log_tmp, _type_tmp)) { \\\n        OS_LOG_CALL_WITH_FORMAT(_os_log_error_impl, \\\n                (&__dso_handle, _log_tmp, _type_tmp), format, ##__VA_ARGS__); \\\n    } \\\n})\n#else\n#define os_log_error(log, format, ...) \\\n        os_log_with_type(log, OS_LOG_TYPE_ERROR, format, ##__VA_ARGS__)\n#endif // OS_LOG_TARGET_HAS_10_13_FEATURES\n\n/*!\n * @function os_log_fault\n *\n * @abstract\n * Insert a fault log message into the Unified Logging and Tracing system.\n *\n * @discussion\n * Log a fault message into the Unified Logging and Tracing system.\n *\n * Faults should be used to report conditions which indicate the\n * presence of a bug.  Faults will gather more expensive contextual information\n * and record it for later inspection.  They may also be reported to other\n * debugging tools for display or aggregation.\n *\n * Note that faults should only be used for unexpected error conditions in\n * which there's a clear and safe recovery path.  If such a path does not\n * exist, consider the os_crash(3) family of APIs instead.\n *\n * When an os_activity_id_t is present, the log message will also be scoped by\n * that identifier.  Activities provide granular filtering of log messages\n * across threads and processes.\n *\n * There is a physical cap of 256 bytes per entry for dynamic content,\n * i.e., %s and %@, that can be written to the persistence store.  As such,\n * all content exceeding the limit will be truncated before written to disk.\n * Live streams will continue to show the full content.\n *\n * Note, in a debugger, it is possible to set a breakpoint on _os_log_fault_impl\n * to break on any fault being emitted.\n *\n * @param log\n * Pass OS_LOG_DEFAULT or a log object previously created with os_log_create.\n *\n * @param format\n * A format string to generate a human-readable log message when the log\n * line is decoded.  This string must be a constant string, not dynamically\n * generated.  Supports all standard printf types and %@ (objects).\n */\n#if OS_LOG_TARGET_HAS_10_13_FEATURES\n#define os_log_fault(log, format, ...) __extension__({ \\\n    os_log_t _log_tmp = (log); \\\n    os_log_type_t _type_tmp = OS_LOG_TYPE_FAULT; \\\n    if (os_log_type_enabled(_log_tmp, _type_tmp)) { \\\n        OS_LOG_CALL_WITH_FORMAT(_os_log_fault_impl, \\\n                (&__dso_handle, _log_tmp, _type_tmp), format, ##__VA_ARGS__); \\\n    } \\\n})\n#else\n#define os_log_fault(log, format, ...) \\\n        os_log_with_type(log, OS_LOG_TYPE_FAULT, format, ##__VA_ARGS__)\n#endif // OS_LOG_TARGET_HAS_10_13_FEATURES\n\n/*!\n * @function os_log_type_enabled\n *\n * @abstract\n * Evaluate if a specific log type is enabled before doing work\n *\n * @discussion\n * Evaluate if a specific log type is enabled before doing work\n *\n * @param oslog\n * Pass OS_LOG_DEFAULT or a log object previously created with os_log_create.\n *\n * @param type\n * Pass a valid type from os_log_type_t.\n *\n * @result\n * Will return a boolean.\n */\nAPI_AVAILABLE(macos(10.12), ios(10.0), watchos(3.0), tvos(10.0))\nOS_EXPORT OS_NOTHROW OS_WARN_RESULT OS_PURE\nbool\nos_log_type_enabled(os_log_t oslog, os_log_type_t type);\n\n/*!\n * @function _os_log_impl\n *\n * @abstract\n * Internal function that takes compiler generated encoding and captures the necessary content.\n */\nAPI_AVAILABLE(macos(10.12), ios(10.0), watchos(3.0), tvos(10.0))\nOS_EXPORT OS_NOTHROW OS_NOT_TAIL_CALLED\nvoid\n_os_log_impl(void *dso, os_log_t log, os_log_type_t type,\n        const char *format, uint8_t *buf, uint32_t size);\n\n/*!\n * @function _os_log_debug_impl\n *\n * @abstract\n * Internal function that is taken for any debug log emitted in the system.\n */\nAPI_AVAILABLE(macos(10.15), ios(13.0), tvos(13.0), watchos(6.0))\nOS_EXPORT OS_NOTHROW OS_NOT_TAIL_CALLED OS_COLD\nvoid\n_os_log_debug_impl(void *dso, os_log_t log, os_log_type_t type,\n        const char *format, uint8_t *buf, uint32_t size);\n\n/*!\n * @function _os_log_error_impl\n *\n * @abstract\n * Internal function that is taken for any error emitted in the system.\n */\nAPI_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0))\nOS_EXPORT OS_NOTHROW OS_NOT_TAIL_CALLED OS_COLD\nvoid\n_os_log_error_impl(void *dso, os_log_t log, os_log_type_t type,\n        const char *format, uint8_t *buf, uint32_t size);\n\n/*!\n * @function _os_log_fault_impl\n *\n * @abstract\n * Internal function that is taken for any fault emitted in the system.\n */\nAPI_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0))\nOS_EXPORT OS_NOTHROW OS_NOT_TAIL_CALLED OS_COLD\nvoid\n_os_log_fault_impl(void *dso, os_log_t log, os_log_type_t type,\n        const char *format, uint8_t *buf, uint32_t size);\n\n/*\n * Support for older iteration of API for source compatibility only...\n */\n\nAPI_DEPRECATED(\"no longer supported, use os_log_debug(OS_LOG_DEFAULT, ...)\",\n        macos(10.11,10.12), ios(9.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0))\nOS_EXPORT OS_NOTHROW OS_NOT_TAIL_CALLED\nvoid\n_os_log_internal(void *dso, os_log_t log, os_log_type_t type, const char *message, ...);\n\nAPI_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0))\nOS_EXPORT OS_NOTHROW OS_WARN_RESULT OS_OBJECT_RETURNS_RETAINED OS_NOT_TAIL_CALLED OS_NONNULL_ALL\nos_log_t\n_os_log_create(void *dso, const char *subsystem, const char *category);\n\nAPI_DEPRECATED(\"no longer suppored - always returns true\",\n        macos(10.11,10.12), ios(9.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0))\nOS_EXPORT OS_NOTHROW OS_WARN_RESULT\nbool\nos_log_is_enabled(os_log_t log);\n\nAPI_DEPRECATED_WITH_REPLACEMENT(\"os_log_debug_enabled\",\n        macos(10.11,10.12), ios(9.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0))\nOS_EXPORT OS_NOTHROW OS_WARN_RESULT\nbool\nos_log_is_debug_enabled(os_log_t log);\n\nAPI_DEPRECATED(\"no longer supported - use os_log with per-parameter privacy options\",\n        macos(10.11,10.12), ios(9.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0))\nOS_NOTHROW OS_ALWAYS_INLINE\nstatic inline void\n_os_log_sensitive_deprecated(void) { }\n\n#define os_log_sensitive(log, format, ...) __extension__({              \\\n    os_log_with_type(log, OS_LOG_TYPE_DEFAULT, format, ##__VA_ARGS__);  \\\n    _os_log_sensitive_deprecated();                                     \\\n})\n\n#define os_log_sensitive_debug(log, format, ...) __extension__({        \\\n    os_log_with_type(log, OS_LOG_TYPE_DEBUG, format, ##__VA_ARGS__);    \\\n    _os_log_sensitive_deprecated();                                     \\\n})\n\n#if !OS_LOG_TARGET_HAS_10_12_FEATURES\n#undef os_log_with_type\n#define os_log_with_type(log, type, format, ...) __extension__({ \\\n    _Pragma(\"clang diagnostic push\") \\\n    _Pragma(\"clang diagnostic error \\\"-Wformat\\\"\") \\\n    _Static_assert(__builtin_constant_p(format), \"format argument must be a string constant\"); \\\n    _os_log_internal(&__dso_handle, log, type, format, ##__VA_ARGS__); \\\n    _Pragma(\"clang diagnostic pop\") \\\n})\n\n#undef os_log_debug_enabled\n#define os_log_debug_enabled(...) os_log_is_debug_enabled(__VA_ARGS__)\n\n#undef os_log_create\n#define os_log_create(subsystem, category) \\\n        _os_log_create(&__dso_handle, subsystem, category)\n#endif // !OS_LOG_TARGET_HAS_10_12_FEATURES\n\n__END_DECLS\n\n#endif // !__OS_LOG_H__\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/os/object.h",
    "content": "/*\n * Copyright (c) 2011-2014 Apple Inc. All rights reserved.\n *\n * @APPLE_APACHE_LICENSE_HEADER_START@\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * @APPLE_APACHE_LICENSE_HEADER_END@\n */\n\n#ifndef __OS_OBJECT__\n#define __OS_OBJECT__\n\n#ifdef __APPLE__\n#include <Availability.h>\n#include <os/availability.h>\n#include <TargetConditionals.h>\n#include <os/base.h>\n#elif defined(_WIN32)\n#include <os/generic_win_base.h>\n#elif defined(__unix__)\n#include <os/generic_unix_base.h>\n#endif\n\n/*!\n * @header\n *\n * @preprocinfo\n * By default, libSystem objects such as GCD and XPC objects are declared as\n * Objective-C types when building with an Objective-C compiler. This allows\n * them to participate in ARC, in RR management by the Blocks runtime and in\n * leaks checking by the static analyzer, and enables them to be added to Cocoa\n * collections.\n *\n * NOTE: this requires explicit cancellation of dispatch sources and xpc\n *       connections whose handler blocks capture the source/connection object,\n *       resp. ensuring that such captures do not form retain cycles (e.g. by\n *       declaring the source as __weak).\n *\n * To opt-out of this default behavior, add -DOS_OBJECT_USE_OBJC=0 to your\n * compiler flags.\n *\n * This mode requires a platform with the modern Objective-C runtime, the\n * Objective-C GC compiler option to be disabled, and at least a Mac OS X 10.8\n * or iOS 6.0 deployment target.\n */\n\n#ifndef OS_OBJECT_HAVE_OBJC_SUPPORT\n#if !defined(__OBJC__) || defined(__OBJC_GC__)\n#  define OS_OBJECT_HAVE_OBJC_SUPPORT 0\n#elif !defined(TARGET_OS_MAC) || !TARGET_OS_MAC\n#  define OS_OBJECT_HAVE_OBJC_SUPPORT 0\n#elif TARGET_OS_IOS && __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_6_0\n#  define OS_OBJECT_HAVE_OBJC_SUPPORT 0\n#elif TARGET_OS_MAC && !TARGET_OS_IPHONE\n#  if __MAC_OS_X_VERSION_MIN_REQUIRED < __MAC_10_8\n#  define OS_OBJECT_HAVE_OBJC_SUPPORT 0\n#  elif defined(__i386__) && __MAC_OS_X_VERSION_MIN_REQUIRED < __MAC_10_12\n#  define OS_OBJECT_HAVE_OBJC_SUPPORT 0\n#  else\n#  define OS_OBJECT_HAVE_OBJC_SUPPORT 1\n#  endif\n#else\n#  define OS_OBJECT_HAVE_OBJC_SUPPORT 1\n#endif\n#endif // OS_OBJECT_HAVE_OBJC_SUPPORT\n\n#if OS_OBJECT_HAVE_OBJC_SUPPORT\n#if defined(__swift__) && __swift__ && !OS_OBJECT_USE_OBJC\n#define OS_OBJECT_USE_OBJC 1\n#endif\n#ifndef OS_OBJECT_USE_OBJC\n#define OS_OBJECT_USE_OBJC 1\n#endif\n#elif defined(OS_OBJECT_USE_OBJC) && OS_OBJECT_USE_OBJC\n/* Unsupported platform for OS_OBJECT_USE_OBJC=1 */\n#undef OS_OBJECT_USE_OBJC\n#define OS_OBJECT_USE_OBJC 0\n#else\n#define OS_OBJECT_USE_OBJC 0\n#endif\n\n#ifndef OS_OBJECT_SWIFT3\n#ifdef __swift__\n#define OS_OBJECT_SWIFT3 1\n#else // __swift__\n#define OS_OBJECT_SWIFT3 0\n#endif // __swift__\n#endif // OS_OBJECT_SWIFT3\n\n#if __has_feature(assume_nonnull)\n#define OS_OBJECT_ASSUME_NONNULL_BEGIN _Pragma(\"clang assume_nonnull begin\")\n#define OS_OBJECT_ASSUME_NONNULL_END   _Pragma(\"clang assume_nonnull end\")\n#else\n#define OS_OBJECT_ASSUME_NONNULL_BEGIN\n#define OS_OBJECT_ASSUME_NONNULL_END\n#endif\n#define OS_OBJECT_WARN_UNUSED_RESULT __attribute__((__warn_unused_result__))\n\n#if OS_OBJECT_USE_OBJC\n#import <objc/NSObject.h>\n#if __has_attribute(objc_independent_class)\n#define OS_OBJC_INDEPENDENT_CLASS __attribute__((objc_independent_class))\n#endif // __has_attribute(objc_independent_class)\n#ifndef OS_OBJC_INDEPENDENT_CLASS\n#define OS_OBJC_INDEPENDENT_CLASS\n#endif\n#define OS_OBJECT_CLASS(name) OS_##name\n#define OS_OBJECT_DECL_PROTOCOL(name, ...) \\\n\t\t@protocol OS_OBJECT_CLASS(name) __VA_ARGS__ \\\n\t\t@end\n#define OS_OBJECT_CLASS_IMPLEMENTS_PROTOCOL_IMPL(name, proto) \\\n\t\t@interface name () <proto> \\\n\t\t@end\n#define OS_OBJECT_CLASS_IMPLEMENTS_PROTOCOL(name, proto) \\\n\t\tOS_OBJECT_CLASS_IMPLEMENTS_PROTOCOL_IMPL( \\\n\t\t\t\tOS_OBJECT_CLASS(name), OS_OBJECT_CLASS(proto))\n#define OS_OBJECT_DECL_IMPL(name, adhere, ...) \\\n\t\tOS_OBJECT_DECL_PROTOCOL(name, __VA_ARGS__) \\\n\t\ttypedef adhere<OS_OBJECT_CLASS(name)> \\\n\t\t\t\t* OS_OBJC_INDEPENDENT_CLASS name##_t\n#define OS_OBJECT_DECL_BASE(name, ...) \\\n\t\t@interface OS_OBJECT_CLASS(name) : __VA_ARGS__ \\\n\t\t- (instancetype)init OS_SWIFT_UNAVAILABLE(\"Unavailable in Swift\"); \\\n\t\t@end\n#define OS_OBJECT_DECL_IMPL_CLASS(name, ...) \\\n\t\tOS_OBJECT_DECL_BASE(name, ## __VA_ARGS__) \\\n\t\ttypedef OS_OBJECT_CLASS(name) \\\n\t\t\t\t* OS_OBJC_INDEPENDENT_CLASS name##_t\n#define OS_OBJECT_DECL(name, ...) \\\n\t\tOS_OBJECT_DECL_IMPL(name, NSObject, <NSObject>)\n#define OS_OBJECT_DECL_SUBCLASS(name, super) \\\n\t\tOS_OBJECT_DECL_IMPL(name, NSObject, <OS_OBJECT_CLASS(super)>)\n#if __has_attribute(ns_returns_retained)\n#define OS_OBJECT_RETURNS_RETAINED __attribute__((__ns_returns_retained__))\n#else\n#define OS_OBJECT_RETURNS_RETAINED\n#endif\n#if __has_attribute(ns_consumed)\n#define OS_OBJECT_CONSUMED __attribute__((__ns_consumed__))\n#else\n#define OS_OBJECT_CONSUMED\n#endif\n#if __has_feature(objc_arc)\n#define OS_OBJECT_BRIDGE __bridge\n#define OS_WARN_RESULT_NEEDS_RELEASE\n#else\n#define OS_OBJECT_BRIDGE\n#define OS_WARN_RESULT_NEEDS_RELEASE OS_WARN_RESULT\n#endif\n\n\n#if __has_attribute(objc_runtime_visible) && \\\n\t\t((defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && \\\n\t\t__MAC_OS_X_VERSION_MIN_REQUIRED < __MAC_10_12) || \\\n\t\t(defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && \\\n\t\t!defined(__TV_OS_VERSION_MIN_REQUIRED) && \\\n\t\t!defined(__WATCH_OS_VERSION_MIN_REQUIRED) && \\\n\t\t__IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_10_0) || \\\n\t\t(defined(__TV_OS_VERSION_MIN_REQUIRED) && \\\n\t\t__TV_OS_VERSION_MIN_REQUIRED < __TVOS_10_0) || \\\n\t\t(defined(__WATCH_OS_VERSION_MIN_REQUIRED) && \\\n\t\t__WATCH_OS_VERSION_MIN_REQUIRED < __WATCHOS_3_0))\n/*\n * To provide backward deployment of ObjC objects in Swift on pre-10.12\n * SDKs, OS_object classes can be marked as OS_OBJECT_OBJC_RUNTIME_VISIBLE.\n * When compiling with a deployment target earlier than OS X 10.12 (iOS 10.0,\n * tvOS 10.0, watchOS 3.0) the Swift compiler will only refer to this type at\n * runtime (using the ObjC runtime).\n */\n#define OS_OBJECT_OBJC_RUNTIME_VISIBLE __attribute__((objc_runtime_visible))\n#else\n#define OS_OBJECT_OBJC_RUNTIME_VISIBLE\n#endif\n#ifndef OS_OBJECT_USE_OBJC_RETAIN_RELEASE\n#if defined(__clang_analyzer__)\n#define OS_OBJECT_USE_OBJC_RETAIN_RELEASE 1\n#elif __has_feature(objc_arc) && !OS_OBJECT_SWIFT3\n#define OS_OBJECT_USE_OBJC_RETAIN_RELEASE 1\n#else\n#define OS_OBJECT_USE_OBJC_RETAIN_RELEASE 0\n#endif\n#endif\n#if OS_OBJECT_SWIFT3\n#define OS_OBJECT_DECL_SWIFT(name) \\\n\t\tOS_EXPORT OS_OBJECT_OBJC_RUNTIME_VISIBLE \\\n\t\tOS_OBJECT_DECL_IMPL_CLASS(name, NSObject)\n#define OS_OBJECT_DECL_SUBCLASS_SWIFT(name, super) \\\n\t\tOS_EXPORT OS_OBJECT_OBJC_RUNTIME_VISIBLE \\\n\t\tOS_OBJECT_DECL_IMPL_CLASS(name, OS_OBJECT_CLASS(super))\n#endif // OS_OBJECT_SWIFT3\nOS_EXPORT OS_OBJECT_OBJC_RUNTIME_VISIBLE\nOS_OBJECT_DECL_BASE(object, NSObject);\n#else\n/*! @parseOnly */\n#define OS_OBJECT_RETURNS_RETAINED\n/*! @parseOnly */\n#define OS_OBJECT_CONSUMED\n/*! @parseOnly */\n#define OS_OBJECT_BRIDGE\n/*! @parseOnly */\n#define OS_WARN_RESULT_NEEDS_RELEASE OS_WARN_RESULT\n/*! @parseOnly */\n#define OS_OBJECT_OBJC_RUNTIME_VISIBLE\n#define OS_OBJECT_USE_OBJC_RETAIN_RELEASE 0\n#endif\n\n#if OS_OBJECT_SWIFT3\n#define OS_OBJECT_DECL_CLASS(name) \\\n\t\tOS_OBJECT_DECL_SUBCLASS_SWIFT(name, object)\n#elif OS_OBJECT_USE_OBJC\n#define OS_OBJECT_DECL_CLASS(name) \\\n\t\tOS_OBJECT_DECL(name)\n#else\n#define OS_OBJECT_DECL_CLASS(name) \\\n\t\ttypedef struct name##_s *name##_t\n#endif\n\n#if OS_OBJECT_USE_OBJC\n/* Declares a class of the specific name and exposes the interface and typedefs\n * name##_t to the pointer to the class */\n#define OS_OBJECT_SHOW_CLASS(name, ...) \\\n\t\tOS_EXPORT OS_OBJECT_OBJC_RUNTIME_VISIBLE \\\n\t\tOS_OBJECT_DECL_IMPL_CLASS(name, ## __VA_ARGS__ )\n/* Declares a subclass of the same name, and\n * subclass adheres to protocol specified. Typedefs baseclass<proto> * to subclass##_t */\n#define OS_OBJECT_SHOW_SUBCLASS(subclass_name, super, proto_name) \\\n\t\tOS_EXPORT OS_OBJECT_OBJC_RUNTIME_VISIBLE \\\n\t\tOS_OBJECT_DECL_BASE(subclass_name, OS_OBJECT_CLASS(super)<OS_OBJECT_CLASS(proto_name)>); \\\n\t\ttypedef OS_OBJECT_CLASS(super)<OS_OBJECT_CLASS(proto_name)> \\\n\t\t\t\t* OS_OBJC_INDEPENDENT_CLASS subclass_name##_t\n#else /* Plain C */\n#define OS_OBJECT_DECL_PROTOCOL(name, ...)\n#define OS_OBJECT_SHOW_CLASS(name, ...) \\\n\t\ttypedef struct name##_s *name##_t\n#define OS_OBJECT_SHOW_SUBCLASS(name, super, ...) \\\n\t\ttypedef super##_t name##_t\n#endif\n\n#define OS_OBJECT_GLOBAL_OBJECT(type, object) ((OS_OBJECT_BRIDGE type)&(object))\n\n__BEGIN_DECLS\n\n/*!\n * @function os_retain\n *\n * @abstract\n * Increment the reference count of an os_object.\n *\n * @discussion\n * On a platform with the modern Objective-C runtime this is exactly equivalent\n * to sending the object the -[retain] message.\n *\n * @param object\n * The object to retain.\n *\n * @result\n * The retained object.\n */\nAPI_AVAILABLE(macos(10.10), ios(8.0))\nOS_EXPORT OS_SWIFT_UNAVAILABLE(\"Can't be used with ARC\")\nvoid*\nos_retain(void *object);\n#if OS_OBJECT_USE_OBJC\n#undef os_retain\n#define os_retain(object) [object retain]\n#endif\n\n/*!\n * @function os_release\n *\n * @abstract\n * Decrement the reference count of a os_object.\n *\n * @discussion\n * On a platform with the modern Objective-C runtime this is exactly equivalent\n * to sending the object the -[release] message.\n *\n * @param object\n * The object to release.\n */\nAPI_AVAILABLE(macos(10.10), ios(8.0))\nOS_EXPORT\nvoid OS_SWIFT_UNAVAILABLE(\"Can't be used with ARC\")\nos_release(void *object);\n#if OS_OBJECT_USE_OBJC\n#undef os_release\n#define os_release(object) [object release]\n#endif\n\n__END_DECLS\n\n#endif\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/os/overflow.h",
    "content": "/*\n * Copyright (c) 2015-2018 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n\n/*\n * Facilities for performing type- and overflow-checked arithmetic. These\n * functions return non-zero if overflow occured, zero otherwise. In either case,\n * the potentially overflowing operation is fully performed, mod the size of the\n * output type. See:\n * http://clang.llvm.org/docs/LanguageExtensions.html#checked-arithmetic-builtins\n * for full details.\n *\n * The compiler enforces that users of os_*_overflow() check the return value to\n * determine whether overflow occured.\n */\n\n#ifndef _OS_OVERFLOW_H\n#define _OS_OVERFLOW_H\n\n#include <sys/cdefs.h>\n#include <stdbool.h>\n#include <os/base.h>\n\nbool __header_always_inline OS_WARN_RESULT\n__os_warn_unused(__const bool x)\n{\n\treturn x;\n}\n\n#if __has_builtin(__builtin_add_overflow) && \\\n        __has_builtin(__builtin_sub_overflow) && \\\n        __has_builtin(__builtin_mul_overflow)\n\n#define os_add_overflow(a, b, res) __os_warn_unused(__builtin_add_overflow((a), (b), (res)))\n#define os_sub_overflow(a, b, res) __os_warn_unused(__builtin_sub_overflow((a), (b), (res)))\n#define os_mul_overflow(a, b, res) __os_warn_unused(__builtin_mul_overflow((a), (b), (res)))\n\n#else\n# error os_overflow expects type-generic builtins\n#endif /* __has_builtin(...) */\n\n/* os_add3_overflow(a, b, c) -> (a + b + c) */\n#define os_add3_overflow(a, b, c, res) __os_warn_unused(__extension__({ \\\n\t__typeof(*(res)) _tmp; \\\n\tbool _s, _t; \\\n\t_s = os_add_overflow((a), (b), &_tmp); \\\n\t_t = os_add_overflow((c), _tmp, (res)); \\\n\t_s | _t; \\\n}))\n\n/* os_mul3_overflow(a, b, c) -> (a * b * c) */\n#define os_mul3_overflow(a, b, c, res) __os_warn_unused(__extension__({ \\\n\t__typeof(*(res)) _tmp; \\\n\tbool _s, _t; \\\n\t_s = os_mul_overflow((a), (b), &_tmp); \\\n\t_t = os_mul_overflow((c), _tmp, (res)); \\\n\t_s | _t; \\\n}))\n\n/* os_add_and_mul_overflow(a, b, x) -> (a + b)*x */\n#define os_add_and_mul_overflow(a, b, x, res) __os_warn_unused(__extension__({ \\\n\t__typeof(*(res)) _tmp; \\\n\tbool _s, _t; \\\n\t_s = os_add_overflow((a), (b), &_tmp); \\\n\t_t = os_mul_overflow((x), _tmp, (res)); \\\n\t_s | _t; \\\n}))\n\n/* os_mul_and_add_overflow(a, x, b) -> a*x + b */\n#define os_mul_and_add_overflow(a, x, b, res) __os_warn_unused(__extension__({ \\\n\t__typeof(*(res)) _tmp; \\\n\tbool _s, _t; \\\n\t_s = os_mul_overflow((a), (x), &_tmp); \\\n\t_t = os_add_overflow((b), _tmp, (res)); \\\n\t_s | _t; \\\n}))\n\n/* os_convert_overflow(a) -> a [converted to the result type] */\n#define os_convert_overflow(a, res) os_add_overflow((a), 0, (res))\n\n/* os_inc_overflow(res) -> *res += 1 */\n#define os_inc_overflow(res) __os_warn_unused(__extension__({ \\\n\t__typeof((res)) _tmp = (res); \\\n\tos_add_overflow(*_tmp, 1, _tmp); \\\n}))\n\n/* os_dec_overflow(res) -> *res -= 1 */\n#define os_dec_overflow(res) __os_warn_unused(__extension__({ \\\n\t__typeof((res)) _tmp = (res); \\\n\tos_sub_overflow(*_tmp, 1, _tmp); \\\n}))\n\n\n#endif /* _OS_OVERFLOW_H */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/os/proc.h",
    "content": "/*\n * Copyright (c) 2019 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n\n#ifndef __OS_PROC__\n#define __OS_PROC__\n\n#include <stddef.h>\n#include <sys/cdefs.h>\n#include <os/availability.h>\n\n/*!\n * @header\n *\n * @preprocinfo\n * This is for functions that operate on the calling process alone.\n */\n\n__BEGIN_DECLS\n\n/*!\n * @function os_proc_available_memory\n *\n * @abstract\n * Return the number of bytes remaining, at the time of the call, before the\n * current process will hit its current dirty memory limit.\n *\n * @discussion\n * Developers can query this value efficiently whenever it is needed. The return\n * value is only a snapshot at the time of the call. Caching the result is not\n * advised. The result may be instantaneously invalidated by actions taken in\n * another thread or another framework.\n *\n * Memory limits can change during the app life cycle. Make sure to check accordingly.\n *\n * The size returned is not representative of the total memory of the device, it\n * is the current dirty memory limit minus the dirty memory footprint used at the\n * time of the query.\n *\n * This interface allows an app to efficiently consume all available memory resources.\n * Significant memory use, even under the current memory limit, may still cause\n * system-wide performance including the termination of other apps and system\n * processes. Take care to use the minimum amount of memory needed to satisfy the\n * user’s need.\n *\n * If you need more information than just the available memory, you can use task_info().\n * The information returned is equivalent to the task_vm_info.limit_bytes_remaining\n * field. task_info() is a more expensive call, and will return information such\n * as your phys_footprint, which is used to calculate the return of this function.\n *\n * Dirty memory contains data that must be kept in RAM (or the equivalent) even\n * when unused. It is memory that has been modified.\n *\n * @param none\n *\n * @result\n * The remaining bytes. 0 is returned if the calling process is not an app, or\n * the calling process exceeds its memory limit.\n */\n\n    API_UNAVAILABLE(macos) API_AVAILABLE(ios(13.0), tvos(13.0), watchos(6.0))\nextern\nsize_t os_proc_available_memory(void);\n\n__END_DECLS\n\n#endif\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/os/signpost.h",
    "content": "/*\n * Copyright (c) 2017-2018 Apple Inc. All rights reserved.\n */\n\n#ifndef __OS_SIGNPOST_H__\n#define __OS_SIGNPOST_H__\n\n#include <os/log.h>\n\n__BEGIN_DECLS\n\nOS_ASSUME_NONNULL_BEGIN\n\n/*!\n * @header os_signpost\n *\n * The os_signpost APIs let clients add lightweight instrumentation to\n * code for collection and visualization by performance analysis tooling.\n *\n * Clients of os_signpost can instrument interesting periods of time\n * ('intervals') and single points in time ('events'). Intervals can span\n * processes, be specific to one process, or be specific to a single thread.\n *\n * Intervals and events include an os_log-style format string and arguments\n * which can be used to convey contextual information.\n */\n\n#pragma mark - Interval Matching Scope\n\n/*!\n * The matching scope for signpost intervals logged with a given os_log_t is\n * specified in that log handles's configuration plist using the\n * 'Signpost-Scope' key and defaults to process-wide scope (i.e. 'Process'\n * value) if unspecified.\n *\n * Signpost interval begin and end matching can have 3 different scopes:\n *\n * - Thread-wide: The search scope for matching begins and ends is restricted to\n *   single threads. To set this as the search scope for an os_log_t, set\n *   'Thread' as the string value for the 'Signpost-Scope' key in the\n *   os_log_t's configuration plist.\n *\n * - Process-wide (Default value): The search scope for matching begins and ends\n *   is restricted to a single process. (i.e. no cross-process intervals)\n *   To set this as the search scope for an os_log_t, set\n *   'Process' as the string value for the 'Signpost-Scope' key in the\n *   os_log_t's configuration plist or do not specify any 'Signpost-Scope' key-\n *   value pair.\n *\n * - System-wide: The search scope for matching begins and ends is not\n *   restricted. (i.e. cross-process intervals are possible)\n *   To set this as the search scope for an os_log_t, set\n *   'System' as the string value for the 'Signpost-Scope' key in the\n *   os_log_t's configuration plist.\n *\n */\n\n\n#pragma mark - Signpost IDs\n\n/*!\n * Disambiguating intervals with signpost IDs\n *\n * Intervals with the same log handle and interval name can be in flight\n * simultaneously. In order for tools to correctly match begin signposts with\n * end signposts, it is necessary to identify each interval with an\n * os_signpost_id_t.\n *\n * If only one interval with a given os_log_t and interval name will ever be in\n * flight at a time, use the os_signpost_t convenience value\n * OS_SIGNPOST_ID_EXCLUSIVE. This can avoid having to share state between begin\n * and end callsites.\n *\n * If there exists some non-pointer uint64_t value that uniquely identifies\n * begin/end pairs, that value can be cast directly to an os_signpost_id_t.\n * Note that the values OS_SIGNPOST_ID_NULL and OS_SIGNPOST_ID_INVALID are\n * reserved and identical values may not be used in this manner.\n *\n * If there exists a pointer which can identify begin/end pairs, an\n * os_signpost_id_t can be generated from that pointer with\n * os_signpost_id_make_with_pointer(). This approach is not applicable to\n * signposts that span process boundaries.\n *\n * If no existing pointer or value is applicable, a new unique value can be\n * generated using the os_signpost_id_generate() function. The returned value\n * is guaranteed to be unique within the matching scope specified on the log\n * handle.\n */\n\n/*!\n * @typedef os_signpost_id_t\n *\n * @brief\n * The type to represent a signpost ID.\n *\n * @discussion.\n * Any 64-bit value can be cast to an os_signpost_id_t except for the\n * OS_SIGNPOST_ID_NULL and OS_SIGNPOST_ID_INVALID reserved values.\n *\n * @const OS_SIGNPOST_ID_NULL\n * Represents the null (absent) signpost ID. It is used by the signpost\n * subsystem when a given signpost is disabled.\n *\n * @const OS_SIGNPOST_ID_INVALID\n * Represents an invalid signpost ID, which signals that an error has occurred.\n *\n * @const OS_SIGNPOST_ID_EXCLUSIVE\n * A convenience value for signpost intervals that will never occur\n * concurrently.\n */\ntypedef uint64_t os_signpost_id_t;\n#ifndef __swift__\n#define OS_SIGNPOST_ID_NULL      ((os_signpost_id_t)0)\n#define OS_SIGNPOST_ID_INVALID   ((os_signpost_id_t)~0)\n#define OS_SIGNPOST_ID_EXCLUSIVE ((os_signpost_id_t)0xEEEEB0B5B2B2EEEE)\n#endif\n\n/*!\n * @function os_signpost_id_make_with_pointer\n *\n * @abstract\n * Make an os_signpost_id from a pointer value.\n *\n * @discussion\n * Mangles the pointer to create a valid os_signpost_id, including removing\n * address randomization. Checks that the signpost matching scope is not\n * system-wide.\n *\n * @param log\n * Log handle previously created with os_log_create.\n *\n * @param ptr\n * Any pointer that disambiguates among concurrent intervals with the same\n * os_log_t and interval names.\n *\n * @result\n * Returns a valid os_signpost_id_t. Returns OS_SIGNPOST_ID_NULL if signposts\n * are turned off. Returns OS_SIGNPOST_ID_INVALID if the log handle is\n * system-scoped.\n */\nAPI_AVAILABLE(macos(10.14), ios(12.0), tvos(12.0), watchos(5.0))\nOS_EXPORT OS_NOTHROW\nos_signpost_id_t\nos_signpost_id_make_with_pointer(os_log_t log, const void *_Nullable ptr);\n\n#if __OBJC__\n/*!\n * @function os_signpost_id_make_with_id\n *\n * @abstract\n * Make an os_signpost_id from an Objective-C id, as in\n * os_signpost_id_make_with_pointer.\n */\n#define os_signpost_id_make_with_id(log, ptr) \\\n        os_signpost_id_make_with_pointer(log, (__bridge const void *_Nullable)(ptr))\n#endif /* __OBJC__ */\n\n/*!\n * @function os_signpost_id_generate\n *\n * @abstract\n * Generates an ID guaranteed to be unique within the matching scope of the\n * provided log handle.\n *\n * @discussion\n * Each call to os_signpost_id_generate() with a given log handle and its\n * matching scope will return a different os_signpost_id_t.\n *\n * @param log\n * Log handle previously created with os_log_create.\n *\n * @result\n * Returns a valid os_signpost_id_t. Returns OS_SIGNPOST_ID_NULL if signposts\n * are disabled.\n */\nAPI_AVAILABLE(macos(10.14), ios(12.0), tvos(12.0), watchos(5.0))\nOS_EXPORT OS_NOTHROW OS_WARN_RESULT\nos_signpost_id_t\nos_signpost_id_generate(os_log_t log);\n\n#pragma mark - Signpost Enablement\n\n/*!\n * @function os_signpost_enabled\n *\n * @abstract\n * Returns true if signpost log messages are enabled for a particular log\n * handle.\n *\n * @discussion\n * Returns true if signpost log messages are enabled for a particular log.\n * Use this to avoid doing expensive argument marshalling leading into a call\n * to os_signpost_*\n *\n * @param log\n * Log handle previously created with os_log_create.\n *\n * @result\n * Returns ‘true’ if signpost log messages are enabled.\n */\nAPI_AVAILABLE(macos(10.14), ios(12.0), tvos(12.0), watchos(5.0))\nOS_EXPORT OS_NOTHROW OS_PURE OS_WARN_RESULT\nbool\nos_signpost_enabled(os_log_t log);\n#pragma mark - Interval begin/end\n\n/*!\n * @function os_signpost_interval_begin\n *\n * @abstract\n * Begins a signposted interval.\n *\n * @param log\n * Log handle previously created with os_log_create.\n *\n * @param interval_id\n * An ID for the event, see Signpost IDs above.\n *\n * @param name\n * The name of this event. This must be a string literal.\n *\n * @param ... (format + arguments)\n * Additional information to include with this signpost.  This format string\n * must be a string literal, as with the os_log family of functions.\n */\n#define os_signpost_interval_begin(log, interval_id, name, ...) \\\n        os_signpost_emit_with_type(log, OS_SIGNPOST_INTERVAL_BEGIN, \\\n                interval_id, name, ##__VA_ARGS__)\n\n/*!\n * @function os_signpost_animation_interval_begin\n *\n * @abstract\n * Begins a signposted interval that is tagged as an animation.\n *\n * @param log\n * Log handle previously created with os_log_create.\n *\n * @param interval_id\n * An ID for the event, see Signpost IDs above.\n *\n * @param name\n * The name of this event. This must be a string literal.\n *\n * @param ... (format + arguments)\n * Additional information to include with this signpost.  This format string\n * must be a string literal, as with the os_log family of functions.\n */\n#define os_signpost_animation_interval_begin(log, interval_id, name, ...) \\\n        _os_signpost_animation_interval_begin(log, interval_id, name, \\\n                \"\" __VA_ARGS__)\n\n/*!\n * @function os_signpost_interval_end\n *\n * @abstract\n * Ends a signposted interval.\n *\n * @param log\n * The log handle which was provided to os_signpost_interval_begin,\n *\n * @param interval_id\n * The ID for the event which was provided to os_signpost_interval_begin.  See\n * Signpost IDs above.\n *\n * @param name\n * The name of the event provided to os_signost_interval_begin. This must be a\n * string literal.\n *\n * @param ... (format + arguments)\n * Additional information to include with this signpost.  This format string\n * must be a string literal, as with the os_log family of functions.\n */\n#define os_signpost_interval_end(log, interval_id, name, ...) \\\n        os_signpost_emit_with_type(log, OS_SIGNPOST_INTERVAL_END, \\\n                interval_id, name, ##__VA_ARGS__)\n\n#pragma mark - Signpost event marking\n\n/*!\n * @function os_signpost_event_emit\n *\n * @abstract\n * os_signpost_event_emit marks a point of interest in time with no duration.\n *\n * @param log\n * Log handle previously created with os_log_create.\n *\n * @param event_id\n * An ID for the event, see Signpost IDs above. This ID can be used to convey \n * additional information about the event that is being emitted without \n * incurring extra performance overhead.\n *\n * @param name\n * The name of this event. This must be a string literal.\n *\n * @param ... (format + arguments)\n * Additional information to include with this signpost.  This format string\n * must be a string literal, as with the os_log family of functions.\n */\n#define os_signpost_event_emit(log, event_id, name, ...) \\\n        os_signpost_emit_with_type(log, OS_SIGNPOST_EVENT, \\\n                event_id, name, ##__VA_ARGS__)\n\n#pragma mark - Points of Interest\n\n/*!\n * @const OS_LOG_CATEGORY_POINTS_OF_INTEREST\n *\n * Provide this value as the category to os_log_create to indicate that\n * signposts on the resulting log handle provide high-level events that can be\n * used to orient a developer looking at performance data.  These will be\n * displayed by default by performance tools like Instruments.app.\n */\n#ifndef __swift__\n#define OS_LOG_CATEGORY_POINTS_OF_INTEREST \"PointsOfInterest\"\n#endif\n\n#pragma mark - Dynamic Tracing\n\n/*!\n * @const OS_LOG_CATEGORY_DYNAMIC_TRACING\n *\n * Provide this value as the category to os_log_create to indicate that\n * signposts emitted to the resulting log handle should be disabled by\n * default, reducing the runtime overhead. os_signpost_enabled calls on\n * the resulting log handle will only return 'true' when a performance\n * tool like Instruments.app is recording.\n */\n#if OS_LOG_TARGET_HAS_10_15_FEATURES\n#ifndef __swift__\n#define OS_LOG_CATEGORY_DYNAMIC_TRACING \"DynamicTracing\"\n#endif\n#endif\n\n/*!\n * @const OS_LOG_CATEGORY_DYNAMIC_STACK_TRACING\n *\n * Provide this value as the category to os_log_create to indicate that\n * signposts emitted to the resulting log handle should capture user\n * backtraces. This behavior is more expensive, so os_signpost_enabled\n * will only return 'true' when a performance tool like Instruments.app\n * is recording.\n */\n#if OS_LOG_TARGET_HAS_10_15_FEATURES\n#ifndef __swift__\n#define OS_LOG_CATEGORY_DYNAMIC_STACK_TRACING \"DynamicStackTracing\"\n#endif\n#endif\n\n#pragma mark - Signpost Internals\n\n/*!\n * @typedef os_signpost_type_t\n *\n * @brief\n * The type of a signpost tracepoint, do not use directly.\n */\nOS_ENUM(os_signpost_type, uint8_t,\n    OS_SIGNPOST_EVENT           = 0x00,\n    OS_SIGNPOST_INTERVAL_BEGIN  = 0x01,\n    OS_SIGNPOST_INTERVAL_END    = 0x02,\n);\n#ifndef __swift__\n#define OS_SIGNPOST_TYPE_MASK     0x03\n#endif\n\n#define _OS_SIGNPOST_ANIMATION_INTERVAL_TAG \"isAnimation=YES\"\n\n#define _os_signpost_animation_interval_begin(log, spid, name, fmt, ...) \\\n        os_signpost_interval_begin(log, spid, name, \\\n                fmt \" \" _OS_SIGNPOST_ANIMATION_INTERVAL_TAG, \\\n                ##__VA_ARGS__)\n\nAPI_AVAILABLE(macos(10.14), ios(12.0), tvos(12.0), watchos(5.0))\nOS_EXPORT OS_NOTHROW OS_NOT_TAIL_CALLED\nvoid\n_os_signpost_emit_with_name_impl(void *dso, os_log_t log,\n        os_signpost_type_t type, os_signpost_id_t spid, const char *name,\n        const char *format, uint8_t *buf, uint32_t size);\n\n#define _os_signpost_emit_with_type(emitfn, log, type, spid, name, ...) \\\n    __extension__({ \\\n        os_log_t _log_tmp = (log); \\\n        os_signpost_type_t _type_tmp = (type); \\\n        os_signpost_id_t _spid_tmp = (spid); \\\n        if (_spid_tmp != OS_SIGNPOST_ID_NULL && \\\n                _spid_tmp != OS_SIGNPOST_ID_INVALID && \\\n                os_signpost_enabled(_log_tmp)) { \\\n            OS_LOG_CALL_WITH_FORMAT_NAME((emitfn), \\\n                    (&__dso_handle, _log_tmp, _type_tmp, _spid_tmp), \\\n                    name, \"\" __VA_ARGS__); \\\n        } \\\n    })\n\n#if OS_LOG_TARGET_HAS_10_14_FEATURES\n#define os_signpost_emit_with_type(log, type, spid, name, ...) \\\n        _os_signpost_emit_with_type(_os_signpost_emit_with_name_impl, log, \\\n                type, spid, name, ##__VA_ARGS__)\n#else\n#define os_signpost_emit_with_type(log, type, spid, name, ...) \\\n    __extension__({ \\\n        if (_os_signpost_emit_with_name_impl != NULL) { \\\n            _os_signpost_emit_with_type(_os_signpost_emit_with_name_impl, log, \\\n                    type, spid, name, ##__VA_ARGS__); \\\n        } \\\n    })\n#endif\n\nOS_ASSUME_NONNULL_END\n\n__END_DECLS\n\n#endif // __OS_SIGNPOST_H__\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/os/trace.h",
    "content": "/*\n * Copyright (c) 2013-2016 Apple Inc. All rights reserved.\n */\n\n#ifndef __OS_TRACE_H__\n#define __OS_TRACE_H__\n\n#include <os/trace_base.h>\n#if __has_include(<xpc/xpc.h>)\n#include <xpc/xpc.h>\ntypedef xpc_object_t os_trace_payload_object_t;\n#else\ntypedef void *os_trace_payload_object_t;\n#endif\n\n#if !__GNUC__\n#error \"must be GNU C compatible\"\n#endif\n\n__BEGIN_DECLS\n\n/* We need at least clang 7.3 or later due to bugs in os_log_format parsing */\n#if __has_builtin(__builtin_os_log_format) && (__clang_major__ > 7 || (__clang_major__ == 7 && __clang_minor__ >= 3))\n\nOS_ALWAYS_INLINE __attribute__((format(os_trace, 1, 2)))\nstatic inline void\n_os_trace_verify_printf(const char *msg, ...)\n{\n#pragma unused(msg)\n}\n\n#if __has_attribute(uninitialized)\n#define OS_TRACE_UNINITIALIZED __attribute__((uninitialized))\n#else\n#define OS_TRACE_UNINITIALIZED\n#endif\n\n/* Previous OSes must go through older style...\n *\n * Format:\n *      Items: [ ]\n *      Item sizes: [\n *          8 bits * count\n *      ]\n *      Item count: 8 bits\n */\n\n#define OS_TRACE_CALL(_t, _p, _f, ...) __extension__({ \\\n    if (os_trace_type_enabled(_t)) { \\\n        _os_trace_verify_printf(_f, ##__VA_ARGS__); \\\n        OS_LOG_STRING(TRACE, __f, _f); \\\n        uint32_t __size = (uint32_t)__builtin_os_log_format_buffer_size(_f, ##__VA_ARGS__); \\\n        OS_TRACE_UNINITIALIZED uint8_t _buf[__size]; \\\n        __builtin_os_log_format(_buf, _f, ##__VA_ARGS__); \\\n        uint32_t tz = 0; \\\n        OS_TRACE_UNINITIALIZED uint8_t tb[__size]; \\\n        uint8_t *buff = _buf; \\\n        uint8_t *p = ++buff; \\\n        uint8_t count = *p++; \\\n        uint8_t trailer[count + 1]; \\\n        trailer[count] = count; \\\n        for (uint8_t ii = 0; ii < count; ii++) { \\\n            uint8_t desc = *p++; \\\n            uint8_t size = *p++; \\\n            uint8_t *value = p; \\\n            p += size; \\\n            if ((desc >> 4) || (desc & 0x1)) { \\\n                size = 0;\\\n            }\\\n            if (size) {\\\n                memcpy(&tb[tz], value, size);\\\n                tz += size;\\\n            }\\\n            trailer[ii] = size;\\\n        }\\\n        memcpy(&tb[tz], trailer, sizeof(trailer));\\\n        tz += sizeof(trailer);\\\n        _os_trace_with_buffer(&__dso_handle, __f, _t, tb, tz, _p);\\\n    } \\\n})\n#else\n#define OS_TRACE_CALL(...)\n#endif\n\n// macros to re-order arguments so we can call log function\n#define _os_trace_with_payload_1(_t, _f, _p) OS_TRACE_CALL(_t, _p, _f)\n#define _os_trace_with_payload_2(_t, _f, _1, _p) OS_TRACE_CALL(_t, _p, _f, _1)\n#define _os_trace_with_payload_3(_t, _f, _1, _2, _p) OS_TRACE_CALL(_t, _p, _f, _1, _2)\n#define _os_trace_with_payload_4(_t, _f, _1, _2, _3, _p) OS_TRACE_CALL(_t, _p, _f, _1, _2, _3)\n#define _os_trace_with_payload_5(_t, _f, _1, _2, _3, _4, _p) OS_TRACE_CALL(_t, _p, _f, _1, _2, _3, _4)\n#define _os_trace_with_payload_6(_t, _f, _1, _2, _3, _4, _5, _p) OS_TRACE_CALL(_t, _p, _f, _1, _2, _3, _4, _5)\n#define _os_trace_with_payload_7(_t, _f, _1, _2, _3, _4, _5, _6, _p) OS_TRACE_CALL(_t, _p, _f, _1, _2, _3, _4, _5, _6)\n#define _os_trace_with_payload_8(_t, _f, _1, _2, _3, _4, _5, _6, _7, _p) OS_TRACE_CALL(_t, _p, _f, _1, _2, _3, _4, _5, _6, _7)\n\n#define _os_trace_call_n(_t, _f, ...) OS_TRACE_CALL(_t, NULL, _f, ##__VA_ARGS__)\n\n/*!\n *\n * @abstract\n * Hashtags in trace messages\n *\n * @discussion\n * Developers are encouraged to include hashtags in log messages, regardless of\n * what API you use.\n * A hashtag is composed of a hash (#) symbol, followed by at least three\n * non-whitespace characters, terminated by whitespace or the end of the\n * message. Hashtags may not begin with a number.\n *\n * Below is the list of predefined tags:\n *   #System     - Message in the context of a system process.\n *   #User       - Message in the context of a user process.\n *   #Developer  - Message in the context of software development. For example,\n *                 deprecated APIs and debugging messages.\n *   #Attention  - Message that should be investigated by a system\n *                 administrator, because it may be a sign of a larger issue.\n *                 For example, errors from a hard drive controller that\n *                 typically occur when the drive is about to fail.\n *   #Critical   - Message in the context of a critical event or failure.\n *   #Error      - Message that is a noncritical error.\n *   #Comment    - Message that is a comment.\n *   #Marker     - Message that marks a change to divide the messages around it\n *                 into those before and those after the change.\n *   #Clue       - Message containing extra key/value pairs with additional\n *                 information to help reconstruct the context.\n *   #Security   - Message related to security concerns.\n *   #Filesystem - Message describing a file system related event.\n *   #Network    - Message describing a network-related event.\n *   #Hardware   - Message describing a hardware-related event.\n *   #CPU        - Message describing CPU related event, e.g., initiating heavy\n *                 work load\n *   #State      - Message describing state changed, e.g., global state,\n *                 preference, etc.\n *   #Graphics   - Message describing significant graphics event\n *   #Disk       - Message describing disk activity\n *\n */\n\n#pragma mark - Other defines\n\n/*!\n * @define OS_TRACE_TYPE_RELEASE\n * Trace messages to be captured on a typical user install.  These should be\n * limited to things which improve diagnosis of a failure/crash/hang. Trace\n * buffers are generally smaller on a production system.\n */\n#define OS_TRACE_TYPE_RELEASE (1u << 0)\n\n/*!\n * @define OS_TRACE_TYPE_DEBUG\n * Trace messages to be captured while debugger or other development tool is\n * attached to the originator.\n */\n#define OS_TRACE_TYPE_DEBUG (1u << 1)\n\n/*!\n * @define OS_TRACE_TYPE_INFO\n * Trace messages that are captured when a debugger is attached, system or\n * Application mode has been increased to include additional information.\n */\n#define OS_TRACE_TYPE_INFO (1u << 2)\n\n/*!\n * @define OS_TRACE_TYPE_ERROR\n * Trace the message as an error and force a collection as a failure may be\n * imminent.\n */\n#define OS_TRACE_TYPE_ERROR ((1u << 6) | (1u << 0))\n\n/*!\n * @define OS_TRACE_TYPE_FAULT\n * Trace the message as a fatal error which forces a collection and a diagnostic\n * to be initiated.\n */\n#define OS_TRACE_TYPE_FAULT ((1u << 7) | (1u << 6) | (1u << 0))\n\n/*!\n * @typedef os_trace_payload_t\n *\n * @abstract\n * A block that populates an xpc_object_t of type XPC_TYPE_DICTIONARY to\n * represent complex data.\n *\n * @discussion\n * This block will only be invoked under conditions where tools have attached to\n * the process. The payload can be used to send arbitrary data via the trace\n * call. Tools may use the data to validate state for integration tests or\n * provide other introspection services. No assumptions are made about the\n * format or structure of the data.\n */\n#ifdef __BLOCKS__\ntypedef void (^os_trace_payload_t)(os_trace_payload_object_t xdict);\n#else\ntypedef void *os_trace_payload_t;\n#endif // __BLOCKS__\n\n#pragma mark - function declarations\n\n/*!\n * @function os_trace\n *\n * @abstract\n * Always inserts a trace message into a buffer pool for later decoding.\n *\n * @discussion\n * Trace message that will be recorded on a typical user install. These should\n * be limited to things which help diagnose a failure during postmortem\n * analysis. Trace buffers are generally smaller on a production system.\n *\n * @param format\n * A printf-style format string to generate a human-readable log message when\n * the trace line is decoded.  Only scalar types are supported, attempts\n * to pass arbitrary strings will store a pointer that is unresolvable and\n * will generate an error during decode.\n *\n * <code>\n *     os_trace(\"network event: %ld, last seen: %ld, avg: %g\",\n *             event_id, last_seen, avg);\n * </code>\n */\n#define os_trace(format, ...) OS_TRACE_CALL(OS_TRACE_TYPE_RELEASE, NULL, format, ##__VA_ARGS__)\n\n#if OS_LOG_TARGET_HAS_10_12_FEATURES\n/*!\n * @function os_trace_info\n *\n * @abstract\n * Optionally inserts a trace message containing additional information into a\n * buffer pool for later decoding.\n *\n * @discussion\n * Trace messages that will be captured when additional information is needed\n * and are not captured by default.  They will only be captured if the\n * system/process/activity mode has been increased or if a Development tool has\n * been attached to the process.\n *\n * @param format\n * A printf-style format string that represents a human-readable message when\n * the trace line is decoded.  Only scalar types are supported, attempts\n * to pass arbitrary strings will store a pointer that is unresolvable and\n * will generate an error during decode.\n *\n * <code>\n *      os_trace_info(\"network interface status %ld\", status);\n * </code>\n */\n#define os_trace_info(format, ...) \\\n        OS_TRACE_CALL(OS_TRACE_TYPE_INFO, NULL, format, ##__VA_ARGS__)\n\n#endif\n\n/*!\n * @function os_trace_debug\n *\n * @abstract\n * Insert debug trace message into a buffer pool for later decoding.\n *\n * @discussion\n * Debug trace message to be recorded while debugger or other development tool\n * is attached to the originator.  This is transported interprocess to help\n * diagnose the entire call chain including external helpers.\n *\n * @param format\n * A printf-style format string that represents a human-readable message when\n * the trace line is decoded.  Only scalar types are supported, attempts\n * to pass arbitrary strings will store a pointer that is unresolvable and\n * will generate an error during decode.\n *\n * <code>\n *     os_trace_debug(\"network interface status %ld\", status);\n * </code>\n */\n#define os_trace_debug(format, ...) \\\n        OS_TRACE_CALL(OS_TRACE_TYPE_DEBUG, NULL, format, ##__VA_ARGS__)\n\n/*!\n * @function os_trace_info_enabled\n *\n * @abstract\n * Avoid unnecessary work for a trace point by checking if additional\n * information is enabled.\n *\n * @discussion\n * Avoid unnecessary work for a trace point by checking if additional\n * information is enabled. Generally trace points should not involve expensive\n * operations, but some circumstances warrant it.  Use this function to avoid\n * doing the work unless debug level trace messages are requested.\n *\n * <code>\n *     if (os_trace_info_enabled()) {\n *         os_trace_info(\"value = %d, average = %d\",\n *                 [[dict objectForKey: @\"myKey\"] intValue],\n *                 (int)[self getAverage:dict]);\n *     }\n * </code>\n *\n * @result\n * Returns true if info types are enabled.\n */\nAPI_DEPRECATED_WITH_REPLACEMENT(\"os_log_info_enabled\",\n        macos(10.12,10.13), ios(10.0,11.0), watchos(3.0,4.0), tvos(10.0,11.0))\nOS_EXPORT OS_NOTHROW OS_WARN_RESULT\nbool\nos_trace_info_enabled(void);\n\n/*!\n * @function os_trace_debug_enabled\n *\n * @abstract\n * Avoid unnecessary work for a trace point by checking if debug level is\n * enabled.\n *\n * @discussion\n * Avoid unnecessary work for a trace point by checking if debug level is\n * enabled.  Generally trace points should not involve expensive operations, but\n * some circumstances warrant it.  Use this function to avoid doing the work\n * unless debug level trace messages are requested.\n *\n * <code>\n *     if (os_trace_debug_enabled()) {\n *         os_trace_debug(\"value = %d, average = %d\",\n *                 [[dict objectForKey: @\"myKey\"] intValue],\n *                 (int)[self getAverage:dict]);\n *     }\n * </code>\n *\n * @result\n * Returns true if debug mode is enabled.\n */\nAPI_DEPRECATED_WITH_REPLACEMENT(\"os_log_debug_enabled\",\n        macos(10.10,10.13), ios(8.0,11.0), watchos(2.0,4.0), tvos(8.0,11.0))\nOS_EXPORT OS_NOTHROW OS_WARN_RESULT\nbool\nos_trace_debug_enabled(void);\n\n/*!\n * @function os_trace_type_enabled\n *\n * @abstract\n * Avoid unnecessary work for a trace point by checking a specific type\n *\n * @discussion\n * Avoid unnecessary work for a trace point by checking a specific type\n *\n * @result\n * Returns true if type is enabled.\n */\nAPI_DEPRECATED_WITH_REPLACEMENT(\"os_log_type_enabled\",\n        macos(10.10,10.13), ios(8.0,11.0), watchos(2.0,4.0), tvos(8.0,11.0))\nOS_NOTHROW OS_WARN_RESULT OS_ALWAYS_INLINE\nstatic inline bool\nos_trace_type_enabled(uint8_t type)\n{\n    switch (type) {\n    case OS_TRACE_TYPE_INFO:\n        return os_trace_info_enabled();\n    case OS_TRACE_TYPE_DEBUG:\n        return os_trace_debug_enabled();\n    }\n    return true;\n}\n\n/*!\n * @function os_trace_error\n *\n * @abstract\n * Trace the message as an error and force a collection of the trace buffer as\n * a failure may be imminent.\n *\n * @discussion\n * Trace the message as an error and force a collection of the trace buffer as\n * a failure may be imminent.\n *\n * @param format\n * A printf-style format string to generate a human-readable log message when\n * the trace line is decoded.  Only scalar types are supported, attempts to pass\n * arbitrary strings will store a pointer that is unresolvable and will generate\n * an error during decode.\n *\n * <code>\n *     os_trace_error(\"socket %d connection timeout %ld\", fd, secs);\n * </code>\n */\n#define os_trace_error(format, ...) \\\n        OS_TRACE_CALL(OS_TRACE_TYPE_ERROR, NULL, format, ##__VA_ARGS__)\n\n/*!\n * @function os_trace_fault\n *\n * @abstract\n * Trace the message as a fault which forces a collection of the trace buffer\n * and diagnostic of the activity.\n *\n * @discussion\n * Trace the message as a fault which forces a collection of the trace buffer\n * and diagnostic of the activity.\n *\n * @param format\n * A printf-style format string to generate a human-readable log message when\n * the trace line is decoded.  Only scalar types are supported, attempts\n * to pass arbitrary strings will store a pointer that is unresolvable and\n * will generate an error during decode.\n *\n * <code>\n *     os_trace_fault(\"failed to lookup uid %d - aborting\", uid);\n * </code>\n */\n#define os_trace_fault(format, ...) \\\n        OS_TRACE_CALL(OS_TRACE_TYPE_FAULT, NULL, format, ##__VA_ARGS__)\n\n#ifdef __BLOCKS__\n#if __has_include(<xpc/xpc.h>)\n/*!\n * @function os_trace_with_payload\n *\n * @abstract\n * Add a trace entry containing the provided values and call the block if\n * appropriate.\n *\n * @discussion\n * Will insert a trace entry into a limited ring buffer for an activity or\n * process.  Trace points are for recording interesting data that would improve\n * diagnosis of unexpected crashes, failures and hangs.  The block will only be\n * called under the required conditions.\n *\n * @param trace_msg\n * A printf-style format string to generate a human-readable log message when\n * the trace line is decoded.  Only scalar types are supported. Attempts\n * to pass arbitrary strings will store a pointer that is unresolvable and\n * will generate an error during decode.\n *\n * The final parameter must be a block of type os_trace_payload_t.\n *\n * <code>\n *     os_trace_with_payload(\"network event %ld\", event, ^(xpc_object_t xdict) {\n *\n *         // validate the network interface and address where what was expected\n *         xpc_dictionary_set_string(xdict, \"network\", ifp->ifa_name);\n *         xpc_dictionary_set_string(xdict, \"ip_address\", _get_address(ifp));\n *     });\n * </code>\n */\n#define os_trace_with_payload(format, ...) \\\n    OS_CONCAT(_os_trace_with_payload, OS_COUNT_ARGS(__VA_ARGS__))(\\\n            OS_TRACE_TYPE_RELEASE, format, ##__VA_ARGS__)\n\n#if OS_LOG_TARGET_HAS_10_12_FEATURES\n\n#define os_trace_info_with_payload(format, ...) \\\n    OS_CONCAT(_os_trace_with_payload, OS_COUNT_ARGS(__VA_ARGS__))(\\\n            OS_TRACE_TYPE_INFO, format, ##__VA_ARGS__)\n\n#else\n\nAPI_DEPRECATED_WITH_REPLACEMENT(\"os_log_info\",\n        macos(10.12,10.13), ios(10.0,11.0), watchos(3.0,4.0), tvos(10.0,11.0))\nOS_EXPORT OS_NOTHROW OS_NOT_TAIL_CALLED\nvoid\nos_trace_info_with_payload(const char *format, ...);\n\n#endif // !OS_LOG_TARGET_HAS_10_12_FEATURES\n\n#define os_trace_debug_with_payload(format, ...) \\\n    OS_CONCAT(_os_trace_with_payload, OS_COUNT_ARGS(__VA_ARGS__))(\\\n            OS_TRACE_TYPE_DEBUG, format, ##__VA_ARGS__)\n\n#define os_trace_error_with_payload(format, ...) \\\n    OS_CONCAT(_os_trace_with_payload, OS_COUNT_ARGS(__VA_ARGS__))(\\\n            OS_TRACE_TYPE_ERROR, format, ##__VA_ARGS__)\n\n#define os_trace_fault_with_payload(format, ...) \\\n    OS_CONCAT(_os_trace_with_payload, OS_COUNT_ARGS(__VA_ARGS__))(\\\n            OS_TRACE_TYPE_FAULT, format, ##__VA_ARGS__)\n\n#endif // __has_include(<xpc/xpc.h>)\n#endif // __BLOCKS__\n\n/*!\n * @function _os_trace_with_buffer\n *\n * @abstract\n * Internal function to support pre-encoded buffer.\n */\nAPI_DEPRECATED(\"use one of the following calls instead: os_log_info, os_log_debug, os_log_error, os_log_fault\",\n        macos(10.10,10.13), ios(8.0,11.0), watchos(2.0,4.0), tvos(8.0,11.0))\nOS_EXPORT OS_NOTHROW OS_NOT_TAIL_CALLED\nvoid\n_os_trace_with_buffer(void *dso, const char *message, uint8_t type,\n        const void *buffer, size_t buffer_size, os_trace_payload_t payload);\n\n__END_DECLS\n\n#endif // !__OS_TRACE_H__\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/os/trace_base.h",
    "content": "/*\n * Copyright (c) 2016 Apple Inc. All rights reserved.\n */\n\n#ifndef __OS_TRACE_BASE_H__\n#define __OS_TRACE_BASE_H__\n\n#include <mach-o/loader.h>\n#include <stdarg.h>\n#include <stdbool.h>\n#include <stdint.h>\n#include <sys/time.h>\n#include <sys/types.h>\n#include <unistd.h>\n\n#include <os/availability.h>\n#include <os/base.h>\n#include <os/object.h>\n\n#define OS_LOG_FORMATLIKE(x, y)  __attribute__((format(os_log, x, y)))\n\n#define __OS_LOG_OS_FEATURES_AT_LEAST(macos, ios, tvos, watchos) \\\n        (  (defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_##macos) \\\n        || (defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_##ios) \\\n        || (defined(__TV_OS_VERSION_MIN_REQUIRED) && __TV_OS_VERSION_MIN_REQUIRED >= __TVOS_##tvos) \\\n        || (defined(__WATCH_OS_VERSION_MIN_REQUIRED) && __WATCH_OS_VERSION_MIN_REQUIRED >= __WATCHOS_##watchos) \\\n        )\n\n#if __OS_LOG_OS_FEATURES_AT_LEAST(10_15, 13_0, 13_0, 6_0)\n#define OS_LOG_TARGET_HAS_10_15_FEATURES 1\n#else\n#define OS_LOG_TARGET_HAS_10_15_FEATURES 0\n#endif\n\n#if __OS_LOG_OS_FEATURES_AT_LEAST(10_14, 12_0, 12_0, 5_0)\n#define OS_LOG_TARGET_HAS_10_14_FEATURES 1\n#else\n#define OS_LOG_TARGET_HAS_10_14_FEATURES 0\n#endif\n\n#if __OS_LOG_OS_FEATURES_AT_LEAST(10_13, 11_0, 11_0, 4_0)\n#define OS_LOG_TARGET_HAS_10_13_FEATURES 1\n#else\n#define OS_LOG_TARGET_HAS_10_13_FEATURES 0\n#endif\n\n#if __OS_LOG_OS_FEATURES_AT_LEAST(10_12, 10_0, 10_0, 3_0)\n#define OS_LOG_TARGET_HAS_10_12_FEATURES 1\n#else\n#define OS_LOG_TARGET_HAS_10_12_FEATURES 0\n#endif\n\n#ifndef OS_COUNT_ARGS\n#define OS_COUNT_ARGS(...) OS_COUNT_ARGS1(, ##__VA_ARGS__, _8, _7, _6, _5, _4, _3, _2, _1, _0)\n#define OS_COUNT_ARGS1(z, a, b, c, d, e, f, g, h, cnt, ...) cnt\n#endif\n\n#ifdef OS_LOG_FORMAT_WARNINGS\n#define OS_LOG_FORMAT_ERRORS _Pragma(\"clang diagnostic warning \\\"-Wformat\\\"\")\n#else\n#define OS_LOG_FORMAT_ERRORS _Pragma(\"clang diagnostic error \\\"-Wformat\\\"\")\n#endif\n\n#define OS_LOG_PRAGMA_PUSH \\\n        _Pragma(\"clang diagnostic push\") \\\n        _Pragma(\"clang diagnostic ignored \\\"-Wvla\\\"\") \\\n        OS_LOG_FORMAT_ERRORS\n\n#define OS_LOG_PRAGMA_POP  _Pragma(\"clang diagnostic pop\")\n\n#if __has_attribute(uninitialized)\n#define OS_LOG_UNINITIALIZED __attribute__((uninitialized))\n#else\n#define OS_LOG_UNINITIALIZED\n#endif\n\n#define OS_LOG_STRING(_ns, _var, _str) \\\n        _Static_assert(__builtin_constant_p(_str), \\\n                \"format/label/description argument must be a string constant\"); \\\n        __attribute__((section(\"__TEXT,__oslogstring,cstring_literals\"),internal_linkage)) \\\n        static const char _var[] __asm(OS_STRINGIFY(OS_CONCAT(LOS_##_ns, __COUNTER__))) = _str\n\n\n#define OS_LOG_REMOVE_PARENS(...) __VA_ARGS__\n\n#define OS_LOG_CALL_WITH_FORMAT(fun, fun_args, fmt, ...) __extension__({ \\\n        OS_LOG_PRAGMA_PUSH OS_LOG_STRING(LOG, _os_fmt_str, fmt); \\\n        uint8_t _Alignas(16) OS_LOG_UNINITIALIZED _os_fmt_buf[__builtin_os_log_format_buffer_size(fmt, ##__VA_ARGS__)]; \\\n        fun(OS_LOG_REMOVE_PARENS fun_args, _os_fmt_str, \\\n                (uint8_t *)__builtin_os_log_format(_os_fmt_buf, fmt, ##__VA_ARGS__), \\\n                (uint32_t)sizeof(_os_fmt_buf)) OS_LOG_PRAGMA_POP; \\\n})\n\n#define OS_LOG_CALL_WITH_FORMAT_NAME(fun, fun_args, name, fmt, ...) __extension__({ \\\n        OS_LOG_PRAGMA_PUSH OS_LOG_STRING(LOG, _os_fmt_str, fmt); \\\n        OS_LOG_STRING(LOG, _os_name_str, name); \\\n        uint8_t _Alignas(16) OS_LOG_UNINITIALIZED _os_fmt_buf[__builtin_os_log_format_buffer_size(fmt, ##__VA_ARGS__)]; \\\n        fun(OS_LOG_REMOVE_PARENS fun_args, _os_name_str, _os_fmt_str, \\\n                (uint8_t *)__builtin_os_log_format(_os_fmt_buf, fmt, ##__VA_ARGS__), \\\n                (uint32_t)sizeof(_os_fmt_buf)) OS_LOG_PRAGMA_POP; \\\n})\n\n__BEGIN_DECLS\n\nextern struct mach_header __dso_handle;\n\n__END_DECLS\n\n#endif // !__OS_TRACE_BASE_H__\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/os/workgroup.h",
    "content": "/*\n * Copyright (c) 2020 Apple Inc. All rights reserved.\n *\n * @APPLE_APACHE_LICENSE_HEADER_START@\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * @APPLE_APACHE_LICENSE_HEADER_END@\n */\n\n#ifndef __OS_WORKGROUP__\n#define __OS_WORKGROUP__\n\n#ifndef __DISPATCH_BUILDING_DISPATCH__\n#ifndef __OS_WORKGROUP_INDIRECT__\n#define __OS_WORKGROUP_INDIRECT__\n#endif /* __OS_WORKGROUP_INDIRECT__ */\n\n#include <os/workgroup_base.h>\n#include <os/workgroup_object.h>\n#include <os/workgroup_interval.h>\n#include <os/workgroup_parallel.h>\n\n#undef __OS_WORKGROUP_INDIRECT__\n#endif /* __DISPATCH_BUILDING_DISPATCH__ */\n\n#endif /* __OS_WORKGROUP__ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/os/workgroup_base.h",
    "content": "#ifndef __OS_WORKGROUP_BASE__\n#define __OS_WORKGROUP_BASE__\n\n#ifndef __OS_WORKGROUP_INDIRECT__\n#error \"Please #include <os/workgroup.h> instead of this file directly.\"\n#endif\n\n#include <sys/types.h>\n#include <stddef.h>\n#include <stdint.h>\n#include <stdbool.h>\n#include <string.h>\n#include <stdlib.h>\n\n#include <mach/port.h>\n\n#include <Availability.h>\n#include <os/base.h>\n#include <os/object.h>\n#include <os/clock.h>\n\n#if __has_feature(assume_nonnull)\n#define OS_WORKGROUP_ASSUME_NONNULL_BEGIN _Pragma(\"clang assume_nonnull begin\")\n#define OS_WORKGROUP_ASSUME_NONNULL_END   _Pragma(\"clang assume_nonnull end\")\n#else\n#define OS_WORKGROUP_ASSUME_NONNULL_BEGIN\n#define OS_WORKGROUP_ASSUME_NONNULL_END\n#endif\n#define OS_WORKGROUP_WARN_RESULT __attribute__((__warn_unused_result__))\n#define OS_WORKGROUP_EXPORT OS_EXPORT\n#define OS_WORKGROUP_RETURNS_RETAINED OS_OBJECT_RETURNS_RETAINED\n\n#define OS_WORKGROUP_DECL(name, swift_name) \\\n\tOS_SWIFT_NAME(swift_name) \\\n\tOS_OBJECT_SHOW_CLASS(name, OS_OBJECT_CLASS(object))\n\n#if OS_OBJECT_USE_OBJC\n#define OS_WORKGROUP_SUBCLASS_DECL_PROTO(name, swift_name, ...) \\\n\tOS_SWIFT_NAME(swift_name) \\\n\tOS_OBJECT_DECL_PROTOCOL(name ## __VA_ARGS__ )\n#else\n#define OS_WORKGROUP_SUBCLASS_DECL_PROTO(name, swift_name, ...)\n#endif\n\n#define OS_WORKGROUP_SUBCLASS_DECL(name, super, swift_name, ...) \\\n\tOS_SWIFT_NAME(swift_name) \\\n\tOS_OBJECT_SHOW_SUBCLASS(name, super, name, ## __VA_ARGS__)\n\n#if defined(__LP64__)\n#define __OS_WORKGROUP_ATTR_SIZE__ 60\n#define __OS_WORKGROUP_INTERVAL_DATA_SIZE__ 56\n#define __OS_WORKGROUP_JOIN_TOKEN_SIZE__ 36\n#else\n#define __OS_WORKGROUP_ATTR_SIZE__ 60\n#define __OS_WORKGROUP_INTERVAL_DATA_SIZE__ 56\n#define __OS_WORKGROUP_JOIN_TOKEN_SIZE__ 28\n#endif\n\n#define _OS_WORKGROUP_ATTR_SIG_DEFAULT_INIT 0x2FA863B4\n#define _OS_WORKGROUP_ATTR_SIG_EMPTY_INIT 0x2FA863C4\n\nstruct OS_REFINED_FOR_SWIFT os_workgroup_attr_opaque_s {\n\tuint32_t sig;\n\tchar opaque[__OS_WORKGROUP_ATTR_SIZE__];\n};\n\n#define _OS_WORKGROUP_INTERVAL_DATA_SIG_INIT 0x52A74C4D\nstruct OS_REFINED_FOR_SWIFT os_workgroup_interval_data_opaque_s {\n\tuint32_t sig;\n\tchar opaque[__OS_WORKGROUP_INTERVAL_DATA_SIZE__];\n};\n\nstruct OS_REFINED_FOR_SWIFT os_workgroup_join_token_opaque_s {\n\tuint32_t sig;\n\tchar opaque[__OS_WORKGROUP_JOIN_TOKEN_SIZE__];\n};\n\n#endif /* __OS_WORKGROUP_BASE__ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/os/workgroup_interval.h",
    "content": "/*\n * Copyright (c) 2020 Apple Inc. All rights reserved.\n *\n * @APPLE_APACHE_LICENSE_HEADER_START@\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * @APPLE_APACHE_LICENSE_HEADER_END@\n */\n\n#ifndef __OS_WORKGROUP_INTERVAL__\n#define __OS_WORKGROUP_INTERVAL__\n\n#ifndef __OS_WORKGROUP_INDIRECT__\n#error \"Please #include <os/workgroup.h> instead of this file directly.\"\n#include <os/workgroup_base.h> // For header doc\n#endif\n\n__BEGIN_DECLS\n\nOS_WORKGROUP_ASSUME_NONNULL_BEGIN\n\n/*!\n * @typedef os_workgroup_interval_t\n *\n * @abstract\n * A subclass of an os_workgroup_t for tracking work performed as part of\n * a repeating interval-driven workload.\n */\nOS_WORKGROUP_SUBCLASS_DECL_PROTO(os_workgroup_interval, Repeatable);\nOS_WORKGROUP_SUBCLASS_DECL(os_workgroup_interval, os_workgroup, WorkGroupInterval);\n\n/* During the first instance of this API, the only supported interval\n * workgroups are for audio workloads. Please refer to the AudioToolbox\n * framework for more information.\n */\n\n/*\n * @typedef os_workgroup_interval_data, os_workgroup_interval_data_t\n *\n * @abstract\n * An opaque structure containing additional configuration for the workgroup\n * interval.\n */\ntypedef struct os_workgroup_interval_data_opaque_s os_workgroup_interval_data_s;\ntypedef struct os_workgroup_interval_data_opaque_s *os_workgroup_interval_data_t;\n#define OS_WORKGROUP_INTERVAL_DATA_INITIALIZER \\\n\t{ .sig = _OS_WORKGROUP_INTERVAL_DATA_SIG_INIT }\n\n/*!\n * @function os_workgroup_interval_start\n *\n * @abstract\n * Indicates to the system that the member threads of this\n * os_workgroup_interval_t have begun working on an instance of the repeatable\n * interval workload with the specified timestamps. This function is real time\n * safe.\n *\n * This function will set and return an errno in the following cases:\n *\n * - The current thread is not a member of the os_workgroup_interval_t\n * - The os_workgroup_interval_t has been cancelled\n * - The timestamps passed in are malformed\n * - os_workgroup_interval_start() was previously called on the\n * os_workgroup_interval_t without an intervening os_workgroup_interval_finish()\n * - A concurrent workgroup interval configuration operation is taking place.\n *\n * @param start\n * Start timestamp specified in the os_clockid_t with which the\n * os_workgroup_interval_t was created. This is generally a time in the past and\n * indicates when the workgroup started working on an interval period\n *\n * @param deadline\n * Deadline timestamp specified in the os_clockid_t with which the\n * os_workgroup_interval_t was created. This specifies the deadline which the\n * interval period would like to meet.\n *\n * @param data\n * This field is currently unused and should be NULL\n */\nAPI_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0), watchos(7.0))\nOS_REFINED_FOR_SWIFT OS_WORKGROUP_EXPORT OS_WORKGROUP_WARN_RESULT\nint\nos_workgroup_interval_start(os_workgroup_interval_t wg, uint64_t start, uint64_t\n\t\tdeadline, os_workgroup_interval_data_t _Nullable data);\n\n/*!\n * @function os_workgroup_interval_update\n *\n * @abstract\n * Updates an already started interval workgroup to have the new\n * deadline specified. This function is real time safe.\n *\n * This function will return an error in the following cases:\n * - The current thread is not a member of the os_workgroup_interval_t\n * - The os_workgroup_interval_t has been cancelled\n * - The timestamp passed in is malformed\n * - os_workgroup_interval_start() was not previously called on the\n * os_workgroup_interval_t or was already matched with an\n * os_workgroup_interval_finish()\n * - A concurrent workgroup interval configuration operation is taking place\n *\n * @param deadline\n * Timestamp specified in the os_clockid_t with\n * which the os_workgroup_interval_t was created.\n *\n * @param data\n * This field is currently unused and should be NULL\n */\nAPI_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0), watchos(7.0))\nOS_REFINED_FOR_SWIFT OS_WORKGROUP_EXPORT OS_WORKGROUP_WARN_RESULT\nint\nos_workgroup_interval_update(os_workgroup_interval_t wg, uint64_t deadline,\n\t\tos_workgroup_interval_data_t _Nullable data);\n\n/*!\n * @function os_workgroup_interval_finish\n *\n * @abstract\n * Indicates to the system that the member threads of\n * this os_workgroup_interval_t have finished working on the current instance\n * of the interval workload. This function is real time safe.\n *\n * This function will return an error in the following cases:\n *  - The current thread is not a member of the os_workgroup_interval_t\n *  - os_workgroup_interval_start() was not previously called on the\n * os_workgroup_interval_t or was already matched with an\n * os_workgroup_interval_finish()\n * - A concurrent workgroup interval configuration operation is taking place.\n *\n * @param data\n * This field is currently unused and should be NULL\n *\n */\nAPI_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0), watchos(7.0))\nOS_REFINED_FOR_SWIFT OS_WORKGROUP_EXPORT OS_WORKGROUP_WARN_RESULT\nint\nos_workgroup_interval_finish(os_workgroup_interval_t wg,\n\t\tos_workgroup_interval_data_t _Nullable data);\n\nOS_WORKGROUP_ASSUME_NONNULL_END\n\n__END_DECLS\n\n#endif /* __OS_WORKGROUP_INTERVAL__ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/os/workgroup_object.h",
    "content": "/*\n * Copyright (c) 2020 Apple Inc. All rights reserved.\n *\n * @APPLE_APACHE_LICENSE_HEADER_START@\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * @APPLE_APACHE_LICENSE_HEADER_END@\n */\n\n#ifndef __OS_WORKGROUP_OBJECT__\n#define __OS_WORKGROUP_OBJECT__\n\n#ifndef __OS_WORKGROUP_INDIRECT__\n#error \"Please #include <os/workgroup.h> instead of this file directly.\"\n#include <os/workgroup_base.h> // For header doc\n#endif\n\n__BEGIN_DECLS\n\nOS_WORKGROUP_ASSUME_NONNULL_BEGIN\n\n/*!\n * @typedef os_workgroup_t\n *\n * @abstract\n * A reference counted os object representing a workload that needs to\n * be distinctly recognized and tracked by the system.  The workgroup\n * tracks a collection of threads all working cooperatively. An os_workgroup\n * object - when not an instance of a specific os_workgroup_t subclass -\n * represents a generic workload and makes no assumptions about the kind of\n * work done.\n *\n * @discussion\n * Threads can explicitly join an os_workgroup_t to mark themselves as\n * participants in the workload.\n */\nOS_WORKGROUP_DECL(os_workgroup, WorkGroup);\n\n\n/* Attribute creation and specification */\n\n/*!\n * @typedef os_workgroup_attr_t\n *\n * @abstract\n * Pointer to an opaque structure for describing attributes that can be\n * configured on a workgroup at creation.\n */\ntypedef struct os_workgroup_attr_opaque_s os_workgroup_attr_s;\ntypedef struct os_workgroup_attr_opaque_s *os_workgroup_attr_t;\n\n/* os_workgroup_t attributes need to be initialized before use. This initializer\n * allows you to create a workgroup with the system default attributes. */\n#define OS_WORKGROUP_ATTR_INITIALIZER_DEFAULT \\\n\t{ .sig = _OS_WORKGROUP_ATTR_SIG_DEFAULT_INIT }\n\n\n\n/* The main use of the workgroup API is through instantiations of the concrete\n * subclasses - please refer to os/workgroup_interval.h and\n * os/workgroup_parallel.h for more information on creating workgroups.\n *\n * The functions below operate on all subclasses of os_workgroup_t.\n */\n\n/*!\n * @function os_workgroup_copy_port\n *\n * @abstract\n * Returns a reference to a send right representing this workgroup that is to be\n * sent to other processes. This port is to be passed to\n * os_workgroup_create_with_port() to create a workgroup object.\n *\n * It is the client's responsibility to release the send right reference.\n *\n * If an error is encountered, errno is set and returned.\n */\nAPI_AVAILABLE(macos(11.0))\nAPI_UNAVAILABLE(ios, tvos, watchos)\nOS_REFINED_FOR_SWIFT OS_WORKGROUP_EXPORT OS_WORKGROUP_WARN_RESULT\nint\nos_workgroup_copy_port(os_workgroup_t wg, mach_port_t *mach_port_out);\n\n/*!\n * @function os_workgroup_create_with_port\n *\n * @abstract\n * Create an os_workgroup_t object from a send right returned by a previous\n * call to os_workgroup_copy_port, potentially in a different process.\n *\n * A newly created os_workgroup_t has no initial member threads - in particular\n * the creating thread does not join the os_workgroup_t implicitly.\n *\n * @param name\n * A client specified string for labelling the workgroup. This parameter is\n * optional and can be NULL.\n *\n * @param mach_port\n * The send right to create the workgroup from. No reference is consumed\n * on the specified send right.\n */\nAPI_AVAILABLE(macos(11.0))\nAPI_UNAVAILABLE(ios, tvos, watchos)\nOS_SWIFT_NAME(WorkGroup.init(__name:port:)) OS_WORKGROUP_EXPORT OS_WORKGROUP_RETURNS_RETAINED\nos_workgroup_t _Nullable\nos_workgroup_create_with_port(const char *_Nullable name, mach_port_t mach_port);\n\n/*!\n * @function os_workgroup_create_with_workgroup\n *\n * @abstract\n * Create a new os_workgroup object from an existing os_workgroup.\n *\n * The newly created os_workgroup has no initial member threads - in particular\n * the creating threaad does not join the os_workgroup_t implicitly.\n *\n * @param name\n * A client specified string for labelling the workgroup. This parameter is\n * optional and can be NULL.\n *\n * @param wg\n * The existing workgroup to create a new workgroup object from.\n */\nAPI_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0), watchos(7.0))\nOS_REFINED_FOR_SWIFT OS_WORKGROUP_EXPORT OS_WORKGROUP_RETURNS_RETAINED\nos_workgroup_t _Nullable\nos_workgroup_create_with_workgroup(const char * _Nullable name, os_workgroup_t wg);\n\n/*!\n * @typedef os_workgroup_join_token, os_workgroup_join_token_t\n *\n * @abstract\n * An opaque join token which the client needs to pass to os_workgroup_join\n * and os_workgroup_leave\n */\nOS_REFINED_FOR_SWIFT\ntypedef struct os_workgroup_join_token_opaque_s os_workgroup_join_token_s;\nOS_REFINED_FOR_SWIFT\ntypedef struct os_workgroup_join_token_opaque_s *os_workgroup_join_token_t;\n\n\n/*!\n * @function os_workgroup_join\n *\n * @abstract\n * Joins the current thread to the specified workgroup and populates the join\n * token that has been passed in. This API is real-time safe.\n *\n * @param wg\n * The workgroup that the current thread would like to join\n *\n * @param token_out\n * Pointer to a client allocated struct which the function will populate\n * with the join token. This token must be passed in by the thread when it calls\n * os_workgroup_leave().\n *\n * Errors will be returned in the following cases:\n *\n * EALREADY\t\tThe thread is already part of a workgroup that the specified\n *\t\t\t\tworkgroup does not nest with\n * EINVAL\t\tThe workgroup has been cancelled\n */\nAPI_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0), watchos(7.0))\nOS_REFINED_FOR_SWIFT OS_WORKGROUP_EXPORT OS_WORKGROUP_WARN_RESULT\nint\nos_workgroup_join(os_workgroup_t wg, os_workgroup_join_token_t token_out);\n\n/*!\n * @function os_workgroup_leave\n *\n * @abstract\n * This removes the current thread from a workgroup it has previously\n * joined. Threads must leave all workgroups in the reverse order that they\n * have joined them. Failing to do so before exiting will result in undefined\n * behavior.\n *\n * If the join token is malformed, the process will be aborted.\n *\n * This API is real time safe.\n *\n * @param wg\n * The workgroup that the current thread would like to leave.\n *\n * @param token\n * This is the join token populated by the most recent call to\n * os_workgroup_join().\n */\nAPI_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0), watchos(7.0))\nOS_REFINED_FOR_SWIFT OS_WORKGROUP_EXPORT\nvoid\nos_workgroup_leave(os_workgroup_t wg, os_workgroup_join_token_t token);\n\n/* Working Arena index of a thread in a workgroup */\ntypedef uint32_t os_workgroup_index;\n/* Destructor for Working Arena */\ntypedef void (*os_workgroup_working_arena_destructor_t)(void * _Nullable);\n\n/*!\n * @function os_workgroup_set_working_arena\n *\n * @abstract\n * Associates a client defined working arena with the workgroup. The arena\n * is local to the workgroup object in the process. This is intended for\n * distributing a manually managed memory allocation between member threads\n * of the workgroup.\n *\n * This function can be called multiple times and the client specified\n * destructor will be called on the previously assigned arena, if any. This\n * function can only be called when no threads have currently joined the\n * workgroup and all workloops associated with the workgroup are idle.\n *\n * @param wg\n * The workgroup to associate the working arena with\n *\n * @param arena\n * The client managed arena to associate with the workgroup. This value can\n * be NULL.\n *\n * @param max_workers\n * The maximum number of threads that will ever query the workgroup for the\n * arena and request an index into it.  If the arena is not used to partition\n * work amongst member threads, then this field can be 0.\n *\n * @param destructor\n * A destructor to call on the previously assigned working arena, if any\n */\nAPI_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0), watchos(7.0))\nOS_REFINED_FOR_SWIFT OS_WORKGROUP_EXPORT OS_WORKGROUP_WARN_RESULT\nint\nos_workgroup_set_working_arena(os_workgroup_t wg, void * _Nullable arena,\n\tuint32_t max_workers, os_workgroup_working_arena_destructor_t destructor);\n\n/*!\n * @function os_workgroup_get_working_arena\n *\n * @abstract\n * Returns the working arena associated with the workgroup and the current\n * thread's index in the workgroup. This function can only be called by a member\n * of the workgroup. Multiple calls to this API by a member thread will return\n * the same arena and index until the thread leaves the workgroup.\n *\n * For workloops with an associated workgroup, every work item on the workloop\n * will receive the same index in the arena.\n *\n * This method returns NULL if no arena is set on the workgroup. The index\n * returned by this function is zero-based and is namespaced per workgroup\n * object in the process. The indices provided are strictly monotonic and never\n * reused until a future call to os_workgroup_set_working_arena.\n *\n * @param wg\n * The workgroup to get the working arena from.\n *\n * @param index_out\n * A pointer to a os_workgroup_index which will be populated by the caller's\n * index in the workgroup.\n */\nAPI_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0), watchos(7.0))\nOS_REFINED_FOR_SWIFT OS_WORKGROUP_EXPORT\nvoid * _Nullable\nos_workgroup_get_working_arena(os_workgroup_t wg,\n\t\tos_workgroup_index * _Nullable index_out);\n\n/*!\n * @function os_workgroup_cancel\n *\n * @abstract\n * This API invalidates a workgroup and indicates to the system that the\n * workload is no longer relevant to the caller.\n *\n * No new work should be initiated for a cancelled workgroup and\n * work that is already underway should periodically check for\n * cancellation with os_workgroup_testcancel and initiate cleanup if needed.\n *\n * Threads currently in the workgroup continue to be tracked together but no\n * new threads may join this workgroup - the only possible operation allowed is\n * to leave the workgroup. Other actions may have undefined behavior or\n * otherwise fail.\n *\n * This API is idempotent. Cancellation is local to the workgroup object\n * it is called on and does not affect other workgroups.\n *\n * @param wg\n * The workgroup that that the thread would like to cancel\n */\nAPI_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0), watchos(7.0))\nOS_REFINED_FOR_SWIFT OS_WORKGROUP_EXPORT\nvoid\nos_workgroup_cancel(os_workgroup_t wg);\n\n/*!\n * @function os_workgroup_testcancel\n *\n * @abstract\n * Returns true if the workgroup object has been cancelled. See also\n * os_workgroup_cancel\n */\nAPI_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0), watchos(7.0))\nOS_REFINED_FOR_SWIFT OS_WORKGROUP_EXPORT\nbool\nos_workgroup_testcancel(os_workgroup_t wg);\n\n/*!\n * @typedef os_workgroup_max_parallel_threads_attr_t\n *\n * @abstract\n * A pointer to a structure describing the set of properties of a workgroup to\n * override with the explicitly specified values in the structure.\n *\n * See also os_workgroup_max_parallel_threads.\n */\nOS_REFINED_FOR_SWIFT\ntypedef struct os_workgroup_max_parallel_threads_attr_s os_workgroup_mpt_attr_s;\nOS_REFINED_FOR_SWIFT\ntypedef struct os_workgroup_max_parallel_threads_attr_s *os_workgroup_mpt_attr_t;\n\n/*!\n * @function os_workgroup_max_parallel_threads\n *\n * @abstract\n * Returns the system's recommendation for maximum number of threads the client\n * should make for a multi-threaded workload in a given workgroup.\n *\n * This API takes into consideration the current hardware the code is running on\n * and the attributes of the workgroup. It does not take into consideration the\n * current load of the system and therefore always provides the most optimal\n * recommendation for the workload.\n *\n * @param wg\n * The workgroup in which the multi-threaded workload will be performed in. The\n * threads performing the multi-threaded workload are expected to join this\n * workgroup.\n *\n * @param attr\n * This value is currently unused and should be NULL.\n */\nAPI_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0), watchos(7.0))\nOS_REFINED_FOR_SWIFT OS_WORKGROUP_EXPORT\nint\nos_workgroup_max_parallel_threads(os_workgroup_t wg, os_workgroup_mpt_attr_t\n\t\t_Nullable attr);\n\nOS_WORKGROUP_ASSUME_NONNULL_END\n\n__END_DECLS\n\n#endif /* __OS_WORKGROUP_OBJECT__ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/os/workgroup_parallel.h",
    "content": "/*\n * Copyright (c) 2020 Apple Inc. All rights reserved.\n *\n * @APPLE_APACHE_LICENSE_HEADER_START@\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * @APPLE_APACHE_LICENSE_HEADER_END@\n */\n\n#ifndef __OS_WORKGROUP_PARALLEL__\n#define __OS_WORKGROUP_PARALLEL__\n\n#ifndef __OS_WORKGROUP_INDIRECT__\n#error \"Please #include <os/workgroup.h> instead of this file directly.\"\n#include <os/workgroup_base.h> // For header doc\n#endif\n\n#include <os/workgroup_object.h>\n\n__BEGIN_DECLS\n\nOS_WORKGROUP_ASSUME_NONNULL_BEGIN\n\n/*!\n * @typedef os_workgroup_parallel_t\n *\n * @abstract\n * A subclass of an os_workgroup_t for tracking parallel work.\n */\nOS_WORKGROUP_SUBCLASS_DECL_PROTO(os_workgroup_parallel, Parallelizable);\nOS_WORKGROUP_SUBCLASS_DECL(os_workgroup_parallel, os_workgroup, WorkGroupParallel);\n\n/*!\n * @function os_workgroup_parallel_create\n *\n * @abstract\n * Creates an os_workgroup_t which tracks a parallel workload.\n * A newly created os_workgroup_interval_t has no initial member threads -\n * in particular the creating thread does not join the os_workgroup_parallel_t\n * implicitly.\n *\n * See also os_workgroup_max_parallel_threads().\n *\n * @param name\n * A client specified string for labelling the workgroup. This parameter is\n * optional and can be NULL.\n *\n * @param attr\n * The requested set of workgroup attributes. NULL is to be specified for the\n * default set of attributes.\n */\nAPI_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0), watchos(7.0))\nOS_WORKGROUP_EXPORT OS_WORKGROUP_RETURNS_RETAINED\nOS_SWIFT_NAME(WorkGroupParallel.init(__name:attr:))\nos_workgroup_parallel_t _Nullable\nos_workgroup_parallel_create(const char * _Nullable name,\n\tos_workgroup_attr_t _Nullable attr);\n\nOS_WORKGROUP_ASSUME_NONNULL_END\n\n__END_DECLS\n\n#endif /* __OS_WORKGROUP_PARALLEL__ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_endian.h",
    "content": "/*\n * Copyright (c) 2004, 2006 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n\n/*\n * Copyright (c) 1995 NeXT Computer, Inc. All rights reserved.\n * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/*\n * Copyright (c) 1987, 1991, 1993\n *\tThe Regents of the University of California.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *\tThis product includes software developed by the University of\n *\tCalifornia, Berkeley and its contributors.\n * 4. Neither the name of the University nor the names of its contributors\n *    may be used to endorse or promote products derived from this software\n *    without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n */\n\n#ifndef _SYS__ENDIAN_H_\n#define _SYS__ENDIAN_H_\n\n#include <sys/cdefs.h>\n\n/*\n * Macros for network/external number representation conversion.\n */\n\n#if defined(lint)\n\n__BEGIN_DECLS\n__uint16_t      ntohs(__uint16_t);\n__uint16_t      htons(__uint16_t);\n__uint32_t      ntohl(__uint32_t);\n__uint32_t      htonl(__uint32_t);\n__END_DECLS\n\n#elif __DARWIN_BYTE_ORDER == __DARWIN_BIG_ENDIAN\n\n#define ntohl(x)        ((__uint32_t)(x))\n#define ntohs(x)        ((__uint16_t)(x))\n#define htonl(x)        ((__uint32_t)(x))\n#define htons(x)        ((__uint16_t)(x))\n\n#if     defined(KERNEL) || (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))\n\n#define ntohll(x)       ((__uint64_t)(x))\n#define htonll(x)       ((__uint64_t)(x))\n\n#define NTOHL(x)        (x)\n#define NTOHS(x)        (x)\n#define NTOHLL(x)       (x)\n#define HTONL(x)        (x)\n#define HTONS(x)        (x)\n#define HTONLL(x)       (x)\n#endif /* defined(KERNEL) || (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) */\n\n#else   /* __DARWIN_BYTE_ORDER == __DARWIN_LITTLE_ENDIAN */\n\n#include <libkern/_OSByteOrder.h>\n\n#define ntohs(x)        __DARWIN_OSSwapInt16(x)\n#define htons(x)        __DARWIN_OSSwapInt16(x)\n\n#define ntohl(x)        __DARWIN_OSSwapInt32(x)\n#define htonl(x)        __DARWIN_OSSwapInt32(x)\n\n#if     defined(KERNEL) || (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))\n\n#define ntohll(x)       __DARWIN_OSSwapInt64(x)\n#define htonll(x)       __DARWIN_OSSwapInt64(x)\n\n#define NTOHL(x)        (x) = ntohl((__uint32_t)x)\n#define NTOHS(x)        (x) = ntohs((__uint16_t)x)\n#define NTOHLL(x)       (x) = ntohll((__uint64_t)x)\n#define HTONL(x)        (x) = htonl((__uint32_t)x)\n#define HTONS(x)        (x) = htons((__uint16_t)x)\n#define HTONLL(x)       (x) = htonll((__uint64_t)x)\n#endif /* defined(KERNEL) || (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) */\n#endif /* __DARWIN_BYTE_ORDER */\n#endif /* !_SYS__ENDIAN_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_posix_availability.h",
    "content": "/* Copyright (c) 2010 Apple Inc. All rights reserved.\n * \n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n * \n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n * \n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n * \n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n * \n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n\n#ifndef _CDEFS_H_\n# error \"Never use <sys/_posix_availability.h> directly.  Use <sys/cdefs.h> instead.\"\n#endif\n\n#if !defined(_DARWIN_C_SOURCE) && defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 198808L\n#define ___POSIX_C_DEPRECATED_STARTING_198808L __deprecated\n#else\n#define ___POSIX_C_DEPRECATED_STARTING_198808L\n#endif\n\n#if !defined(_DARWIN_C_SOURCE) && defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 199009L\n#define ___POSIX_C_DEPRECATED_STARTING_199009L __deprecated\n#else\n#define ___POSIX_C_DEPRECATED_STARTING_199009L\n#endif\n\n#if !defined(_DARWIN_C_SOURCE) && defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 199209L\n#define ___POSIX_C_DEPRECATED_STARTING_199209L __deprecated\n#else\n#define ___POSIX_C_DEPRECATED_STARTING_199209L\n#endif\n\n#if !defined(_DARWIN_C_SOURCE) && defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 199309L\n#define ___POSIX_C_DEPRECATED_STARTING_199309L __deprecated\n#else\n#define ___POSIX_C_DEPRECATED_STARTING_199309L\n#endif\n\n#if !defined(_DARWIN_C_SOURCE) && defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 199506L\n#define ___POSIX_C_DEPRECATED_STARTING_199506L __deprecated\n#else\n#define ___POSIX_C_DEPRECATED_STARTING_199506L\n#endif\n\n#if !defined(_DARWIN_C_SOURCE) && defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112L\n#define ___POSIX_C_DEPRECATED_STARTING_200112L __deprecated\n#else\n#define ___POSIX_C_DEPRECATED_STARTING_200112L\n#endif\n\n#if !defined(_DARWIN_C_SOURCE) && defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200809L\n#define ___POSIX_C_DEPRECATED_STARTING_200809L __deprecated\n#else\n#define ___POSIX_C_DEPRECATED_STARTING_200809L\n#endif\n\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_pthread/_pthread_attr_t.h",
    "content": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n#ifndef _PTHREAD_ATTR_T\n#define _PTHREAD_ATTR_T\n#include <sys/_pthread/_pthread_types.h> /* __darwin_pthread_attr_t */\ntypedef __darwin_pthread_attr_t pthread_attr_t;\n#endif  /* _PTHREAD_ATTR_T */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_pthread/_pthread_cond_t.h",
    "content": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n#ifndef _PTHREAD_COND_T\n#define _PTHREAD_COND_T\n#include <sys/_pthread/_pthread_types.h> /* __darwin_pthread_cond_t */\ntypedef __darwin_pthread_cond_t pthread_cond_t;\n#endif /* _PTHREAD_COND_T */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_pthread/_pthread_condattr_t.h",
    "content": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n#ifndef _PTHREAD_CONDATTR_T\n#define _PTHREAD_CONDATTR_T\n#include <sys/_pthread/_pthread_types.h> /* __darwin_pthread_condattr_t */\ntypedef __darwin_pthread_condattr_t pthread_condattr_t;\n#endif /* _PTHREAD_CONDATTR_T */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_pthread/_pthread_key_t.h",
    "content": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n#ifndef _PTHREAD_KEY_T\n#define _PTHREAD_KEY_T\n#include <sys/_pthread/_pthread_types.h> /* __darwin_pthread_key_t */\ntypedef __darwin_pthread_key_t pthread_key_t;\n#endif /* _PTHREAD_KEY_T */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_pthread/_pthread_mutex_t.h",
    "content": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n#ifndef _PTHREAD_MUTEX_T\n#define _PTHREAD_MUTEX_T\n#include <sys/_pthread/_pthread_types.h> /* __darwin_pthread_mutex_t */\ntypedef __darwin_pthread_mutex_t pthread_mutex_t;\n#endif /*_PTHREAD_MUTEX_T */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_pthread/_pthread_mutexattr_t.h",
    "content": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n#ifndef _PTHREAD_MUTEXATTR_T\n#define _PTHREAD_MUTEXATTR_T\n#include <sys/_pthread/_pthread_types.h> /* __darwin_pthread_mutexattr_t */\ntypedef __darwin_pthread_mutexattr_t pthread_mutexattr_t;\n#endif /* _PTHREAD_MUTEXATTR_T */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_pthread/_pthread_once_t.h",
    "content": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n#ifndef _PTHREAD_ONCE_T\n#define _PTHREAD_ONCE_T\n#include <sys/_pthread/_pthread_types.h> /* __darwin_pthread_once_t */\ntypedef __darwin_pthread_once_t pthread_once_t;\n#endif /* _PTHREAD_ONCE_T */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_pthread/_pthread_rwlock_t.h",
    "content": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n#ifndef _PTHREAD_RWLOCK_T\n#define _PTHREAD_RWLOCK_T\n#include <sys/_pthread/_pthread_types.h> /* __darwin_pthread_rwlock_t */\ntypedef __darwin_pthread_rwlock_t pthread_rwlock_t;\n#endif /* _PTHREAD_RWLOCK_T */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_pthread/_pthread_rwlockattr_t.h",
    "content": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n#ifndef _PTHREAD_RWLOCKATTR_T\n#define _PTHREAD_RWLOCKATTR_T\n#include <sys/_pthread/_pthread_types.h> /* __darwin_pthread_rwlockattr_t */\ntypedef __darwin_pthread_rwlockattr_t pthread_rwlockattr_t;\n#endif /* _PTHREAD_RWLOCKATTR_T */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_pthread/_pthread_t.h",
    "content": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n#ifndef _PTHREAD_T\n#define _PTHREAD_T\n#include <sys/_pthread/_pthread_types.h> /* __darwin_pthread_t */\ntypedef __darwin_pthread_t pthread_t;\n#endif /* _PTHREAD_T */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_pthread/_pthread_types.h",
    "content": "/*\n * Copyright (c) 2003-2013 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n\n#ifndef _SYS__PTHREAD_TYPES_H_\n#define _SYS__PTHREAD_TYPES_H_\n\n#include <sys/cdefs.h>\n\n// pthread opaque structures\n#if defined(__LP64__)\n#define __PTHREAD_SIZE__\t\t8176\n#define __PTHREAD_ATTR_SIZE__\t\t56\n#define __PTHREAD_MUTEXATTR_SIZE__\t8\n#define __PTHREAD_MUTEX_SIZE__\t\t56\n#define __PTHREAD_CONDATTR_SIZE__\t8\n#define __PTHREAD_COND_SIZE__\t\t40\n#define __PTHREAD_ONCE_SIZE__\t\t8\n#define __PTHREAD_RWLOCK_SIZE__\t\t192\n#define __PTHREAD_RWLOCKATTR_SIZE__\t16\n#else // !__LP64__\n#define __PTHREAD_SIZE__\t\t4088\n#define __PTHREAD_ATTR_SIZE__\t\t36\n#define __PTHREAD_MUTEXATTR_SIZE__\t8\n#define __PTHREAD_MUTEX_SIZE__\t\t40\n#define __PTHREAD_CONDATTR_SIZE__\t4\n#define __PTHREAD_COND_SIZE__\t\t24\n#define __PTHREAD_ONCE_SIZE__\t\t4\n#define __PTHREAD_RWLOCK_SIZE__\t\t124\n#define __PTHREAD_RWLOCKATTR_SIZE__\t12\n#endif // !__LP64__\n\nstruct __darwin_pthread_handler_rec {\n\tvoid (*__routine)(void *);\t// Routine to call\n\tvoid *__arg;\t\t\t// Argument to pass\n\tstruct __darwin_pthread_handler_rec *__next;\n};\n\nstruct _opaque_pthread_attr_t {\n\tlong __sig;\n\tchar __opaque[__PTHREAD_ATTR_SIZE__];\n};\n\nstruct _opaque_pthread_cond_t {\n\tlong __sig;\n\tchar __opaque[__PTHREAD_COND_SIZE__];\n};\n\nstruct _opaque_pthread_condattr_t {\n\tlong __sig;\n\tchar __opaque[__PTHREAD_CONDATTR_SIZE__];\n};\n\nstruct _opaque_pthread_mutex_t {\n\tlong __sig;\n\tchar __opaque[__PTHREAD_MUTEX_SIZE__];\n};\n\nstruct _opaque_pthread_mutexattr_t {\n\tlong __sig;\n\tchar __opaque[__PTHREAD_MUTEXATTR_SIZE__];\n};\n\nstruct _opaque_pthread_once_t {\n\tlong __sig;\n\tchar __opaque[__PTHREAD_ONCE_SIZE__];\n};\n\nstruct _opaque_pthread_rwlock_t {\n\tlong __sig;\n\tchar __opaque[__PTHREAD_RWLOCK_SIZE__];\n};\n\nstruct _opaque_pthread_rwlockattr_t {\n\tlong __sig;\n\tchar __opaque[__PTHREAD_RWLOCKATTR_SIZE__];\n};\n\nstruct _opaque_pthread_t {\n\tlong __sig;\n\tstruct __darwin_pthread_handler_rec  *__cleanup_stack;\n\tchar __opaque[__PTHREAD_SIZE__];\n};\n\ntypedef struct _opaque_pthread_attr_t __darwin_pthread_attr_t;\ntypedef struct _opaque_pthread_cond_t __darwin_pthread_cond_t;\ntypedef struct _opaque_pthread_condattr_t __darwin_pthread_condattr_t;\ntypedef unsigned long __darwin_pthread_key_t;\ntypedef struct _opaque_pthread_mutex_t __darwin_pthread_mutex_t;\ntypedef struct _opaque_pthread_mutexattr_t __darwin_pthread_mutexattr_t;\ntypedef struct _opaque_pthread_once_t __darwin_pthread_once_t;\ntypedef struct _opaque_pthread_rwlock_t __darwin_pthread_rwlock_t;\ntypedef struct _opaque_pthread_rwlockattr_t __darwin_pthread_rwlockattr_t;\ntypedef struct _opaque_pthread_t *__darwin_pthread_t;\n\n#endif // _SYS__PTHREAD_TYPES_H_\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_select.h",
    "content": "/*\n * Copyright (c) 2005, 2007 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n\n/*\n * This is called from sys/select.h and sys/time.h for the common prototype\n * of select().  Setting _DARWIN_C_SOURCE or _DARWIN_UNLIMITED_SELECT uses\n * the version of select() that does not place a limit on the first argument\n * (nfds).  In the UNIX conformance case, values of nfds greater than\n * FD_SETSIZE will return an error of EINVAL.\n */\n#ifndef _SYS__SELECT_H_\n#define _SYS__SELECT_H_\n\n#include <sys/cdefs.h> /* __DARWIN_EXTSN_C, __DARWIN_1050, __DARWIN_ALIAS_C */\n#include <sys/_types/_fd_def.h> /* fd_set */\n#include <sys/_types/_timeval.h> /* struct timeval */\n\nint      select(int, fd_set * __restrict, fd_set * __restrict,\n    fd_set * __restrict, struct timeval * __restrict)\n\n#if defined(_DARWIN_C_SOURCE) || defined(_DARWIN_UNLIMITED_SELECT)\n__DARWIN_EXTSN_C(select)\n#else /* !_DARWIN_C_SOURCE && !_DARWIN_UNLIMITED_SELECT */\n#  if defined(__LP64__) && !__DARWIN_NON_CANCELABLE\n__DARWIN_1050(select)\n#  else /* !__LP64__ || __DARWIN_NON_CANCELABLE */\n__DARWIN_ALIAS_C(select)\n#  endif /* __LP64__ && !__DARWIN_NON_CANCELABLE */\n#endif /* _DARWIN_C_SOURCE || _DARWIN_UNLIMITED_SELECT */\n;\n\n#endif /* !_SYS__SELECT_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_structs.h",
    "content": "/*\n * Copyright (c) 2004-2013 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n\n#include <sys/cdefs.h>\n#include <sys/_types.h>\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_symbol_aliasing.h",
    "content": "/* Copyright (c) 2010 Apple Inc. All rights reserved.\n * \n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n * \n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n * \n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n * \n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n * \n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n\n#ifndef _CDEFS_H_\n# error \"Never use <sys/_symbol_aliasing.h> directly.  Use <sys/cdefs.h> instead.\"\n#endif\n\n#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 20000\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_2_0(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_2_0(x)\n#endif\n\n#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 20100\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_2_1(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_2_1(x)\n#endif\n\n#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 20200\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_2_2(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_2_2(x)\n#endif\n\n#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 30000\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_3_0(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_3_0(x)\n#endif\n\n#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 30100\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_3_1(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_3_1(x)\n#endif\n\n#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 30200\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_3_2(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_3_2(x)\n#endif\n\n#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 40000\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_4_0(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_4_0(x)\n#endif\n\n#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 40100\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_4_1(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_4_1(x)\n#endif\n\n#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 40200\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_4_2(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_4_2(x)\n#endif\n\n#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 40300\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_4_3(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_4_3(x)\n#endif\n\n#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 50000\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_5_0(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_5_0(x)\n#endif\n\n#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 50100\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_5_1(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_5_1(x)\n#endif\n\n#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 60000\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_6_0(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_6_0(x)\n#endif\n\n#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 60100\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_6_1(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_6_1(x)\n#endif\n\n#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 70000\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_7_0(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_7_0(x)\n#endif\n\n#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 70100\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_7_1(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_7_1(x)\n#endif\n\n#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 80000\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_8_0(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_8_0(x)\n#endif\n\n#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 80100\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_8_1(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_8_1(x)\n#endif\n\n#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 80200\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_8_2(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_8_2(x)\n#endif\n\n#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 80300\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_8_3(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_8_3(x)\n#endif\n\n#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 80400\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_8_4(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_8_4(x)\n#endif\n\n#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 90000\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_9_0(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_9_0(x)\n#endif\n\n#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 90100\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_9_1(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_9_1(x)\n#endif\n\n#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 90200\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_9_2(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_9_2(x)\n#endif\n\n#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 90300\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_9_3(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_9_3(x)\n#endif\n\n#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 100000\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_10_0(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_10_0(x)\n#endif\n\n#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 100100\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_10_1(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_10_1(x)\n#endif\n\n#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 100200\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_10_2(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_10_2(x)\n#endif\n\n#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 100300\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_10_3(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_10_3(x)\n#endif\n\n#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 110000\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_11_0(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_11_0(x)\n#endif\n\n#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 110100\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_11_1(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_11_1(x)\n#endif\n\n#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 110200\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_11_2(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_11_2(x)\n#endif\n\n#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 110300\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_11_3(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_11_3(x)\n#endif\n\n#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 110400\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_11_4(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_11_4(x)\n#endif\n\n#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 120000\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_12_0(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_12_0(x)\n#endif\n\n#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 120100\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_12_1(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_12_1(x)\n#endif\n\n#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 120200\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_12_2(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_12_2(x)\n#endif\n\n#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 120300\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_12_3(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_12_3(x)\n#endif\n\n#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 120400\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_12_4(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_12_4(x)\n#endif\n\n#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 130000\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_13_0(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_13_0(x)\n#endif\n\n#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 130100\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_13_1(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_13_1(x)\n#endif\n\n#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 130200\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_13_2(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_13_2(x)\n#endif\n\n#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 130300\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_13_3(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_13_3(x)\n#endif\n\n#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 130400\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_13_4(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_13_4(x)\n#endif\n\n#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 130500\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_13_5(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_13_5(x)\n#endif\n\n#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 130600\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_13_6(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_13_6(x)\n#endif\n\n#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 130700\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_13_7(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_13_7(x)\n#endif\n\n#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 140000\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_14_0(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_14_0(x)\n#endif\n\n#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 140100\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_14_1(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_14_1(x)\n#endif\n\n#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 140200\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_14_2(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_14_2(x)\n#endif\n\n#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 140300\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_14_3(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_14_3(x)\n#endif\n\n#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 140500\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_14_5(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_14_5(x)\n#endif\n\n#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 150000\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_15_0(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_15_0(x)\n#endif\n\n#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1000\n#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_0(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_0(x)\n#endif\n\n#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1010\n#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_1(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_1(x)\n#endif\n\n#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1020\n#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_2(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_2(x)\n#endif\n\n#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1030\n#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_3(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_3(x)\n#endif\n\n#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1040\n#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_4(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_4(x)\n#endif\n\n#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1050\n#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_5(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_5(x)\n#endif\n\n#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1060\n#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_6(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_6(x)\n#endif\n\n#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1070\n#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_7(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_7(x)\n#endif\n\n#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1080\n#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_8(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_8(x)\n#endif\n\n#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1090\n#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_9(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_9(x)\n#endif\n\n#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101000\n#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_10(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_10(x)\n#endif\n\n#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101002\n#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_10_2(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_10_2(x)\n#endif\n\n#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101003\n#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_10_3(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_10_3(x)\n#endif\n\n#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101100\n#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_11(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_11(x)\n#endif\n\n#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101102\n#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_11_2(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_11_2(x)\n#endif\n\n#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101103\n#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_11_3(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_11_3(x)\n#endif\n\n#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101104\n#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_11_4(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_11_4(x)\n#endif\n\n#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101200\n#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_12(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_12(x)\n#endif\n\n#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101201\n#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_12_1(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_12_1(x)\n#endif\n\n#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101202\n#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_12_2(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_12_2(x)\n#endif\n\n#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101204\n#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_12_4(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_12_4(x)\n#endif\n\n#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101300\n#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_13(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_13(x)\n#endif\n\n#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101301\n#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_13_1(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_13_1(x)\n#endif\n\n#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101302\n#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_13_2(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_13_2(x)\n#endif\n\n#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101304\n#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_13_4(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_13_4(x)\n#endif\n\n#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101400\n#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_14(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_14(x)\n#endif\n\n#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101401\n#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_14_1(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_14_1(x)\n#endif\n\n#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101404\n#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_14_4(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_14_4(x)\n#endif\n\n#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101405\n#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_14_5(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_14_5(x)\n#endif\n\n#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101406\n#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_14_6(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_14_6(x)\n#endif\n\n#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101500\n#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_15(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_15(x)\n#endif\n\n#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101501\n#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_15_1(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_15_1(x)\n#endif\n\n#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101600\n#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_16(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_MAC___MAC_10_16(x)\n#endif\n\n#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 110000\n#define __DARWIN_ALIAS_STARTING_MAC___MAC_11_0(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_MAC___MAC_11_0(x)\n#endif\n\n#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 110100\n#define __DARWIN_ALIAS_STARTING_MAC___MAC_11_1(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_MAC___MAC_11_1(x)\n#endif\n\n#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 110300\n#define __DARWIN_ALIAS_STARTING_MAC___MAC_11_3(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_MAC___MAC_11_3(x)\n#endif\n\n#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 120000\n#define __DARWIN_ALIAS_STARTING_MAC___MAC_12_0(x) x\n#else\n#define __DARWIN_ALIAS_STARTING_MAC___MAC_12_0(x)\n#endif\n\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_blkcnt_t.h",
    "content": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n#ifndef _BLKCNT_T\n#define _BLKCNT_T\n#include <sys/_types.h> /* __darwin_blkcnt_t */\ntypedef __darwin_blkcnt_t        blkcnt_t;\n#endif  /* _BLKCNT_T */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_blksize_t.h",
    "content": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n#ifndef _BLKSIZE_T\n#define _BLKSIZE_T\n#include <sys/_types.h> /* __darwin_blksize_t */\ntypedef __darwin_blksize_t        blksize_t;\n#endif  /* _BLKSIZE_T */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_caddr_t.h",
    "content": "/*\n * Copyright (c) 2017 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n#ifndef _CADDR_T\n#define _CADDR_T\ntypedef char *          caddr_t;\n#endif /* _CADDR_T */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_clock_t.h",
    "content": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n#ifndef _CLOCK_T\n#define _CLOCK_T\n#include <machine/types.h> /* __darwin_clock_t */\ntypedef __darwin_clock_t        clock_t;\n#endif /* _CLOCK_T */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_ct_rune_t.h",
    "content": "/*\n * Copyright (c) 2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n\n#ifndef _CT_RUNE_T\n#define _CT_RUNE_T\n#include <machine/_types.h> /* __darwin_ct_rune_t */\ntypedef __darwin_ct_rune_t ct_rune_t;\n#endif /* _CT_RUNE_T */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_dev_t.h",
    "content": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n#ifndef _DEV_T\n#define _DEV_T\n#include <sys/_types.h> /* __darwin_dev_t */\ntypedef __darwin_dev_t        dev_t;    /* device number */\n#endif  /* _DEV_T */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_errno_t.h",
    "content": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n#ifndef _ERRNO_T\n#define _ERRNO_T\ntypedef int                    errno_t;\n#endif  /* _ERRNO_T */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_fd_clr.h",
    "content": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n#ifndef FD_CLR\n#define FD_CLR(n, p)    __DARWIN_FD_CLR(n, p)\n#endif /* FD_CLR */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_fd_copy.h",
    "content": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n#ifndef FD_COPY\n#define FD_COPY(f, t)   __DARWIN_FD_COPY(f, t)\n#endif /* FD_COPY */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_fd_def.h",
    "content": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n#ifndef _FD_SET\n#define _FD_SET\n\n#include <machine/types.h> /* __int32_t and uintptr_t */\n#include <Availability.h>\n\n/*\n * Select uses bit masks of file descriptors in longs.  These macros\n * manipulate such bit fields (the filesystem macros use chars).  The\n * extra protection here is to permit application redefinition above\n * the default size.\n */\n#ifdef FD_SETSIZE\n#define __DARWIN_FD_SETSIZE     FD_SETSIZE\n#else /* !FD_SETSIZE */\n#define __DARWIN_FD_SETSIZE     1024\n#endif /* FD_SETSIZE */\n#define __DARWIN_NBBY           8                               /* bits in a byte */\n#define __DARWIN_NFDBITS        (sizeof(__int32_t) * __DARWIN_NBBY) /* bits per mask */\n#define __DARWIN_howmany(x, y)  ((((x) % (y)) == 0) ? ((x) / (y)) : (((x) / (y)) + 1)) /* # y's == x bits? */\n\n__BEGIN_DECLS\ntypedef struct fd_set {\n\t__int32_t       fds_bits[__DARWIN_howmany(__DARWIN_FD_SETSIZE, __DARWIN_NFDBITS)];\n} fd_set;\n\nint __darwin_check_fd_set_overflow(int, const void *, int) __API_AVAILABLE(macosx(11.0), ios(14.0), tvos(14.0), watchos(7.0));\n__END_DECLS\n\n__header_always_inline int\n__darwin_check_fd_set(int _a, const void *_b)\n{\n#ifdef __clang__\n#pragma clang diagnostic push\n#pragma clang diagnostic ignored \"-Wunguarded-availability-new\"\n#endif\n\tif ((uintptr_t)&__darwin_check_fd_set_overflow != (uintptr_t) 0) {\n#if defined(_DARWIN_UNLIMITED_SELECT) || defined(_DARWIN_C_SOURCE)\n\t\treturn __darwin_check_fd_set_overflow(_a, _b, 1);\n#else\n\t\treturn __darwin_check_fd_set_overflow(_a, _b, 0);\n#endif\n\t} else {\n\t\treturn 1;\n\t}\n#ifdef __clang__\n#pragma clang diagnostic pop\n#endif\n}\n\n/* This inline avoids argument side-effect issues with FD_ISSET() */\n__header_always_inline int\n__darwin_fd_isset(int _fd, const struct fd_set *_p)\n{\n\tif (__darwin_check_fd_set(_fd, (const void *) _p)) {\n\t\treturn _p->fds_bits[(unsigned long)_fd / __DARWIN_NFDBITS] & ((__int32_t)(((unsigned long)1) << ((unsigned long)_fd % __DARWIN_NFDBITS)));\n\t}\n\n\treturn 0;\n}\n\n__header_always_inline void\n__darwin_fd_set(int _fd, struct fd_set *const _p)\n{\n\tif (__darwin_check_fd_set(_fd, (const void *) _p)) {\n\t\t(_p->fds_bits[(unsigned long)_fd / __DARWIN_NFDBITS] |= ((__int32_t)(((unsigned long)1) << ((unsigned long)_fd % __DARWIN_NFDBITS))));\n\t}\n}\n\n__header_always_inline void\n__darwin_fd_clr(int _fd, struct fd_set *const _p)\n{\n\tif (__darwin_check_fd_set(_fd, (const void *) _p)) {\n\t\t(_p->fds_bits[(unsigned long)_fd / __DARWIN_NFDBITS] &= ~((__int32_t)(((unsigned long)1) << ((unsigned long)_fd % __DARWIN_NFDBITS))));\n\t}\n}\n\n\n#define __DARWIN_FD_SET(n, p)   __darwin_fd_set((n), (p))\n#define __DARWIN_FD_CLR(n, p)   __darwin_fd_clr((n), (p))\n#define __DARWIN_FD_ISSET(n, p) __darwin_fd_isset((n), (p))\n\n#if __GNUC__ > 3 || __GNUC__ == 3 && __GNUC_MINOR__ >= 3\n/*\n * Use the built-in bzero function instead of the library version so that\n * we do not pollute the namespace or introduce prototype warnings.\n */\n#define __DARWIN_FD_ZERO(p)     __builtin_bzero(p, sizeof(*(p)))\n#else\n#define __DARWIN_FD_ZERO(p)     bzero(p, sizeof(*(p)))\n#endif\n\n#define __DARWIN_FD_COPY(f, t)  bcopy(f, t, sizeof(*(f)))\n#endif /* _FD_SET */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_fd_isset.h",
    "content": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n#ifndef FD_ISSET\n#define FD_ISSET(n, p)  __DARWIN_FD_ISSET(n, p)\n#endif /* FD_ISSET */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_fd_set.h",
    "content": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n#ifndef FD_SET\n#define FD_SET(n, p)    __DARWIN_FD_SET(n, p)\n#endif /* FD_SET */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_fd_setsize.h",
    "content": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n#ifndef FD_SETSIZE\n#define FD_SETSIZE      __DARWIN_FD_SETSIZE\n#endif /* FD_SETSIZE */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_fd_zero.h",
    "content": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n#ifndef FD_ZERO\n#define FD_ZERO(p)      __DARWIN_FD_ZERO(p)\n#endif /* FD_ZERO */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_filesec_t.h",
    "content": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n#ifndef _FILESEC_T\n#define _FILESEC_T\nstruct _filesec;\ntypedef struct _filesec *filesec_t;\n#endif /* _FILESEC_T */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_fsblkcnt_t.h",
    "content": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n#ifndef _FSBLKCNT_T\n#define _FSBLKCNT_T\n#include <sys/_types.h> /* __darwin_fsblkcnt_t */\ntypedef __darwin_fsblkcnt_t             fsblkcnt_t;\n#endif /* _FSBLKCNT_T */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_fsfilcnt_t.h",
    "content": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n#ifndef _FSFILCNT_T\n#define _FSFILCNT_T\n#include <sys/_types.h> /* __darwin_fsfilcnt_t */\ntypedef __darwin_fsfilcnt_t             fsfilcnt_t;\n#endif /* _FSFILCNT_T */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_fsid_t.h",
    "content": "/*\n * Copyright (c) 2014 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n#ifndef _FSID_T\n#define _FSID_T\n#include <sys/_types/_int32_t.h> /* int32_t */\ntypedef struct fsid { int32_t val[2]; } fsid_t; /* file system id type */\n#endif /* _FSID_T */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_fsobj_id_t.h",
    "content": "/*\n * Copyright (c) 2016 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n#ifndef _FSOBJ_ID_T\n#define _FSOBJ_ID_T\n\n#include <sys/_types/_u_int32_t.h> /* u_int32_t */\n\ntypedef struct fsobj_id {\n\tu_int32_t fid_objno;\n\tu_int32_t fid_generation;\n} fsobj_id_t;\n\n#endif /* _FSOBJ_ID_T */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_gid_t.h",
    "content": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n#ifndef _GID_T\n#define _GID_T\n#include <sys/_types.h> /* __darwin_gid_t */\ntypedef __darwin_gid_t  gid_t;\n#endif\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_guid_t.h",
    "content": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n#ifndef _KAUTH_GUID\n#define _KAUTH_GUID\n/* Apple-style globally unique identifier */\ntypedef union {\n#define KAUTH_GUID_SIZE 16      /* 128-bit identifier */\n\tunsigned char g_guid[KAUTH_GUID_SIZE];\n\tunsigned int g_guid_asint[KAUTH_GUID_SIZE / sizeof(unsigned int)];\n} guid_t;\n#define _GUID_T\n#endif /* _KAUTH_GUID */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_id_t.h",
    "content": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n#ifndef _ID_T\n#define _ID_T\n#include <sys/_types.h> /* __darwin_id_t */\ntypedef __darwin_id_t   id_t;           /* can hold pid_t, gid_t, or uid_t */\n#endif /* _ID_T */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_in_addr_t.h",
    "content": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n#ifndef _IN_ADDR_T\n#define _IN_ADDR_T\n#include <machine/types.h> /* __uint32_t */\ntypedef __uint32_t      in_addr_t;      /* base type for internet address */\n#endif /* _IN_ADDR_T */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_in_port_t.h",
    "content": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n#ifndef _IN_PORT_T\n#define _IN_PORT_T\n#include <machine/types.h> /* __uint16_t */\ntypedef __uint16_t              in_port_t;\n#endif /* _IN_PORT_T */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_ino64_t.h",
    "content": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n#ifndef _INO64_T\n#define _INO64_T\n#include <sys/_types.h> /* __darwin_ino64_t */\ntypedef __darwin_ino64_t        ino64_t;        /* 64bit inode number */\n#endif  /* _INO64_T */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_ino_t.h",
    "content": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n#ifndef _INO_T\n#define _INO_T\n#include <sys/_types.h> /* __darwin_ino_t */\ntypedef __darwin_ino_t          ino_t;          /* inode number */\n#endif  /* _INO_T */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_int16_t.h",
    "content": "/*\n * Copyright (c) 2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n#ifndef _INT16_T\n#define _INT16_T\ntypedef short                   int16_t;\n#endif /* _INT16_T */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_int32_t.h",
    "content": "/*\n * Copyright (c) 2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n#ifndef _INT32_T\n#define _INT32_T\ntypedef int                     int32_t;\n#endif /* _INT32_T */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_int64_t.h",
    "content": "/*\n * Copyright (c) 2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n#ifndef _INT64_T\n#define _INT64_T\ntypedef long long               int64_t;\n#endif /* _INT64_T */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_int8_t.h",
    "content": "/*\n * Copyright (c) 2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n#ifndef _INT8_T\n#define _INT8_T\ntypedef signed char           int8_t;\n#endif /* _INT8_T */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_intptr_t.h",
    "content": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n#ifndef _INTPTR_T\n#define _INTPTR_T\n#include <machine/types.h> /* __darwin_intptr_t */\n\ntypedef __darwin_intptr_t       intptr_t;\n#endif /* _INTPTR_T */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_iovec_t.h",
    "content": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n#ifndef _STRUCT_IOVEC\n#define _STRUCT_IOVEC\n#include <sys/_types/_size_t.h> /* size_t */\nstruct iovec {\n\tvoid *   iov_base;      /* [XSI] Base address of I/O memory region */\n\tsize_t   iov_len;       /* [XSI] Size of region iov_base points to */\n};\n#endif /* _STRUCT_IOVEC */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_key_t.h",
    "content": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n#ifndef _KEY_T\n#define _KEY_T\n#include <machine/types.h> /* __int32_t */\ntypedef __int32_t        key_t;         /* IPC key (for Sys V IPC) */\n#endif  /* _KEY_T */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_mach_port_t.h",
    "content": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n\n/*\n *\tmach_port_t - a named port right\n *\n *\tIn user-space, \"rights\" are represented by the name of the\n *\tright in the Mach port namespace.  Even so, this type is\n *\tpresented as a unique one to more clearly denote the presence\n *\tof a right coming along with the name.\n *\n *\tOften, various rights for a port held in a single name space\n *\twill coalesce and are, therefore, be identified by a single name\n *\t[this is the case for send and receive rights].  But not\n *\talways [send-once rights currently get a unique name for\n *\teach right].\n *\n *\tThis definition of mach_port_t is only for user-space.\n *\n */\n\n#ifndef _MACH_PORT_T\n#define _MACH_PORT_T\n#include <sys/_types.h> /* __darwin_mach_port_t */\ntypedef __darwin_mach_port_t mach_port_t;\n#endif /* _MACH_PORT_T */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_mbstate_t.h",
    "content": "/*\n * Copyright (c) 2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n\n#ifndef _MBSTATE_T\n#define _MBSTATE_T\n#include <machine/types.h> /* __darwin_mbstate_t */\ntypedef __darwin_mbstate_t mbstate_t;\n#endif /* _MBSTATE_T */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_mode_t.h",
    "content": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n#ifndef _MODE_T\n#define _MODE_T\n#include <sys/_types.h> /* __darwin_mode_t */\ntypedef __darwin_mode_t         mode_t;\n#endif  /* _MODE_T */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_nlink_t.h",
    "content": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n#ifndef _NLINK_T\n#define _NLINK_T\n#include <machine/types.h> /* __uint16_t */\ntypedef __uint16_t        nlink_t;      /* link count */\n#endif  /* _NLINK_T */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_null.h",
    "content": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n#ifndef NULL\n#include <sys/_types.h> /* __DARWIN_NULL */\n#define NULL  __DARWIN_NULL\n#endif  /* NULL */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_o_dsync.h",
    "content": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n#ifndef O_DSYNC\n#define O_DSYNC                 0x400000        /* synch I/O data integrity */\n#endif /* O_DSYNC */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_o_sync.h",
    "content": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n#ifndef O_SYNC\n#define O_SYNC                  0x0080          /* synch I/O file integrity */\n#endif /* O_SYNC */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_off_t.h",
    "content": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n#ifndef _OFF_T\n#define _OFF_T\n#include <sys/_types.h> /* __darwin_off_t */\ntypedef __darwin_off_t          off_t;\n#endif  /* _OFF_T */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_offsetof.h",
    "content": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n#ifndef offsetof\n#define offsetof(type, field) __offsetof(type, field)\n#endif /* offsetof */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_os_inline.h",
    "content": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n#if !defined(OS_INLINE)\n# if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L\n#        define OS_INLINE static inline\n# else\n#        define OS_INLINE static __inline__\n# endif\n#endif /* OS_INLINE */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_pid_t.h",
    "content": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n#ifndef _PID_T\n#define _PID_T\n#include <sys/_types.h> /* __darwin_pid_t */\ntypedef __darwin_pid_t        pid_t;\n#endif  /* _PID_T */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_posix_vdisable.h",
    "content": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n#ifndef _POSIX_VDISABLE\n#define _POSIX_VDISABLE         ((unsigned char)'\\377')\n#endif /* POSIX_VDISABLE */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_ptrdiff_t.h",
    "content": "/*\n * Copyright (c) 2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n\n#ifndef _PTRDIFF_T\n#define _PTRDIFF_T\n#include <machine/types.h> /* __darwin_ptrdiff_t */\ntypedef __darwin_ptrdiff_t ptrdiff_t;\n#endif /* _PTRDIFF_T */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_rsize_t.h",
    "content": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n#ifndef _RSIZE_T\n#define _RSIZE_T\n#include <machine/types.h> /* __darwin_size_t */\ntypedef __darwin_size_t        rsize_t;\n#endif  /* _RSIZE_T */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_rune_t.h",
    "content": "/*\n * Copyright (c) 2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n#ifndef _RUNE_T\n#define _RUNE_T\n#include <machine/_types.h> /* __darwin_rune_t */\ntypedef __darwin_rune_t rune_t;\n#endif /* _RUNE_T */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_s_ifmt.h",
    "content": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n\n/*\n * [XSI] The symbolic names for file modes for use as values of mode_t\n * shall be defined as described in <sys/stat.h>\n */\n#ifndef S_IFMT\n/* File type */\n#define S_IFMT          0170000         /* [XSI] type of file mask */\n#define S_IFIFO         0010000         /* [XSI] named pipe (fifo) */\n#define S_IFCHR         0020000         /* [XSI] character special */\n#define S_IFDIR         0040000         /* [XSI] directory */\n#define S_IFBLK         0060000         /* [XSI] block special */\n#define S_IFREG         0100000         /* [XSI] regular */\n#define S_IFLNK         0120000         /* [XSI] symbolic link */\n#define S_IFSOCK        0140000         /* [XSI] socket */\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n#define S_IFWHT         0160000         /* OBSOLETE: whiteout */\n#endif\n\n/* File mode */\n/* Read, write, execute/search by owner */\n#define S_IRWXU         0000700         /* [XSI] RWX mask for owner */\n#define S_IRUSR         0000400         /* [XSI] R for owner */\n#define S_IWUSR         0000200         /* [XSI] W for owner */\n#define S_IXUSR         0000100         /* [XSI] X for owner */\n/* Read, write, execute/search by group */\n#define S_IRWXG         0000070         /* [XSI] RWX mask for group */\n#define S_IRGRP         0000040         /* [XSI] R for group */\n#define S_IWGRP         0000020         /* [XSI] W for group */\n#define S_IXGRP         0000010         /* [XSI] X for group */\n/* Read, write, execute/search by others */\n#define S_IRWXO         0000007         /* [XSI] RWX mask for other */\n#define S_IROTH         0000004         /* [XSI] R for other */\n#define S_IWOTH         0000002         /* [XSI] W for other */\n#define S_IXOTH         0000001         /* [XSI] X for other */\n\n#define S_ISUID         0004000         /* [XSI] set user id on execution */\n#define S_ISGID         0002000         /* [XSI] set group id on execution */\n#define S_ISVTX         0001000         /* [XSI] directory restrcted delete */\n\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n#define S_ISTXT         S_ISVTX         /* sticky bit: not supported */\n#define S_IREAD         S_IRUSR         /* backward compatability */\n#define S_IWRITE        S_IWUSR         /* backward compatability */\n#define S_IEXEC         S_IXUSR         /* backward compatability */\n#endif\n#endif  /* !S_IFMT */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_sa_family_t.h",
    "content": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n#ifndef _SA_FAMILY_T\n#define _SA_FAMILY_T\n#include <machine/types.h> /* __uint8_t */\ntypedef __uint8_t               sa_family_t;\n#endif  /* _SA_FAMILY_T */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_seek_set.h",
    "content": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n\n#include <sys/cdefs.h>\n\n/* whence values for lseek(2) */\n#ifndef SEEK_SET\n#define SEEK_SET        0       /* set file offset to offset */\n#define SEEK_CUR        1       /* set file offset to current plus offset */\n#define SEEK_END        2       /* set file offset to EOF plus offset */\n#endif  /* !SEEK_SET */\n\n#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL\n#ifndef SEEK_HOLE\n#define SEEK_HOLE       3       /* set file offset to the start of the next hole greater than or equal to the supplied offset */\n#endif\n\n#ifndef SEEK_DATA\n#define SEEK_DATA       4       /* set file offset to the start of the next non-hole file region greater than or equal to the supplied offset */\n#endif\n#endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_sigaltstack.h",
    "content": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n\n/* Structure used in sigaltstack call. */\n#ifndef _STRUCT_SIGALTSTACK\n\n#include <sys/cdefs.h> /* __DARWIN_UNIX03 */\n\n#if __DARWIN_UNIX03\n#define _STRUCT_SIGALTSTACK     struct __darwin_sigaltstack\n#else /* !__DARWIN_UNIX03 */\n#define _STRUCT_SIGALTSTACK     struct sigaltstack\n#endif /* __DARWIN_UNIX03 */\n\n#include <machine/types.h> /* __darwin_size_t */\n\n_STRUCT_SIGALTSTACK\n{\n\tvoid            *ss_sp;         /* signal stack base */\n\t__darwin_size_t ss_size;        /* signal stack length */\n\tint             ss_flags;       /* SA_DISABLE and/or SA_ONSTACK */\n};\ntypedef _STRUCT_SIGALTSTACK     stack_t; /* [???] signal stack */\n\n#endif /* _STRUCT_SIGALTSTACK */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_sigset_t.h",
    "content": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n#ifndef _SIGSET_T\n#define _SIGSET_T\n#include <sys/_types.h> /* __darwin_sigset_t */\ntypedef __darwin_sigset_t               sigset_t;\n#endif  /* _SIGSET_T */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_size_t.h",
    "content": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n#ifndef _SIZE_T\n#define _SIZE_T\n#include <machine/_types.h> /* __darwin_size_t */\ntypedef __darwin_size_t        size_t;\n#endif  /* _SIZE_T */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_socklen_t.h",
    "content": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n#ifndef _SOCKLEN_T\n#define _SOCKLEN_T\n#include <machine/types.h> /* __darwin_socklen_t */\ntypedef __darwin_socklen_t      socklen_t;\n#endif\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_ssize_t.h",
    "content": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n#ifndef _SSIZE_T\n#define _SSIZE_T\n#include <machine/types.h> /* __darwin_ssize_t */\ntypedef __darwin_ssize_t        ssize_t;\n#endif  /* _SSIZE_T */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_suseconds_t.h",
    "content": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n#ifndef _SUSECONDS_T\n#define _SUSECONDS_T\n#include <sys/_types.h> /* __darwin_suseconds_t */\ntypedef __darwin_suseconds_t    suseconds_t;\n#endif  /* _SUSECONDS_T */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_time_t.h",
    "content": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n#ifndef _TIME_T\n#define _TIME_T\n#include <machine/types.h> /* __darwin_time_t */\ntypedef __darwin_time_t         time_t;\n#endif  /* _TIME_T */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_timespec.h",
    "content": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n#ifndef _STRUCT_TIMESPEC\n#define _STRUCT_TIMESPEC        struct timespec\n\n#include <machine/types.h> /* __darwin_time_t */\n\n_STRUCT_TIMESPEC\n{\n\t__darwin_time_t tv_sec;\n\tlong            tv_nsec;\n};\n#endif /* _STRUCT_TIMESPEC */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_timeval.h",
    "content": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n#ifndef _STRUCT_TIMEVAL\n#define _STRUCT_TIMEVAL         struct timeval\n\n#include <machine/types.h> /* __darwin_time_t */\n#include <sys/_types.h> /* __darwin_suseconds_t */\n\n_STRUCT_TIMEVAL\n{\n\t__darwin_time_t         tv_sec;         /* seconds */\n\t__darwin_suseconds_t    tv_usec;        /* and microseconds */\n};\n#endif /* _STRUCT_TIMEVAL */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_timeval32.h",
    "content": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n#ifndef _STRUCT_TIMEVAL32\n#define _STRUCT_TIMEVAL32       struct timeval32\n\n#include <machine/types.h> /* __int32_t */\n\n_STRUCT_TIMEVAL32\n{\n\t__int32_t               tv_sec;         /* seconds */\n\t__int32_t               tv_usec;        /* and microseconds */\n};\n#endif /* _STRUCT_TIMEVAL32 */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_timeval64.h",
    "content": "/*\n * Copyright (c) 2015 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n\n#ifndef _STRUCT_TIMEVAL64\n#define _STRUCT_TIMEVAL64\n\n#include <machine/types.h> /* __int64_t */\n\nstruct timeval64 {\n\t__int64_t               tv_sec;         /* seconds */\n\t__int64_t               tv_usec;        /* and microseconds */\n};\n#endif /* _STRUCT_TIMEVAL32 */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_u_char.h",
    "content": "/*\n * Copyright (c) 2017 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n#ifndef _U_CHAR\n#define _U_CHAR\ntypedef unsigned char   u_char;\n#endif /* _U_CHAR */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_u_int.h",
    "content": "/*\n * Copyright (c) 2017 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n#ifndef _U_INT\n#define _U_INT\ntypedef unsigned int    u_int;\n#endif /* _U_INT */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_u_int16_t.h",
    "content": "/*\n * Copyright (c) 2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n#ifndef _U_INT16_T\n#define _U_INT16_T\ntypedef unsigned short                  u_int16_t;\n#endif /* _U_INT16_T */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_u_int32_t.h",
    "content": "/*\n * Copyright (c) 2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n#ifndef _U_INT32_T\n#define _U_INT32_T\ntypedef unsigned int            u_int32_t;\n#endif /* _U_INT32_T */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_u_int64_t.h",
    "content": "/*\n * Copyright (c) 2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n#ifndef _U_INT64_T\n#define _U_INT64_T\ntypedef unsigned long long      u_int64_t;\n#endif /* _U_INT64_T */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_u_int8_t.h",
    "content": "/*\n * Copyright (c) 2016 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n#ifndef _U_INT8_T\n#define _U_INT8_T\ntypedef unsigned char           u_int8_t;\n#endif /* _U_INT8_T */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_u_short.h",
    "content": "/*\n * Copyright (c) 2017 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n#ifndef _U_SHORT\n#define _U_SHORT\ntypedef unsigned short  u_short;\n#endif /* _U_SHORT */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_ucontext.h",
    "content": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n#ifndef _STRUCT_UCONTEXT\n\n#include <sys/cdefs.h> /* __DARWIN_UNIX03 */\n\n#if __DARWIN_UNIX03\n#define _STRUCT_UCONTEXT        struct __darwin_ucontext\n#else /* !__DARWIN_UNIX03 */\n#define _STRUCT_UCONTEXT        struct ucontext\n#endif /* __DARWIN_UNIX03 */\n\n#include <machine/types.h> /* __darwin_size_t */\n#include <machine/_mcontext.h> /* _STRUCT_MCONTEXT */\n#include <sys/_types.h> /* __darwin_sigset_t */\n#include <sys/_types/_sigaltstack.h> /* _STRUCT_SIGALTSTACK */\n\n_STRUCT_UCONTEXT\n{\n\tint                     uc_onstack;\n\t__darwin_sigset_t       uc_sigmask;     /* signal mask used by this context */\n\t_STRUCT_SIGALTSTACK     uc_stack;       /* stack used by this context */\n\t_STRUCT_UCONTEXT        *uc_link;       /* pointer to resuming context */\n\t__darwin_size_t         uc_mcsize;      /* size of the machine context passed in */\n\t_STRUCT_MCONTEXT        *uc_mcontext;   /* pointer to machine specific context */\n#ifdef _XOPEN_SOURCE\n\t_STRUCT_MCONTEXT        __mcontext_data;\n#endif /* _XOPEN_SOURCE */\n};\n\n/* user context */\ntypedef _STRUCT_UCONTEXT        ucontext_t;     /* [???] user context */\n\n#endif /* _STRUCT_UCONTEXT */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_ucontext64.h",
    "content": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n#ifndef _STRUCT_UCONTEXT64\n\n#include <sys/cdefs.h> /* __DARWIN_UNIX03 */\n\n#if __DARWIN_UNIX03\n#define _STRUCT_UCONTEXT64      struct __darwin_ucontext64\n#else /* !__DARWIN_UNIX03 */\n#define _STRUCT_UCONTEXT64      struct ucontext64\n#endif /* __DARWIN_UNIX03 */\n\n#include <machine/types.h> /* __darwin_size_t */\n#include <machine/_mcontext.h> /* _STRUCT_MCONTEXT */\n#include <sys/_types.h> /* __darwin_sigset_t */\n#include <sys/_types/_sigaltstack.h> /* _STRUCT_SIGALTSTACK */\n\n_STRUCT_UCONTEXT64\n{\n\tint                     uc_onstack;\n\t__darwin_sigset_t       uc_sigmask;     /* signal mask used by this context */\n\t_STRUCT_SIGALTSTACK     uc_stack;       /* stack used by this context */\n\t_STRUCT_UCONTEXT64      *uc_link;       /* pointer to resuming context */\n\t__darwin_size_t         uc_mcsize;      /* size of the machine context passed in */\n\t_STRUCT_MCONTEXT64      *uc_mcontext64; /* pointer to machine specific context */\n};\ntypedef _STRUCT_UCONTEXT64      ucontext64_t;   /* [???] user context */\n\n#endif /* _STRUCT_UCONTEXT64 */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_uid_t.h",
    "content": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n#ifndef _UID_T\n#define _UID_T\n#include <sys/_types.h> /* __darwin_uid_t */\ntypedef __darwin_uid_t        uid_t;\n#endif  /* _UID_T */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_uintptr_t.h",
    "content": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n#ifndef _UINTPTR_T\n#define _UINTPTR_T\n\n#ifndef __has_attribute\ntypedef unsigned long           uintptr_t;\n#else\ntypedef unsigned long           uintptr_t;\n#endif /* __has_attribute */\n\n#endif /* _UINTPTR_T */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_useconds_t.h",
    "content": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n#ifndef _USECONDS_T\n#define _USECONDS_T\n#include <sys/_types.h> /* __darwin_useconds_t */\ntypedef __darwin_useconds_t     useconds_t;\n#endif /* _USECONDS_T */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_uuid_t.h",
    "content": "/*\n * Copyright (c) 2003-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n#ifndef _UUID_T\n#define _UUID_T\n#include <sys/_types.h> /* __darwin_uuid_t */\ntypedef __darwin_uuid_t uuid_t;\n#endif /* _UUID_T */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_va_list.h",
    "content": "/*\n * Copyright (c) 2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n\n#ifndef _VA_LIST_T\n#define _VA_LIST_T\n#include <machine/types.h> /* __darwin_va_list */\ntypedef __darwin_va_list va_list;\n#endif /* _VA_LIST_T */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_wchar_t.h",
    "content": "/*\n * Copyright (c) 2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n\n/* wchar_t is a built-in type in C++ */\n#ifndef __cplusplus\n#ifndef _WCHAR_T\n#define _WCHAR_T\n#include <machine/_types.h> /* __darwin_wchar_t */\ntypedef __darwin_wchar_t wchar_t;\n#endif /* _WCHAR_T */\n#endif /* __cplusplus */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types/_wint_t.h",
    "content": "/*\n * Copyright (c) 2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n\n#ifndef _WINT_T\n#define _WINT_T\n#include <machine/_types.h> /* __darwin_wint_t */\ntypedef __darwin_wint_t wint_t;\n#endif /* _WINT_T */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/_types.h",
    "content": "/*\n * Copyright (c) 2003-2007 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n\n#ifndef _SYS__TYPES_H_\n#define _SYS__TYPES_H_\n\n#include <sys/cdefs.h>\n#include <machine/_types.h>\n\n/*\n * Type definitions; takes common type definitions that must be used\n * in multiple header files due to [XSI], removes them from the system\n * space, and puts them in the implementation space.\n */\n\n#ifdef __cplusplus\n#ifdef __GNUG__\n#define __DARWIN_NULL __null\n#else /* ! __GNUG__ */\n#ifdef __LP64__\n#define __DARWIN_NULL (0L)\n#else /* !__LP64__ */\n#define __DARWIN_NULL 0\n#endif /* __LP64__ */\n#endif /* __GNUG__ */\n#else /* ! __cplusplus */\n#define __DARWIN_NULL ((void *)0)\n#endif /* __cplusplus */\n\ntypedef __int64_t       __darwin_blkcnt_t;      /* total blocks */\ntypedef __int32_t       __darwin_blksize_t;     /* preferred block size */\ntypedef __int32_t       __darwin_dev_t;         /* dev_t */\ntypedef unsigned int    __darwin_fsblkcnt_t;    /* Used by statvfs and fstatvfs */\ntypedef unsigned int    __darwin_fsfilcnt_t;    /* Used by statvfs and fstatvfs */\ntypedef __uint32_t      __darwin_gid_t;         /* [???] process and group IDs */\ntypedef __uint32_t      __darwin_id_t;          /* [XSI] pid_t, uid_t, or gid_t*/\ntypedef __uint64_t      __darwin_ino64_t;       /* [???] Used for 64 bit inodes */\n#if __DARWIN_64_BIT_INO_T\ntypedef __darwin_ino64_t __darwin_ino_t;        /* [???] Used for inodes */\n#else /* !__DARWIN_64_BIT_INO_T */\ntypedef __uint32_t      __darwin_ino_t;         /* [???] Used for inodes */\n#endif /* __DARWIN_64_BIT_INO_T */\ntypedef __darwin_natural_t __darwin_mach_port_name_t; /* Used by mach */\ntypedef __darwin_mach_port_name_t __darwin_mach_port_t; /* Used by mach */\ntypedef __uint16_t      __darwin_mode_t;        /* [???] Some file attributes */\ntypedef __int64_t       __darwin_off_t;         /* [???] Used for file sizes */\ntypedef __int32_t       __darwin_pid_t;         /* [???] process and group IDs */\ntypedef __uint32_t      __darwin_sigset_t;      /* [???] signal set */\ntypedef __int32_t       __darwin_suseconds_t;   /* [???] microseconds */\ntypedef __uint32_t      __darwin_uid_t;         /* [???] user IDs */\ntypedef __uint32_t      __darwin_useconds_t;    /* [???] microseconds */\ntypedef unsigned char   __darwin_uuid_t[16];\ntypedef char    __darwin_uuid_string_t[37];\n\n#include <sys/_pthread/_pthread_types.h>\n\n#if defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 5 || __GNUC__ > 3)\n#define __offsetof(type, field) __builtin_offsetof(type, field)\n#else /* !(gcc >= 3.5) */\n#define __offsetof(type, field) ((size_t)(&((type *)0)->field))\n#endif /* (gcc >= 3.5) */\n\n\n#endif  /* _SYS__TYPES_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/acct.h",
    "content": "/*\n * Copyright (c) 2000-2005 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */\n/*-\n * Copyright (c) 1990, 1993, 1994\n *\tThe Regents of the University of California.  All rights reserved.\n * (c) UNIX System Laboratories, Inc.\n * All or some portions of this file are derived from material licensed\n * to the University of California by American Telephone and Telegraph\n * Co. or Unix System Laboratories, Inc. and are reproduced herein with\n * the permission of UNIX System Laboratories, Inc.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *\tThis product includes software developed by the University of\n *\tCalifornia, Berkeley and its contributors.\n * 4. Neither the name of the University nor the names of its contributors\n *    may be used to endorse or promote products derived from this software\n *    without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n *\t@(#)acct.h\t8.4 (Berkeley) 1/9/95\n */\n#ifndef _SYS_ACCT_H_\n#define _SYS_ACCT_H_\n\n#include <sys/appleapiopts.h>\n#include <sys/cdefs.h>\n#include <sys/_types/_u_int8_t.h>  /* u_int8_t */\n#include <sys/_types/_u_int16_t.h> /* u_int16_t */\n#include <sys/_types/_u_int32_t.h> /* u_int32_t */\n#include <sys/_types/_uid_t.h>     /* uid_t */\n#include <sys/_types/_gid_t.h>     /* gid_t */\n#include <sys/_types/_dev_t.h>     /* dev_t */\n\n/*\n * Accounting structures; these use a comp_t type which is a 3 bits base 8\n * exponent, 13 bit fraction ``floating point'' number.  Units are 1/AHZ\n * seconds.\n */\ntypedef u_int16_t comp_t;\n\nstruct acct {\n\tchar      ac_comm[10];  /* command name */\n\tcomp_t    ac_utime;     /* user time */\n\tcomp_t    ac_stime;     /* system time */\n\tcomp_t    ac_etime;     /* elapsed time */\n\tu_int32_t ac_btime;     /* starting time */\n\tuid_t     ac_uid;       /* user id */\n\tgid_t     ac_gid;       /* group id */\n\tu_int16_t ac_mem;       /* average memory usage */\n\tcomp_t    ac_io;        /* count of IO blocks */\n\tdev_t     ac_tty;       /* controlling tty */\n\n#define AFORK   0x01            /* fork'd but not exec'd */\n#define ASU     0x02            /* used super-user permissions */\n#define ACOMPAT 0x04            /* used compatibility mode */\n#define ACORE   0x08            /* dumped core */\n#define AXSIG   0x10            /* killed by a signal */\n\tu_int8_t  ac_flag;      /* accounting flags */\n};\n\n/*\n * 1/AHZ is the granularity of the data encoded in the comp_t fields.\n * This is not necessarily equal to hz.\n */\n#define AHZ     64\n\n\n#endif /* ! _SYS_ACCT_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/acl.h",
    "content": "/*\n * Copyright (c) 2004, 2010 Apple Inc. All rights reserved.\n *\n * @APPLE_LICENSE_HEADER_START@\n * \n * The contents of this file constitute Original Code as defined in and\n * are subject to the Apple Public Source License Version 1.1 (the\n * \"License\").  You may not use this file except in compliance with the\n * License.  Please obtain a copy of the License at\n * http://www.apple.com/publicsource and read it before using this file.\n * \n * This Original Code and all software distributed under the License are\n * distributed on an \"AS IS\" basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the\n * License for the specific language governing rights and limitations\n * under the License.\n * \n * @APPLE_LICENSE_HEADER_END@\n */\n\n#ifndef _SYS_ACL_H\n#define _SYS_ACL_H\n\n#include <Availability.h>\n#include <sys/kauth.h>\n#include <sys/_types/_ssize_t.h>\n\n#define __DARWIN_ACL_READ_DATA\t\t\t(1<<1)\n#define __DARWIN_ACL_LIST_DIRECTORY\t\t__DARWIN_ACL_READ_DATA\n#define __DARWIN_ACL_WRITE_DATA\t\t\t(1<<2)\n#define __DARWIN_ACL_ADD_FILE\t\t\t__DARWIN_ACL_WRITE_DATA\n#define __DARWIN_ACL_EXECUTE\t\t\t(1<<3)\n#define __DARWIN_ACL_SEARCH\t\t\t__DARWIN_ACL_EXECUTE\n#define __DARWIN_ACL_DELETE\t\t\t(1<<4)\n#define __DARWIN_ACL_APPEND_DATA\t\t(1<<5)\n#define __DARWIN_ACL_ADD_SUBDIRECTORY\t\t__DARWIN_ACL_APPEND_DATA\n#define __DARWIN_ACL_DELETE_CHILD\t\t(1<<6)\n#define __DARWIN_ACL_READ_ATTRIBUTES\t\t(1<<7)\n#define __DARWIN_ACL_WRITE_ATTRIBUTES\t\t(1<<8)\n#define __DARWIN_ACL_READ_EXTATTRIBUTES\t\t(1<<9)\n#define __DARWIN_ACL_WRITE_EXTATTRIBUTES\t(1<<10)\n#define __DARWIN_ACL_READ_SECURITY\t\t(1<<11)\n#define __DARWIN_ACL_WRITE_SECURITY\t\t(1<<12)\n#define __DARWIN_ACL_CHANGE_OWNER\t\t(1<<13)\n#define __DARWIN_ACL_SYNCHRONIZE\t\t(1<<20)\n\n#define __DARWIN_ACL_EXTENDED_ALLOW\t\t1\n#define __DARWIN_ACL_EXTENDED_DENY\t\t2\n\n#define __DARWIN_ACL_ENTRY_INHERITED\t\t(1<<4)\n#define __DARWIN_ACL_ENTRY_FILE_INHERIT\t\t(1<<5)\n#define __DARWIN_ACL_ENTRY_DIRECTORY_INHERIT\t(1<<6)\n#define __DARWIN_ACL_ENTRY_LIMIT_INHERIT\t(1<<7)\n#define __DARWIN_ACL_ENTRY_ONLY_INHERIT\t\t(1<<8)\n#define __DARWIN_ACL_FLAG_NO_INHERIT\t\t(1<<17)\n\n/*\n * Implementation constants.\n *\n * The ACL_TYPE_EXTENDED binary format permits 169 entries plus\n * the ACL header in a page.  Give ourselves some room to grow;\n * this limit is arbitrary.\n */\n#define ACL_MAX_ENTRIES\t\t128\n\n/* 23.2.2 Individual object access permissions - nonstandard */\ntypedef enum {\n\tACL_READ_DATA\t\t= __DARWIN_ACL_READ_DATA,\n\tACL_LIST_DIRECTORY\t= __DARWIN_ACL_LIST_DIRECTORY,\n\tACL_WRITE_DATA\t\t= __DARWIN_ACL_WRITE_DATA,\n\tACL_ADD_FILE\t\t= __DARWIN_ACL_ADD_FILE,\n\tACL_EXECUTE\t\t= __DARWIN_ACL_EXECUTE,\n\tACL_SEARCH\t\t= __DARWIN_ACL_SEARCH,\n\tACL_DELETE\t\t= __DARWIN_ACL_DELETE,\n\tACL_APPEND_DATA\t\t= __DARWIN_ACL_APPEND_DATA,\n\tACL_ADD_SUBDIRECTORY\t= __DARWIN_ACL_ADD_SUBDIRECTORY,\n\tACL_DELETE_CHILD\t= __DARWIN_ACL_DELETE_CHILD,\n\tACL_READ_ATTRIBUTES\t= __DARWIN_ACL_READ_ATTRIBUTES,\n\tACL_WRITE_ATTRIBUTES\t= __DARWIN_ACL_WRITE_ATTRIBUTES,\n\tACL_READ_EXTATTRIBUTES\t= __DARWIN_ACL_READ_EXTATTRIBUTES,\n\tACL_WRITE_EXTATTRIBUTES\t= __DARWIN_ACL_WRITE_EXTATTRIBUTES,\n\tACL_READ_SECURITY\t= __DARWIN_ACL_READ_SECURITY,\n\tACL_WRITE_SECURITY\t= __DARWIN_ACL_WRITE_SECURITY,\n\tACL_CHANGE_OWNER\t= __DARWIN_ACL_CHANGE_OWNER,\n\tACL_SYNCHRONIZE\t\t= __DARWIN_ACL_SYNCHRONIZE,\n} acl_perm_t;\n\n/* 23.2.5 ACL entry tag type bits - nonstandard */\ntypedef enum {\n\tACL_UNDEFINED_TAG\t= 0,\n\tACL_EXTENDED_ALLOW\t= __DARWIN_ACL_EXTENDED_ALLOW,\n\tACL_EXTENDED_DENY\t= __DARWIN_ACL_EXTENDED_DENY\n} acl_tag_t;\n\n/* 23.2.6 Individual ACL types */\ntypedef enum {\n\tACL_TYPE_EXTENDED\t= 0x00000100,\n/* Posix 1003.1e types - not supported */\n\tACL_TYPE_ACCESS         = 0x00000000,\n\tACL_TYPE_DEFAULT        = 0x00000001,\n/* The following types are defined on FreeBSD/Linux - not supported */\n\tACL_TYPE_AFS            = 0x00000002,\n\tACL_TYPE_CODA           = 0x00000003,\n\tACL_TYPE_NTFS           = 0x00000004,\n\tACL_TYPE_NWFS           = 0x00000005\n} acl_type_t;\n\n/* 23.2.7 ACL qualifier constants */\n\n#define ACL_UNDEFINED_ID\tNULL\t/* XXX ? */\n\n/* 23.2.8 ACL Entry Constants */\ntypedef enum {\n\tACL_FIRST_ENTRY\t\t= 0,\n\tACL_NEXT_ENTRY\t\t= -1,\n\tACL_LAST_ENTRY\t\t= -2\n} acl_entry_id_t;\n\n/* nonstandard ACL / entry flags */\ntypedef enum {\n\tACL_FLAG_DEFER_INHERIT\t\t= (1 << 0),\t/* tentative */\n\tACL_FLAG_NO_INHERIT\t\t= __DARWIN_ACL_FLAG_NO_INHERIT,\n\tACL_ENTRY_INHERITED\t\t= __DARWIN_ACL_ENTRY_INHERITED,\n\tACL_ENTRY_FILE_INHERIT\t\t= __DARWIN_ACL_ENTRY_FILE_INHERIT,\n\tACL_ENTRY_DIRECTORY_INHERIT\t= __DARWIN_ACL_ENTRY_DIRECTORY_INHERIT,\n\tACL_ENTRY_LIMIT_INHERIT\t\t= __DARWIN_ACL_ENTRY_LIMIT_INHERIT,\n\tACL_ENTRY_ONLY_INHERIT\t\t= __DARWIN_ACL_ENTRY_ONLY_INHERIT\n} acl_flag_t;\n\n/* \"External\" ACL types */\n\nstruct _acl;\nstruct _acl_entry;\nstruct _acl_permset;\nstruct _acl_flagset;\n\ntypedef struct _acl\t\t*acl_t;\ntypedef struct _acl_entry\t*acl_entry_t;\ntypedef struct _acl_permset\t*acl_permset_t;\ntypedef struct _acl_flagset\t*acl_flagset_t;\n\ntypedef u_int64_t\t\tacl_permset_mask_t;\n\n__BEGIN_DECLS\n/* 23.1.6.1 ACL Storage Management */\nextern acl_t\tacl_dup(acl_t acl);\nextern int\tacl_free(void *obj_p);\nextern acl_t\tacl_init(int count);\n\n/* 23.1.6.2 (1) ACL Entry manipulation */\nextern int\tacl_copy_entry(acl_entry_t dest_d, acl_entry_t src_d);\nextern int\tacl_create_entry(acl_t *acl_p, acl_entry_t *entry_p);\nextern int\tacl_create_entry_np(acl_t *acl_p, acl_entry_t *entry_p, int entry_index);\nextern int\tacl_delete_entry(acl_t acl, acl_entry_t entry_d);\nextern int\tacl_get_entry(acl_t acl, int entry_id, acl_entry_t *entry_p);\nextern int\tacl_valid(acl_t acl);\nextern int\tacl_valid_fd_np(int fd, acl_type_t type, acl_t acl);\nextern int\tacl_valid_file_np(const char *path, acl_type_t type, acl_t acl);\nextern int\tacl_valid_link_np(const char *path, acl_type_t type, acl_t acl);\n\n/* 23.1.6.2 (2) Manipulate permissions within an ACL entry */\nextern int\tacl_add_perm(acl_permset_t permset_d, acl_perm_t perm);\nextern int\tacl_calc_mask(acl_t *acl_p);\t/* not supported */\nextern int\tacl_clear_perms(acl_permset_t permset_d);\nextern int\tacl_delete_perm(acl_permset_t permset_d, acl_perm_t perm);\nextern int\tacl_get_perm_np(acl_permset_t permset_d, acl_perm_t perm);\nextern int \tacl_get_permset(acl_entry_t entry_d, acl_permset_t *permset_p);\nextern int\tacl_set_permset(acl_entry_t entry_d, acl_permset_t permset_d);\n\n/* nonstandard - manipulate permissions within an ACL entry using bitmasks */\nextern int\tacl_maximal_permset_mask_np(acl_permset_mask_t * mask_p) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3);\nextern int\tacl_get_permset_mask_np(acl_entry_t entry_d, acl_permset_mask_t * mask_p) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3);\nextern int\tacl_set_permset_mask_np(acl_entry_t entry_d, acl_permset_mask_t mask) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3);\n\n/* nonstandard - manipulate flags on ACLs and entries */\nextern int\tacl_add_flag_np(acl_flagset_t flagset_d, acl_flag_t flag);\nextern int\tacl_clear_flags_np(acl_flagset_t flagset_d);\nextern int\tacl_delete_flag_np(acl_flagset_t flagset_d, acl_flag_t flag);\nextern int\tacl_get_flag_np(acl_flagset_t flagset_d, acl_flag_t flag);\nextern int\tacl_get_flagset_np(void *obj_p, acl_flagset_t *flagset_p);\nextern int\tacl_set_flagset_np(void *obj_p, acl_flagset_t flagset_d);\n\n/* 23.1.6.2 (3) Manipulate ACL entry tag type and qualifier */\nextern void\t*acl_get_qualifier(acl_entry_t entry_d);\nextern int\tacl_get_tag_type(acl_entry_t entry_d, acl_tag_t *tag_type_p);\nextern int\tacl_set_qualifier(acl_entry_t entry_d, const void *tag_qualifier_p);\nextern int\tacl_set_tag_type(acl_entry_t entry_d, acl_tag_t tag_type);\n\n/* 23.1.6.3 ACL manipulation on an Object */\nextern int\tacl_delete_def_file(const char *path_p); /* not supported */\nextern acl_t \tacl_get_fd(int fd);\nextern acl_t\tacl_get_fd_np(int fd, acl_type_t type);\nextern acl_t\tacl_get_file(const char *path_p, acl_type_t type);\nextern acl_t\tacl_get_link_np(const char *path_p, acl_type_t type);\nextern int\tacl_set_fd(int fd, acl_t acl);\nextern int\tacl_set_fd_np(int fd, acl_t acl, acl_type_t acl_type);\nextern int\tacl_set_file(const char *path_p, acl_type_t type, acl_t acl);\nextern int\tacl_set_link_np(const char *path_p, acl_type_t type, acl_t acl);\n\n/* 23.1.6.4 ACL Format translation */\nextern ssize_t\tacl_copy_ext(void *buf_p, acl_t acl, ssize_t size);\nextern ssize_t\tacl_copy_ext_native(void *buf_p, acl_t acl, ssize_t size);\nextern acl_t\tacl_copy_int(const void *buf_p);\nextern acl_t\tacl_copy_int_native(const void *buf_p);\nextern acl_t\tacl_from_text(const char *buf_p);\nextern ssize_t\tacl_size(acl_t acl);\nextern char\t*acl_to_text(acl_t acl, ssize_t *len_p);\n__END_DECLS\n\n#endif /* _SYS_ACL_H */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/aio.h",
    "content": "/*\n * Copyright (c) 2003-2006 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/*\n *\tFile:\tsys/aio.h\n *\tAuthor:\tUmesh Vaishampayan [umeshv@apple.com]\n *\t\t\t05-Feb-2003\tumeshv\tCreated.\n *\n *\tHeader file for POSIX Asynchronous IO APIs\n *\n */\n\n#ifndef _SYS_AIO_H_\n#define _SYS_AIO_H_\n\n#include <sys/signal.h>\n#include <sys/_types.h>\n#include <sys/cdefs.h>\n\n/*\n * [XSI] Inclusion of the <aio.h> header may make visible symbols defined\n * in the headers <fcntl.h>, <signal.h>, <sys/types.h>, and <time.h>.\n *\n * In our case, this is limited to struct timespec, off_t and ssize_t.\n */\n#include <sys/_types/_timespec.h>\n\n#include <sys/_types/_off_t.h>\n#include <sys/_types/_ssize_t.h>\n\n/*\n * A aio_fsync() options that the calling thread is to continue execution\n * while the lio_listio() operation is being performed, and no notification\n * is given when the operation is complete\n *\n * [XSI] from <fcntl.h>\n */\n#include <sys/_types/_o_sync.h>\n#include <sys/_types/_o_dsync.h>\n\nstruct aiocb {\n\tint             aio_fildes;             /* File descriptor */\n\toff_t           aio_offset;             /* File offset */\n\tvolatile void   *aio_buf;               /* Location of buffer */\n\tsize_t          aio_nbytes;             /* Length of transfer */\n\tint             aio_reqprio;            /* Request priority offset */\n\tstruct sigevent aio_sigevent;           /* Signal number and value */\n\tint             aio_lio_opcode;         /* Operation to be performed */\n};\n\n\n/*\n * aio_cancel() return values\n */\n\n/*\n * none of the requested operations could be canceled since they are\n * already complete.\n */\n#define AIO_ALLDONE                     0x1\n\n/* all requested operations have been canceled */\n#define AIO_CANCELED            0x2\n\n/*\n * some of the requested operations could not be canceled since\n * they are in progress\n */\n#define AIO_NOTCANCELED         0x4\n\n\n/*\n * lio_listio operation options\n */\n\n#define LIO_NOP                 0x0     /* option indicating that no transfer is requested */\n#define LIO_READ                0x1             /* option requesting a read */\n#define LIO_WRITE               0x2             /* option requesting a write */\n\n/*\n * lio_listio() modes\n */\n\n/*\n * A lio_listio() synchronization operation indicating\n * that the calling thread is to continue execution while\n * the lio_listio() operation is being performed, and no\n * notification is given when the operation is complete\n */\n#define LIO_NOWAIT              0x1\n\n/*\n * A lio_listio() synchronization operation indicating\n * that the calling thread is to suspend until the\n * lio_listio() operation is complete.\n */\n#define LIO_WAIT                0x2\n\n/*\n * Maximum number of operations in single lio_listio call\n */\n#define AIO_LISTIO_MAX          16\n\n\n/*\n * Prototypes\n */\n\n__BEGIN_DECLS\n\n/*\n * Attempt to cancel one or more asynchronous I/O requests currently outstanding\n * against file descriptor fd. The aiocbp argument points to the asynchronous I/O\n * control block for a particular request to be canceled.  If aiocbp is NULL, then\n * all outstanding cancelable asynchronous I/O requests against fd shall be canceled.\n */\nint             aio_cancel( int fd,\n    struct aiocb * aiocbp );\n\n/*\n * Return the error status associated with the aiocb structure referenced by the\n * aiocbp argument. The error status for an asynchronous I/O operation is the errno\n * value that would be set by the corresponding read(), write(),  or fsync()\n * operation.  If the operation has not yet completed, then the error status shall\n * be equal to [EINPROGRESS].\n */\nint             aio_error( const struct aiocb * aiocbp );\n\n/*\n * Asynchronously force all I/O operations associated with the file indicated by\n * the file descriptor aio_fildes member of the aiocb structure referenced by the\n * aiocbp argument and queued at the time of the call to aio_fsync() to the\n * synchronized I/O completion state.  The function call shall return when the\n * synchronization request has been initiated or queued.  op O_SYNC is the only\n * supported opertation at this time.\n * The aiocbp argument refers to an asynchronous I/O control block. The aiocbp\n * value may be used as an argument to aio_error() and aio_return() in order to\n * determine the error status and return status, respectively, of the asynchronous\n * operation while it is proceeding.  When the request is queued, the error status\n * for the operation is [EINPROGRESS]. When all data has been successfully\n * transferred, the error status shall be reset to reflect the success or failure\n * of the operation.\n */\nint             aio_fsync( int op,\n    struct aiocb * aiocbp );\n\n/*\n * Read aiocbp->aio_nbytes from the file associated with aiocbp->aio_fildes into\n * the buffer pointed to by aiocbp->aio_buf.  The function call shall return when\n * the read request has been initiated or queued.\n * The aiocbp value may be used as an argument to aio_error() and aio_return() in\n * order to determine the error status and return status, respectively, of the\n * asynchronous operation while it is proceeding. If an error condition is\n * encountered during queuing, the function call shall return without having\n * initiated or queued the request. The requested operation takes place at the\n * absolute position in the file as given by aio_offset, as if lseek() were called\n * immediately prior to the operation with an offset equal to aio_offset and a\n * whence equal to SEEK_SET.  After a successful call to enqueue an asynchronous\n * I/O operation, the value of the file offset for the file is unspecified.\n */\nint             aio_read( struct aiocb * aiocbp );\n\n/*\n * Return the return status associated with the aiocb structure referenced by\n * the aiocbp argument.  The return status for an asynchronous I/O operation is\n * the value that would be returned by the corresponding read(), write(), or\n * fsync() function call.  If the error status for the operation is equal to\n * [EINPROGRESS], then the return status for the operation is undefined.  The\n * aio_return() function may be called exactly once to retrieve the return status\n * of a given asynchronous operation; thereafter, if the same aiocb structure\n * is used in a call to aio_return() or aio_error(), an error may be returned.\n * When the aiocb structure referred to by aiocbp is used to submit another\n * asynchronous operation, then aio_return() may be successfully used to\n * retrieve the return status of that operation.\n */\nssize_t aio_return( struct aiocb * aiocbp );\n\n/*\n * Suspend the calling thread until at least one of the asynchronous I/O\n * operations referenced by the aiocblist argument has completed, until a signal\n * interrupts the function, or, if timeout is not NULL, until the time\n * interval specified by timeout has passed.  If any of the aiocb structures\n * in the aiocblist correspond to completed asynchronous I/O operations (that is,\n * the error status for the operation is not equal to [EINPROGRESS]) at the\n * time of the call, the function shall return without suspending the calling\n * thread.  The aiocblist argument is an array of pointers to asynchronous I/O\n * control blocks.  The nent argument indicates the number of elements in the\n * array.  Each aiocb structure pointed to has been used in initiating an\n * asynchronous I/O request via aio_read(), aio_write(), or lio_listio(). This\n * array may contain NULL pointers, which are ignored.\n */\nint             aio_suspend( const struct aiocb *const aiocblist[],\n    int nent,\n    const struct timespec * timeoutp ) __DARWIN_ALIAS_C(aio_suspend);\n\n/*\n * Write aiocbp->aio_nbytes to the file associated with aiocbp->aio_fildes from\n * the buffer pointed to by aiocbp->aio_buf.  The function shall return when the\n * write request has been initiated or, at a minimum, queued.\n * The aiocbp argument may be used as an argument to aio_error() and aio_return()\n * in order to determine the error status and return status, respectively, of the\n * asynchronous operation while it is proceeding.\n */\nint             aio_write( struct aiocb * aiocbp );\n\n/*\n * Initiate a list of I/O requests with a single function call.  The mode\n * argument takes one of the values LIO_WAIT or LIO_NOWAIT and determines whether\n * the function returns when the I/O operations have been completed, or as soon\n * as the operations have been queued.  If the mode argument is LIO_WAIT, the\n * function shall wait until all I/O is complete and the sig argument shall be\n * ignored.\n * If the mode argument is LIO_NOWAIT, the function shall return immediately, and\n * asynchronous notification shall occur, according to the sig argument, when all\n * the I/O operations complete.  If sig is NULL, then no asynchronous notification\n * shall occur.\n */\nint             lio_listio( int mode,\n    struct aiocb *const aiocblist[],\n    int nent,\n    struct sigevent *sigp );\n__END_DECLS\n\n#endif /* _SYS_AIO_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/appleapiopts.h",
    "content": "/*\n * Copyright (c) 2002 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n\n#ifndef __SYS_APPLEAPIOPTS_H__\n#define __SYS_APPLEAPIOPTS_H__\n\n\n#ifndef __APPLE_API_STANDARD\n#define __APPLE_API_STANDARD\n#endif /* __APPLE_API_STANDARD */\n\n#ifndef __APPLE_API_STABLE\n#define __APPLE_API_STABLE\n#endif /* __APPLE_API_STABLE */\n\n#ifndef __APPLE_API_STRICT_CONFORMANCE\n\n#ifndef __APPLE_API_EVOLVING\n#define __APPLE_API_EVOLVING\n#endif /* __APPLE_API_EVOLVING */\n\n#ifndef __APPLE_API_UNSTABLE\n#define __APPLE_API_UNSTABLE\n#endif /* __APPLE_API_UNSTABLE */\n\n#ifndef __APPLE_API_PRIVATE\n#define __APPLE_API_PRIVATE\n#endif /* __APPLE_API_PRIVATE */\n\n#ifndef __APPLE_API_OBSOLETE\n#define __APPLE_API_OBSOLETE\n#endif /* __APPLE_API_OBSOLETE */\n\n#endif /* __APPLE_API_STRICT_CONFORMANCE */\n\n#endif /* __SYS_APPLEAPIOPTS_H__ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/attr.h",
    "content": "/*\n * Copyright (c) 2000-2018 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n\n/*\n * attr.h - attribute data structures and interfaces\n *\n * Copyright (c) 1998, Apple Computer, Inc.  All Rights Reserved.\n */\n\n#ifndef _SYS_ATTR_H_\n#define _SYS_ATTR_H_\n\n#include <sys/appleapiopts.h>\n\n#ifdef __APPLE_API_UNSTABLE\n#include <sys/types.h>\n#include <sys/ucred.h>\n#include <sys/time.h>\n#include <sys/cdefs.h>\n\n#define FSOPT_NOFOLLOW          0x00000001\n#define FSOPT_NOINMEMUPDATE     0x00000002\n#define FSOPT_REPORT_FULLSIZE   0x00000004\n/* The following option only valid when requesting ATTR_CMN_RETURNED_ATTRS */\n#define FSOPT_PACK_INVAL_ATTRS  0x00000008\n\n\n#define FSOPT_ATTR_CMN_EXTENDED 0x00000020\n#define FSOPT_RETURN_REALDEV     0x00000200\n\n/* we currently aren't anywhere near this amount for a valid\n * fssearchblock.sizeofsearchparams1 or fssearchblock.sizeofsearchparams2\n * but we put a sanity check in to avoid abuse of the value passed in from\n * user land.\n */\n#define SEARCHFS_MAX_SEARCHPARMS  4096\n\ntypedef u_int32_t text_encoding_t;\n\ntypedef u_int32_t fsobj_type_t;\n\ntypedef u_int32_t fsobj_tag_t;\n\ntypedef u_int32_t fsfile_type_t;\n\ntypedef u_int32_t fsvolid_t;\n\n#include <sys/_types/_fsobj_id_t.h> /* file object id type */\n\ntypedef u_int32_t attrgroup_t;\n\nstruct attrlist {\n\tu_short bitmapcount;                    /* number of attr. bit sets in list (should be 5) */\n\tu_int16_t reserved;                     /* (to maintain 4-byte alignment) */\n\tattrgroup_t commonattr;                 /* common attribute group */\n\tattrgroup_t volattr;                    /* Volume attribute group */\n\tattrgroup_t dirattr;                    /* directory attribute group */\n\tattrgroup_t fileattr;                   /* file attribute group */\n\tattrgroup_t forkattr;                   /* fork attribute group */\n};\n\n#define ATTR_BIT_MAP_COUNT 5\n\ntypedef struct attribute_set {\n\tattrgroup_t commonattr;                 /* common attribute group */\n\tattrgroup_t volattr;                    /* Volume attribute group */\n\tattrgroup_t dirattr;                    /* directory attribute group */\n\tattrgroup_t fileattr;                   /* file attribute group */\n\tattrgroup_t forkattr;                   /* fork attribute group */\n} attribute_set_t;\n\n#define ATTRIBUTE_SET_INIT(a)               do {(a)->commonattr = (a)->volattr = (a)->dirattr = (a)->fileattr = (a)->forkattr = 0; } while(0)\n\n\ntypedef struct attrreference {\n\tint32_t     attr_dataoffset;\n\tu_int32_t   attr_length;\n} attrreference_t;\n\n/* XXX PPD This is derived from HFSVolumePriv.h and should perhaps be referenced from there? */\n\nstruct diskextent {\n\tu_int32_t                                       startblock;                             /* first block allocated */\n\tu_int32_t                                       blockcount;                             /* number of blocks allocated */\n};\n\ntypedef struct diskextent extentrecord[8];\n\ntypedef u_int32_t vol_capabilities_set_t[4];\n\n#define VOL_CAPABILITIES_FORMAT 0\n#define VOL_CAPABILITIES_INTERFACES 1\n#define VOL_CAPABILITIES_RESERVED1 2\n#define VOL_CAPABILITIES_RESERVED2 3\n\ntypedef struct vol_capabilities_attr {\n\tvol_capabilities_set_t capabilities;\n\tvol_capabilities_set_t valid;\n} vol_capabilities_attr_t;\n\n/*\n * XXX this value needs to be raised - 3893388\n */\n#define ATTR_MAX_BUFFER         8192\n\n/*\n * VOL_CAP_FMT_PERSISTENTOBJECTIDS: When set, the volume has object IDs\n * that are persistent (retain their values even when the volume is\n * unmounted and remounted), and a file or directory can be looked up\n * by ID.  Volumes that support VolFS and can support Carbon File ID\n * references should set this bit.\n *\n * VOL_CAP_FMT_SYMBOLICLINKS: When set, the volume supports symbolic\n * links.  The symlink(), readlink(), and lstat() calls all use this\n * symbolic link.\n *\n * VOL_CAP_FMT_HARDLINKS: When set, the volume supports hard links.\n * The link() call creates hard links.\n *\n * VOL_CAP_FMT_JOURNAL: When set, the volume is capable of supporting\n * a journal used to speed recovery in case of unplanned shutdown\n * (such as a power outage or crash).  This bit does not necessarily\n * mean the volume is actively using a journal for recovery.\n *\n * VOL_CAP_FMT_JOURNAL_ACTIVE: When set, the volume is currently using\n * a journal for use in speeding recovery after an unplanned shutdown.\n * This bit can be set only if VOL_CAP_FMT_JOURNAL is also set.\n *\n * VOL_CAP_FMT_NO_ROOT_TIMES: When set, the volume format does not\n * store reliable times for the root directory, so you should not\n * depend on them to detect changes, etc.\n *\n * VOL_CAP_FMT_SPARSE_FILES: When set, the volume supports sparse files.\n * That is, files which can have \"holes\" that have never been written\n * to, and are not allocated on disk.  Sparse files may have an\n * allocated size that is less than the file's logical length.\n *\n * VOL_CAP_FMT_ZERO_RUNS: For security reasons, parts of a file (runs)\n * that have never been written to must appear to contain zeroes.  When\n * this bit is set, the volume keeps track of allocated but unwritten\n * runs of a file so that it can substitute zeroes without actually\n * writing zeroes to the media.  This provides performance similar to\n * sparse files, but not the space savings.\n *\n * VOL_CAP_FMT_CASE_SENSITIVE: When set, file and directory names are\n * case sensitive (upper and lower case are different).  When clear,\n * an upper case character is equivalent to a lower case character,\n * and you can't have two names that differ solely in the case of\n * the characters.\n *\n * VOL_CAP_FMT_CASE_PRESERVING: When set, file and directory names\n * preserve the difference between upper and lower case.  If clear,\n * the volume may change the case of some characters (typically\n * making them all upper or all lower case).  A volume that sets\n * VOL_CAP_FMT_CASE_SENSITIVE should also set VOL_CAP_FMT_CASE_PRESERVING.\n *\n * VOL_CAP_FMT_FAST_STATFS: This bit is used as a hint to upper layers\n * (especially Carbon) that statfs() is fast enough that its results\n * need not be cached by those upper layers.  A volume that caches\n * the statfs information in its in-memory structures should set this bit.\n * A volume that must always read from disk or always perform a network\n * transaction should not set this bit.\n *\n * VOL_CAP_FMT_2TB_FILESIZE: If this bit is set the volume format supports\n * file sizes larger than 4GB, and potentially up to 2TB; it does not\n * indicate whether the filesystem supports files larger than that.\n *\n * VOL_CAP_FMT_OPENDENYMODES: When set, the volume supports open deny\n * modes (e.g. \"open for read write, deny write\"; effectively, mandatory\n * file locking based on open modes).\n *\n * VOL_CAP_FMT_HIDDEN_FILES: When set, the volume supports the UF_HIDDEN\n * file flag, and the UF_HIDDEN flag is mapped to that volume's native\n * \"hidden\" or \"invisible\" bit (which may be the invisible bit from the\n * Finder Info extended attribute).\n *\n * VOL_CAP_FMT_PATH_FROM_ID:  When set, the volume supports the ability\n * to derive a pathname to the root of the file system given only the\n * id of an object.  This also implies that object ids on this file\n * system are persistent and not recycled.  This is a very specialized\n * capability and it is assumed that most file systems will not support\n * it.  Its use is for legacy non-posix APIs like ResolveFileIDRef.\n *\n * VOL_CAP_FMT_NO_VOLUME_SIZES: When set, the volume does not support\n * returning values for total data blocks, available blocks, or free blocks\n * (as in f_blocks, f_bavail, or f_bfree in \"struct statfs\").  Historically,\n * those values were set to 0xFFFFFFFF for volumes that did not support them.\n *\n * VOL_CAP_FMT_DECMPFS_COMPRESSION: When set, the volume supports transparent\n * decompression of compressed files using decmpfs.\n *\n * VOL_CAP_FMT_64BIT_OBJECT_IDS: When set, the volume uses object IDs that\n * are 64-bit. This means that ATTR_CMN_FILEID and ATTR_CMN_PARENTID are the\n * only legitimate attributes for obtaining object IDs from this volume and the\n * 32-bit fid_objno fields of the fsobj_id_t returned by ATTR_CMN_OBJID,\n * ATTR_CMN_OBJPERMID, and ATTR_CMN_PAROBJID are undefined.\n *\n * VOL_CAP_FMT_DIR_HARDLINKS: When set, the volume supports directory\n * hard links.\n *\n * VOL_CAP_FMT_DOCUMENT_ID: When set, the volume supports document IDs\n * (an ID which persists across object ID changes) for document revisions.\n *\n * VOL_CAP_FMT_WRITE_GENERATION_COUNT: When set, the volume supports write\n * generation counts (a count of how many times an object has been modified)\n *\n * VOL_CAP_FMT_NO_IMMUTABLE_FILES: When set, the volume does not support\n * setting the UF_IMMUTABLE flag.\n *\n * VOL_CAP_FMT_NO_PERMISSIONS: When set, the volume does not support setting\n * permissions.\n *\n * VOL_CAP_FMT_SHARED_SPACE: When set, the volume supports sharing space with\n * other filesystems i.e. multiple logical filesystems can exist in the same\n * \"partition\". An implication of this is that the filesystem which sets\n * this capability treats waitfor arguments to VFS_SYNC as bit flags.\n *\n * VOL_CAP_FMT_VOL_GROUPS: When set, this volume is part of a volume-group\n * that implies multiple volumes must be mounted in order to boot and root the\n * operating system. Typically, this means a read-only system volume and a\n * writable data volume.\n *\n * VOL_CAP_FMT_SEALED: When set, this volume is cryptographically sealed.\n * Any modifications to volume data or metadata will be detected and may\n * render the volume unusable.\n */\n#define VOL_CAP_FMT_PERSISTENTOBJECTIDS         0x00000001\n#define VOL_CAP_FMT_SYMBOLICLINKS               0x00000002\n#define VOL_CAP_FMT_HARDLINKS                   0x00000004\n#define VOL_CAP_FMT_JOURNAL                     0x00000008\n#define VOL_CAP_FMT_JOURNAL_ACTIVE              0x00000010\n#define VOL_CAP_FMT_NO_ROOT_TIMES               0x00000020\n#define VOL_CAP_FMT_SPARSE_FILES                0x00000040\n#define VOL_CAP_FMT_ZERO_RUNS                   0x00000080\n#define VOL_CAP_FMT_CASE_SENSITIVE              0x00000100\n#define VOL_CAP_FMT_CASE_PRESERVING             0x00000200\n#define VOL_CAP_FMT_FAST_STATFS                 0x00000400\n#define VOL_CAP_FMT_2TB_FILESIZE                0x00000800\n#define VOL_CAP_FMT_OPENDENYMODES               0x00001000\n#define VOL_CAP_FMT_HIDDEN_FILES                0x00002000\n#define VOL_CAP_FMT_PATH_FROM_ID                0x00004000\n#define VOL_CAP_FMT_NO_VOLUME_SIZES             0x00008000\n#define VOL_CAP_FMT_DECMPFS_COMPRESSION         0x00010000\n#define VOL_CAP_FMT_64BIT_OBJECT_IDS            0x00020000\n#define VOL_CAP_FMT_DIR_HARDLINKS               0x00040000\n#define VOL_CAP_FMT_DOCUMENT_ID                 0x00080000\n#define VOL_CAP_FMT_WRITE_GENERATION_COUNT      0x00100000\n#define VOL_CAP_FMT_NO_IMMUTABLE_FILES          0x00200000\n#define VOL_CAP_FMT_NO_PERMISSIONS              0x00400000\n#define VOL_CAP_FMT_SHARED_SPACE                0x00800000\n#define VOL_CAP_FMT_VOL_GROUPS                  0x01000000\n#define VOL_CAP_FMT_SEALED                      0x02000000\n\n/*\n * VOL_CAP_INT_SEARCHFS: When set, the volume implements the\n * searchfs() system call (the vnop_searchfs vnode operation).\n *\n * VOL_CAP_INT_ATTRLIST: When set, the volume implements the\n * getattrlist() and setattrlist() system calls (vnop_getattrlist\n * and vnop_setattrlist vnode operations) for the volume, files,\n * and directories.  The volume may or may not implement the\n * readdirattr() system call.  XXX Is there any minimum set\n * of attributes that should be supported?  To determine the\n * set of supported attributes, get the ATTR_VOL_ATTRIBUTES\n * attribute of the volume.\n *\n * VOL_CAP_INT_NFSEXPORT: When set, the volume implements exporting\n * of NFS volumes.\n *\n * VOL_CAP_INT_READDIRATTR: When set, the volume implements the\n * readdirattr() system call (vnop_readdirattr vnode operation).\n *\n * VOL_CAP_INT_EXCHANGEDATA: When set, the volume implements the\n * exchangedata() system call (VNOP_EXCHANGE vnode operation).\n *\n * VOL_CAP_INT_COPYFILE: When set, the volume implements the\n * VOP_COPYFILE vnode operation.  (XXX There should be a copyfile()\n * system call in <unistd.h>.)\n *\n * VOL_CAP_INT_ALLOCATE: When set, the volume implements the\n * VNOP_ALLOCATE vnode operation, which means it implements the\n * F_PREALLOCATE selector of fcntl(2).\n *\n * VOL_CAP_INT_VOL_RENAME: When set, the volume implements the\n * ATTR_VOL_NAME attribute for both getattrlist() and setattrlist().\n * The volume can be renamed by setting ATTR_VOL_NAME with setattrlist().\n *\n * VOL_CAP_INT_ADVLOCK: When set, the volume implements POSIX style\n * byte range locks via vnop_advlock (accessible from fcntl(2)).\n *\n * VOL_CAP_INT_FLOCK: When set, the volume implements whole-file flock(2)\n * style locks via vnop_advlock.  This includes the O_EXLOCK and O_SHLOCK\n * flags of the open(2) call.\n *\n * VOL_CAP_INT_EXTENDED_SECURITY: When set, the volume implements\n * extended security (ACLs).\n *\n * VOL_CAP_INT_USERACCESS:  When set, the volume supports the\n * ATTR_CMN_USERACCESS attribute (used to get the user's access\n * mode to the file).\n *\n * VOL_CAP_INT_MANLOCK: When set, the volume supports AFP-style\n * mandatory byte range locks via an ioctl().\n *\n * VOL_CAP_INT_EXTENDED_ATTR: When set, the volume implements\n * native extended attribues.\n *\n * VOL_CAP_INT_NAMEDSTREAMS: When set, the volume supports\n * native named streams.\n *\n * VOL_CAP_INT_CLONE: When set, the volume supports clones.\n *\n * VOL_CAP_INT_SNAPSHOT: When set, the volume supports snapshots.\n *\n * VOL_CAP_INT_RENAME_SWAP: When set, the volume supports swapping\n * file system objects.\n *\n * VOL_CAP_INT_RENAME_EXCL: When set, the volume supports an\n * exclusive rename operation.\n *\n * VOL_CAP_INT_RENAME_OPENFAIL: When set, the volume may fail rename\n * operations on files that are open.\n */\n#define VOL_CAP_INT_SEARCHFS                    0x00000001\n#define VOL_CAP_INT_ATTRLIST                    0x00000002\n#define VOL_CAP_INT_NFSEXPORT                   0x00000004\n#define VOL_CAP_INT_READDIRATTR                 0x00000008\n#define VOL_CAP_INT_EXCHANGEDATA                0x00000010\n#define VOL_CAP_INT_COPYFILE                    0x00000020\n#define VOL_CAP_INT_ALLOCATE                    0x00000040\n#define VOL_CAP_INT_VOL_RENAME                  0x00000080\n#define VOL_CAP_INT_ADVLOCK                     0x00000100\n#define VOL_CAP_INT_FLOCK                       0x00000200\n#define VOL_CAP_INT_EXTENDED_SECURITY           0x00000400\n#define VOL_CAP_INT_USERACCESS                  0x00000800\n#define VOL_CAP_INT_MANLOCK                     0x00001000\n#define VOL_CAP_INT_NAMEDSTREAMS                0x00002000\n#define VOL_CAP_INT_EXTENDED_ATTR               0x00004000\n#define VOL_CAP_INT_CLONE                       0x00010000\n#define VOL_CAP_INT_SNAPSHOT                    0x00020000\n#define VOL_CAP_INT_RENAME_SWAP                 0x00040000\n#define VOL_CAP_INT_RENAME_EXCL                 0x00080000\n#define VOL_CAP_INT_RENAME_OPENFAIL             0x00100000\n\ntypedef struct vol_attributes_attr {\n\tattribute_set_t validattr;\n\tattribute_set_t nativeattr;\n} vol_attributes_attr_t;\n\n#define ATTR_CMN_NAME                           0x00000001\n#define ATTR_CMN_DEVID                          0x00000002\n#define ATTR_CMN_FSID                           0x00000004\n#define ATTR_CMN_OBJTYPE                        0x00000008\n#define ATTR_CMN_OBJTAG                         0x00000010\n#define ATTR_CMN_OBJID                          0x00000020\n#define ATTR_CMN_OBJPERMANENTID                 0x00000040\n#define ATTR_CMN_PAROBJID                       0x00000080\n#define ATTR_CMN_SCRIPT                         0x00000100\n#define ATTR_CMN_CRTIME                         0x00000200\n#define ATTR_CMN_MODTIME                        0x00000400\n#define ATTR_CMN_CHGTIME                        0x00000800\n#define ATTR_CMN_ACCTIME                        0x00001000\n#define ATTR_CMN_BKUPTIME                       0x00002000\n#define ATTR_CMN_FNDRINFO                       0x00004000\n#define ATTR_CMN_OWNERID                        0x00008000\n#define ATTR_CMN_GRPID                          0x00010000\n#define ATTR_CMN_ACCESSMASK                     0x00020000\n#define ATTR_CMN_FLAGS                          0x00040000\n\n/* The following were defined as:\t\t\t\t*/\n/*      #define ATTR_CMN_NAMEDATTRCOUNT\t\t0x00080000\t*/\n/*      #define ATTR_CMN_NAMEDATTRLIST\t\t0x00100000\t*/\n/* These bits have been salvaged for use as:\t\t\t*/\n/*\t#define ATTR_CMN_GEN_COUNT\t\t0x00080000\t*/\n/*\t#define ATTR_CMN_DOCUMENT_ID\t\t0x00100000\t*/\n/* They can only be used with the  FSOPT_ATTR_CMN_EXTENDED\t*/\n/* option flag.                                                 */\n\n#define ATTR_CMN_GEN_COUNT                      0x00080000\n#define ATTR_CMN_DOCUMENT_ID                    0x00100000\n\n#define ATTR_CMN_USERACCESS                     0x00200000\n#define ATTR_CMN_EXTENDED_SECURITY              0x00400000\n#define ATTR_CMN_UUID                           0x00800000\n#define ATTR_CMN_GRPUUID                        0x01000000\n#define ATTR_CMN_FILEID                         0x02000000\n#define ATTR_CMN_PARENTID                       0x04000000\n#define ATTR_CMN_FULLPATH                       0x08000000\n#define ATTR_CMN_ADDEDTIME                      0x10000000\n#define ATTR_CMN_ERROR                          0x20000000\n#define ATTR_CMN_DATA_PROTECT_FLAGS             0x40000000\n\n/*\n * ATTR_CMN_RETURNED_ATTRS is only valid with getattrlist(2) and\n * getattrlistbulk(2). It is always the first attribute in the return buffer.\n */\n#define ATTR_CMN_RETURNED_ATTRS                 0x80000000\n\n#define ATTR_CMN_VALIDMASK                      0xFFFFFFFF\n/*\n * The settable ATTR_CMN_* attributes include the following:\n * ATTR_CMN_SCRIPT\n * ATTR_CMN_CRTIME\n * ATTR_CMN_MODTIME\n * ATTR_CMN_CHGTIME\n *\n * ATTR_CMN_ACCTIME\n * ATTR_CMN_BKUPTIME\n * ATTR_CMN_FNDRINFO\n * ATTR_CMN_OWNERID\n *\n * ATTR_CMN_GRPID\n * ATTR_CMN_ACCESSMASK\n * ATTR_CMN_FLAGS\n *\n * ATTR_CMN_EXTENDED_SECURITY\n * ATTR_CMN_UUID\n *\n * ATTR_CMN_GRPUUID\n *\n * ATTR_CMN_DATA_PROTECT_FLAGS\n */\n#define ATTR_CMN_SETMASK                        0x51C7FF00\n#define ATTR_CMN_VOLSETMASK                     0x00006700\n\n#define ATTR_VOL_FSTYPE                         0x00000001\n#define ATTR_VOL_SIGNATURE                      0x00000002\n#define ATTR_VOL_SIZE                           0x00000004\n#define ATTR_VOL_SPACEFREE                      0x00000008\n#define ATTR_VOL_SPACEAVAIL                     0x00000010\n#define ATTR_VOL_MINALLOCATION                  0x00000020\n#define ATTR_VOL_ALLOCATIONCLUMP                0x00000040\n#define ATTR_VOL_IOBLOCKSIZE                    0x00000080\n#define ATTR_VOL_OBJCOUNT                       0x00000100\n#define ATTR_VOL_FILECOUNT                      0x00000200\n#define ATTR_VOL_DIRCOUNT                       0x00000400\n#define ATTR_VOL_MAXOBJCOUNT                    0x00000800\n#define ATTR_VOL_MOUNTPOINT                     0x00001000\n#define ATTR_VOL_NAME                           0x00002000\n#define ATTR_VOL_MOUNTFLAGS                     0x00004000\n#define ATTR_VOL_MOUNTEDDEVICE                  0x00008000\n#define ATTR_VOL_ENCODINGSUSED                  0x00010000\n#define ATTR_VOL_CAPABILITIES                   0x00020000\n#define ATTR_VOL_UUID                           0x00040000\n#define ATTR_VOL_SPACEUSED                      0x00800000\n#define ATTR_VOL_QUOTA_SIZE                     0x10000000\n#define ATTR_VOL_RESERVED_SIZE          0x20000000\n#define ATTR_VOL_ATTRIBUTES                     0x40000000\n#define ATTR_VOL_INFO                           0x80000000\n\n#define ATTR_VOL_VALIDMASK                      0xF087FFFF\n\n/*\n * The list of settable ATTR_VOL_* attributes include the following:\n * ATTR_VOL_NAME\n * ATTR_VOL_INFO\n */\n#define ATTR_VOL_SETMASK                        0x80002000\n\n\n/* File/directory attributes: */\n#define ATTR_DIR_LINKCOUNT                      0x00000001\n#define ATTR_DIR_ENTRYCOUNT                     0x00000002\n#define ATTR_DIR_MOUNTSTATUS                    0x00000004\n#define ATTR_DIR_ALLOCSIZE                      0x00000008\n#define ATTR_DIR_IOBLOCKSIZE                    0x00000010\n#define ATTR_DIR_DATALENGTH                     0x00000020\n\n/* ATTR_DIR_MOUNTSTATUS Flags: */\n#define   DIR_MNTSTATUS_MNTPOINT                0x00000001\n#define   DIR_MNTSTATUS_TRIGGER                 0x00000002\n\n#define ATTR_DIR_VALIDMASK                      0x0000003f\n#define ATTR_DIR_SETMASK                        0x00000000\n\n#define ATTR_FILE_LINKCOUNT                     0x00000001\n#define ATTR_FILE_TOTALSIZE                     0x00000002\n#define ATTR_FILE_ALLOCSIZE                     0x00000004\n#define ATTR_FILE_IOBLOCKSIZE                   0x00000008\n#define ATTR_FILE_DEVTYPE                       0x00000020\n#define ATTR_FILE_FORKCOUNT                     0x00000080\n#define ATTR_FILE_FORKLIST                      0x00000100\n#define ATTR_FILE_DATALENGTH                    0x00000200\n#define ATTR_FILE_DATAALLOCSIZE                 0x00000400\n#define ATTR_FILE_RSRCLENGTH                    0x00001000\n#define ATTR_FILE_RSRCALLOCSIZE                 0x00002000\n\n#define ATTR_FILE_VALIDMASK                     0x000037FF\n/*\n * Settable ATTR_FILE_* attributes include:\n * ATTR_FILE_DEVTYPE\n */\n#define ATTR_FILE_SETMASK                       0x00000020\n\n/* CMNEXT attributes extend the common attributes, but in the forkattr field */\n#define ATTR_CMNEXT_RELPATH     0x00000004\n#define ATTR_CMNEXT_PRIVATESIZE 0x00000008\n#define ATTR_CMNEXT_LINKID      0x00000010\n#define ATTR_CMNEXT_NOFIRMLINKPATH     0x00000020\n#define ATTR_CMNEXT_REALDEVID   0x00000040\n#define ATTR_CMNEXT_REALFSID    0x00000080\n#define ATTR_CMNEXT_CLONEID     0x00000100\n#define ATTR_CMNEXT_EXT_FLAGS   0x00000200\n#define ATTR_CMNEXT_RECURSIVE_GENCOUNT 0x00000400\n\n#define ATTR_CMNEXT_VALIDMASK   0x000007fc\n#define ATTR_CMNEXT_SETMASK             0x00000000\n\n/* Deprecated fork attributes */\n#define ATTR_FORK_TOTALSIZE                     0x00000001\n#define ATTR_FORK_ALLOCSIZE                     0x00000002\n#define ATTR_FORK_RESERVED                      0xffffffff\n\n#define ATTR_FORK_VALIDMASK                     0x00000003\n#define ATTR_FORK_SETMASK                       0x00000000\n\n/* Obsolete, implemented, not supported */\n#define ATTR_CMN_NAMEDATTRCOUNT                 0x00080000\n#define ATTR_CMN_NAMEDATTRLIST                  0x00100000\n#define ATTR_FILE_CLUMPSIZE                     0x00000010      /* obsolete */\n#define ATTR_FILE_FILETYPE                      0x00000040      /* always zero */\n#define ATTR_FILE_DATAEXTENTS                   0x00000800      /* obsolete, HFS-specific */\n#define ATTR_FILE_RSRCEXTENTS                   0x00004000      /* obsolete, HFS-specific */\n\n/* Required attributes for getattrlistbulk(2) */\n#define ATTR_BULK_REQUIRED (ATTR_CMN_NAME | ATTR_CMN_RETURNED_ATTRS)\n\n/*\n * Searchfs\n */\n#define SRCHFS_START                            0x00000001\n#define SRCHFS_MATCHPARTIALNAMES                0x00000002\n#define SRCHFS_MATCHDIRS                        0x00000004\n#define SRCHFS_MATCHFILES                       0x00000008\n#define SRCHFS_SKIPLINKS                        0x00000010\n#define SRCHFS_SKIPINVISIBLE                    0x00000020\n#define SRCHFS_SKIPPACKAGES                     0x00000040\n#define SRCHFS_SKIPINAPPROPRIATE                0x00000080\n\n#define SRCHFS_NEGATEPARAMS                     0x80000000\n#define SRCHFS_VALIDOPTIONSMASK                 0x800000FF\n\nstruct fssearchblock {\n\tstruct attrlist         *returnattrs;\n\tvoid                            *returnbuffer;\n\tsize_t                          returnbuffersize;\n\tu_long                          maxmatches;\n\tstruct timeval          timelimit;\n\tvoid                            *searchparams1;\n\tsize_t                          sizeofsearchparams1;\n\tvoid                            *searchparams2;\n\tsize_t                          sizeofsearchparams2;\n\tstruct attrlist         searchattrs;\n};\n\n\nstruct searchstate {\n\tuint32_t                        ss_union_flags;         // for SRCHFS_START\n\tuint32_t                        ss_union_layer;         // 0 = top\n\tu_char                          ss_fsstate[548];        // fs private\n} __attribute__((packed));\n\n#define FST_EOF (-1)                            /* end-of-file offset */\n\n#endif /* __APPLE_API_UNSTABLE */\n#endif /* !_SYS_ATTR_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/buf.h",
    "content": "/*\n * Copyright (c) 2000-2016 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */\n/*\n * Copyright (c) 1982, 1986, 1989, 1993\n *\tThe Regents of the University of California.  All rights reserved.\n * (c) UNIX System Laboratories, Inc.\n * All or some portions of this file are derived from material licensed\n * to the University of California by American Telephone and Telegraph\n * Co. or Unix System Laboratories, Inc. and are reproduced herein with\n * the permission of UNIX System Laboratories, Inc.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *\tThis product includes software developed by the University of\n *\tCalifornia, Berkeley and its contributors.\n * 4. Neither the name of the University nor the names of its contributors\n *    may be used to endorse or promote products derived from this software\n *    without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n *\t@(#)buf.h\t8.9 (Berkeley) 3/30/95\n */\n\n#ifndef _SYS_BUF_H_\n#define _SYS_BUF_H_\n\n#include <sys/cdefs.h>\n#include <sys/kernel_types.h>\n#include <sys/ucred.h>\n#include <mach/memory_object_types.h>\n\n\n#define B_WRITE         0x00000000      /* Write buffer (pseudo flag). */\n#define B_READ          0x00000001      /* Read buffer. */\n#define B_ASYNC         0x00000002      /* Start I/O, do not wait. */\n#define B_NOCACHE       0x00000004      /* Do not cache block after use. */\n#define B_DELWRI        0x00000008      /* Delay I/O until buffer reused. */\n#define B_LOCKED        0x00000010      /* Locked in core (not reusable). */\n#define B_PHYS          0x00000020      /* I/O to user memory. */\n#define B_CLUSTER       0x00000040      /* UPL based I/O generated by cluster layer */\n#define B_PAGEIO        0x00000080      /* Page in/out */\n#define B_META          0x00000100      /* buffer contains meta-data. */\n#define B_RAW           0x00000200      /* Set by physio for raw transfers. */\n#define B_FUA           0x00000400      /* Write-through disk cache(if supported) */\n#define B_PASSIVE       0x00000800      /* PASSIVE I/Os are ignored by THROTTLE I/O */\n#define B_IOSTREAMING   0x00001000      /* sequential access pattern detected */\n#define B_THROTTLED_IO  0x00002000      /* low priority I/O (deprecated) */\n#define B_ENCRYPTED_IO  0x00004000      /* Encrypted I/O */\n#define B_STATICCONTENT 0x00008000      /* Buffer is likely to remain unaltered */\n\n/*\n * make sure to check when adding flags that\n * that the new flags don't overlap the definitions\n * in buf_internal.h\n */\n\n__BEGIN_DECLS\n\n/*!\n *  @function buf_markaged\n *  @abstract Mark a buffer as \"aged,\" i.e. as a good candidate to be discarded and reused after buf_brelse().\n *  @param bp Buffer to mark.\n */\nvoid    buf_markaged(buf_t bp);\n\n/*!\n *  @function buf_markinvalid\n *  @abstract Mark a buffer as not having valid data and being ready for immediate reuse after buf_brelse().\n *  @param bp Buffer to mark.\n */\nvoid    buf_markinvalid(buf_t bp);\n\n/*!\n *  @function buf_markdelayed\n *  @abstract Mark a buffer as a delayed write: mark it dirty without actually scheduling I/O.\n *  @discussion Data will be flushed to disk at some later time, not with brelse(). A sync()/fsync()\n *  or pressure necessitating reuse of the buffer will cause it to be written back to disk.\n *  @param bp Buffer to mark.\n */\nvoid    buf_markdelayed(buf_t bp);\n\nvoid    buf_markclean(buf_t);\n\n/*!\n *  @function buf_markeintr\n *  @abstract Mark a buffer as having been interrupted during I/O.\n *  @discussion Waiters for I/O to complete (buf_biowait()) will return with EINTR when woken up.\n *  buf_markeintr does not itself do a wakeup.\n *  @param bp Buffer to mark.\n */\nvoid    buf_markeintr(buf_t bp);\n\n/*!\n *  @function buf_markfua\n *  @abstract Mark a buffer for write through disk cache, if disk supports it.\n *  @param bp Buffer to mark.\n */\nvoid    buf_markfua(buf_t bp);\n\n/*!\n *  @function buf_fua\n *  @abstract Check if a buffer is marked for write through disk caches.\n *  @param bp Buffer to test.\n *  @return Nonzero if buffer is marked for write-through, 0 if not.\n */\nint     buf_fua(buf_t bp);\n\n/*!\n *  @function buf_valid\n *  @abstract Check if a buffer contains valid data.\n *  @param bp Buffer to test.\n *  @return Nonzero if buffer has valid data, 0 if not.\n */\nint     buf_valid(buf_t bp);\n\n/*!\n *  @function buf_fromcache\n *  @abstract Check if a buffer's data was found in core.\n *  @discussion Will return truth after a buf_getblk that finds a valid buffer in the cache or the relevant\n *  data in core (but not in a buffer).\n *  @param bp Buffer to test.\n *  @return Nonzero if we got this buffer's data without doing I/O, 0 if not.\n */\nint     buf_fromcache(buf_t bp);\n\n/*!\n *  @function buf_upl\n *  @abstract Get the upl (Universal Page List) associated with a buffer.\n *  @discussion Buffers allocated with buf_alloc() are not returned with a upl, and\n *  traditional buffers only have a upl while an I/O is in progress.\n *  @param bp Buffer whose upl to grab.\n *  @return Buffer's upl if it has one, else NULL.\n */\nvoid *  buf_upl(buf_t bp);\n\n/*!\n *  @function buf_uploffset\n *  @abstract Get the offset into a UPL at which this buffer begins.\n *  @discussion This function should only be called on iobufs, i.e. buffers allocated with buf_alloc().\n *  @param bp Buffer whose uploffset to grab.\n *  @return Buffer's uploffset--does not check whether that value makes sense for this buffer.\n */\nuint32_t buf_uploffset(buf_t bp);\n\n/*!\n *  @function buf_rcred\n *  @abstract Get the credential associated with a buffer for reading.\n *  @discussion No reference is taken; if the credential is to be held on to persistently, an additional\n *  reference must be taken with kauth_cred_ref.\n *  @param bp Buffer whose credential to grab.\n *  @return Credential if it exists, else NULL.\n */\nkauth_cred_t buf_rcred(buf_t bp);\n\n/*!\n *  @function buf_wcred\n *  @abstract Get the credential associated with a buffer for writing.\n *  @discussion No reference is taken; if the credential is to be held on to persistently, an additional\n *  reference must be taken with kauth_cred_ref.\n *  @param bp Buffer whose credential to grab.\n *  @return Credential if it exists, else NULL.\n */\nkauth_cred_t buf_wcred(buf_t bp);\n\n/*!\n *  @function buf_proc\n *  @abstract Get the process associated with this buffer.\n *  @discussion buf_proc() will generally return NULL; a process is currently only associated with\n *  a buffer in the event of a physio() call.\n *  @param bp Buffer whose associated process to find.\n *  @return Associated process, possibly NULL.\n */\nproc_t  buf_proc(buf_t bp);\n\n/*!\n *  @function buf_dirtyoff\n *  @abstract Get the starting offset of the dirty region associated with a buffer.\n *  @discussion The dirty offset is zero unless someone explicitly calls buf_setdirtyoff() (which the kernel does not).\n *  @param bp Buffer whose dirty offset to get.\n *  @return Dirty offset (0 if not explicitly changed).\n */\nuint32_t buf_dirtyoff(buf_t bp);\n\n/*!\n *  @function buf_dirtyend\n *  @abstract Get the ending offset of the dirty region associated with a buffer.\n *  @discussion If the buffer's data was found incore and dirty, the dirty end is the size of the block; otherwise, unless\n *  someone outside of xnu explicitly changes it by calling buf_setdirtyend(), it will be zero.\n *  @param bp Buffer whose dirty end to get.\n *  @return 0 if buffer is found clean; size of buffer if found dirty.  Can be set to any value by callers of buf_setdirtyend().\n */\nuint32_t buf_dirtyend(buf_t bp);\n\n/*!\n *  @function buf_setdirtyoff\n *  @abstract Set the starting offset of the dirty region associated with a buffer.\n *  @discussion This value is zero unless someone set it explicitly.\n *  @param bp Buffer whose dirty end to set.\n */\nvoid    buf_setdirtyoff(buf_t bp, uint32_t);\n\n/*!\n *  @function buf_setdirtyend\n *  @abstract Set the ending offset of the dirty region associated with a buffer.\n *  @discussion If the buffer's data was found incore and dirty, the dirty end is the size of the block; otherwise, unless\n *  someone outside of xnu explicitly changes it by calling buf_setdirtyend(), it will be zero.\n *  @param bp Buffer whose dirty end to set.\n */\nvoid    buf_setdirtyend(buf_t bp, uint32_t);\n\n/*!\n *  @function buf_error\n *  @abstract Get the error value associated with a buffer.\n *  @discussion Errors are set with buf_seterror().\n *  @param bp Buffer whose error value to retrieve.\n *  @return Error value, directly.\n */\nerrno_t buf_error(buf_t bp);\n\n/*!\n *  @function buf_seterror\n *  @abstract Set an error value on a buffer.\n *  @param bp Buffer whose error value to set.\n */\nvoid    buf_seterror(buf_t bp, errno_t);\n\n/*!\n *  @function buf_setflags\n *  @abstract Set flags on a buffer.\n *  @discussion buffer_flags |= flags\n *  @param bp Buffer whose flags to set.\n *  @param flags Flags to add to buffer's mask. B_LOCKED/B_NOCACHE/B_ASYNC/B_READ/B_WRITE/B_PAGEIO/B_FUA\n */\nvoid    buf_setflags(buf_t bp, int32_t flags);\n\n/*!\n *  @function buf_clearflags\n *  @abstract Clear flags on a buffer.\n *  @discussion buffer_flags &= ~flags\n *  @param bp Buffer whose flags to clear.\n *  @param flags Flags to remove from buffer's mask. B_LOCKED/B_NOCACHE/B_ASYNC/B_READ/B_WRITE/B_PAGEIO/B_FUA\n */\nvoid    buf_clearflags(buf_t bp, int32_t flags);\n\n/*!\n *  @function buf_flags\n *  @abstract Get flags set on a buffer.\n *  @discussion Valid flags are B_LOCKED/B_NOCACHE/B_ASYNC/B_READ/B_WRITE/B_PAGEIO/B_FUA.\n *  @param bp Buffer whose flags to grab.\n *  @return flags.\n */\nint32_t buf_flags(buf_t bp);\n\n/*!\n *  @function buf_reset\n *  @abstract Reset I/O flag state on a buffer.\n *  @discussion Clears current flags on a buffer (internal and external) and allows some new flags to be set.\n *  Used perhaps to prepare an iobuf for reuse.\n *  @param bp Buffer whose flags to grab.\n *  @param flags Flags to set on buffer: B_READ, B_WRITE, B_ASYNC, B_NOCACHE.\n */\nvoid    buf_reset(buf_t bp, int32_t flags);\n\n/*!\n *  @function buf_map\n *  @abstract Get virtual mappings for buffer data.\n *  @discussion For buffers created through buf_getblk() (i.e. traditional buffer cache usage),\n *  buf_map() just returns the address at which data was mapped by but_getblk().  For a B_CLUSTER buffer, i.e. an iobuf\n *  whose upl state is managed manually, there are two possibilities.  If the buffer was created\n *  with an underlying \"real\" buffer through cluster_bp(), the mapping of the \"real\" buffer is returned.\n *  Otherwise, the buffer was created with buf_alloc() and buf_setupl() was subsequently called; buf_map()\n *  will call ubc_upl_map() to get a mapping for the buffer's upl and return the start of that mapping\n *  plus the buffer's upl offset (set in buf_setupl()).  In the last case, buf_unmap() must later be called\n *  to tear down the mapping.  NOTE: buf_map() does not set the buffer data pointer; this must be done with buf_setdataptr().\n *  @param bp Buffer whose mapping to find or create.\n *  @param io_addr Destination for mapping address.\n *  @return 0 for success, ENOMEM if unable to map the buffer.\n */\nerrno_t buf_map(buf_t bp, caddr_t *io_addr);\n\n/*!\n *  @function buf_map_range\n *  @abstract Get virtual mappings for buffer data.\n *  @discussion Similar to buf_map but the focus is on a range\n *  of the UPL. The b_uploffset and b_count control what part of the UPL will be mapped.\n *  @param bp Buffer whose mapping to find or create.\n *  @param io_addr Destination for mapping address.\n *  @return 0 for success, ENOMEM if unable to map the buffer.\n */\nerrno_t buf_map_range(buf_t bp, caddr_t *io_addr);\n\n/*!\n *  @function buf_unmap\n *  @abstract Release mappings for buffer data.\n *  @discussion For buffers created through buf_getblk() (i.e. traditional buffer cache usage),\n *  buf_unmap() does nothing; buf_brelse() will take care of unmapping.  For a B_CLUSTER buffer, i.e. an iobuf\n *  whose upl state is managed manually, there are two possibilities.  If the buffer was created\n *  with an underlying \"real\" buffer through cluster_bp(), buf_unmap() does nothing; buf_brelse() on the\n *  underlying buffer will tear down the mapping. Otherwise, the buffer was created with buf_alloc() and\n *  buf_setupl() was subsequently called; buf_map() created the mapping.  In this case, buf_unmap() will\n *  unmap the buffer.\n *  @param bp Buffer whose mapping to find or create.\n *  @return 0 for success, EINVAL if unable to unmap buffer.\n */\nerrno_t buf_unmap(buf_t bp);\n\n/*!\n *  @function buf_unmap_range\n *  @abstract Release mappings for buffer data.\n *  @discussion Similar to buf_unmap but the focus is on a range\n *  of the UPL. The b_uploffset and b_count control what part of the UPL will be unmapped.\n *  @param bp Buffer whose mapping to find or create.\n *  @return 0 for success, EINVAL if unable to unmap buffer.\n */\nerrno_t buf_unmap_range(buf_t bp);\n\n/*!\n *  @function buf_setdrvdata\n *  @abstract Set driver-specific data on a buffer.\n *  @param bp Buffer whose driver-data to set.\n *  @param drvdata Opaque driver data.\n */\nvoid    buf_setdrvdata(buf_t bp, void *drvdata);\n\n/*!\n *  @function buf_setdrvdata\n *  @abstract Get driver-specific data from a buffer.\n *  @param bp Buffer whose driver data to get.\n *  @return Opaque driver data.\n */\nvoid *  buf_drvdata(buf_t bp);\n\n/*!\n *  @function buf_setfsprivate\n *  @abstract Set filesystem-specific data on a buffer.\n *  @param bp Buffer whose filesystem data to set.\n *  @param fsprivate Opaque filesystem data.\n */\nvoid    buf_setfsprivate(buf_t bp, void *fsprivate);\n\n/*!\n *  @function buf_fsprivate\n *  @abstract Get filesystem-specific data from a buffer.\n *  @param bp Buffer whose filesystem data to get.\n *  @return Opaque filesystem data.\n */\nvoid *  buf_fsprivate(buf_t bp);\n\n/*!\n *  @function buf_blkno\n *  @abstract Get physical block number associated with a buffer, in the sense of VNOP_BLOCKMAP.\n *  @discussion When a buffer's physical block number is the same is its logical block number, then the physical\n *  block number is considered uninitialized.  A physical block number of -1 indicates that there is no valid\n *  physical mapping (e.g. the logical block is invalid or corresponds to a sparse region in a file).  Physical\n *  block number is normally set by the cluster layer or by buf_getblk().\n *  @param bp Buffer whose physical block number to get.\n *  @return Block number.\n */\ndaddr64_t buf_blkno(buf_t bp);\n\n/*!\n *  @function buf_lblkno\n *  @abstract Get logical block number associated with a buffer.\n *  @discussion Logical block number is set on traditionally-used buffers by an argument passed to buf_getblk(),\n *  for example by buf_bread().\n *  @param bp Buffer whose logical block number to get.\n *  @return Block number.\n */\ndaddr64_t buf_lblkno(buf_t bp);\n\n/*!\n *  @function buf_lblksize\n *  @abstract Get the block size used to calculate the logical block number associated with a buffer.\n *  @discussion Logical block number is set on traditionally-used buffers by an argument passed to buf_getblk(),\n *  for example by buf_bread(). Block size is the block size used to calculate the file offset.\n *  @param bp Buffer whose logical block size to get.\n *  @return Block size.\n */\nuint32_t buf_lblksize(buf_t bp);\n\n/*!\n *  @function buf_setblkno\n *  @abstract Set physical block number associated with a buffer.\n *  @discussion Physical block number is generally set by the cluster layer or by buf_getblk().\n *  @param bp Buffer whose physical block number to set.\n *  @param blkno Block number to set.\n */\nvoid    buf_setblkno(buf_t bp, daddr64_t blkno);\n\n/*!\n *  @function buf_setlblkno\n *  @abstract Set logical block number associated with a buffer.\n *  @discussion Logical block number is set on traditionally-used buffers by an argument passed to buf_getblk(),\n *  for example by buf_bread().\n *  @param bp Buffer whose logical block number to set.\n *  @param lblkno Block number to set.\n */\nvoid    buf_setlblkno(buf_t bp, daddr64_t lblkno);\n\n/*!\n *  @function buf_setlblksize\n *  @abstract Set block size used to set the logical block number associated with a buffer.\n *  @discussion Logical block number is set on traditionally-used buffers by an argument passed to buf_getblk(),\n *  for example by buf_bread().\n *  @param bp Buffer whose logical block size to set.\n *  @param lblksize Block size to set.\n */\nvoid    buf_setlblksize(buf_t bp, uint32_t lblksize);\n\n/*!\n *  @function buf_count\n *  @abstract Get count of valid bytes in a buffer.  This may be less than the space allocated to the buffer.\n *  @param bp Buffer whose byte count to get.\n *  @return Byte count.\n */\nuint32_t buf_count(buf_t bp);\n\n/*!\n *  @function buf_size\n *  @abstract Get size of data region allocated to a buffer.\n *  @discussion May be larger than amount of valid data in buffer.\n *  @param bp Buffer whose size to get.\n *  @return Size.\n */\nuint32_t buf_size(buf_t bp);\n\n/*!\n *  @function buf_resid\n *  @abstract Get a count of bytes which were not consumed by an I/O on a buffer.\n *  @discussion Set when an I/O operations completes.\n *  @param bp Buffer whose outstanding count to get.\n *  @return Count of unwritten/unread bytes.\n */\nuint32_t buf_resid(buf_t bp);\n\n/*!\n *  @function buf_setcount\n *  @abstract Set count of valid bytes in a buffer.  This may be less than the space allocated to the buffer.\n *  @param bp Buffer whose byte count to set.\n *  @param bcount Count to set.\n */\nvoid    buf_setcount(buf_t bp, uint32_t bcount);\n\n/*!\n *  @function buf_setsize\n *  @abstract Set size of data region allocated to a buffer.\n *  @discussion May be larger than amount of valid data in buffer.  Should be used by\n *  code which is manually providing storage for an iobuf, one allocated with buf_alloc().\n *  @param bp Buffer whose size to set.\n */\nvoid    buf_setsize(buf_t bp, uint32_t);\n\n/*!\n *  @function buf_setresid\n *  @abstract Set a count of bytes outstanding for I/O in a buffer.\n *  @discussion Set when an I/O operations completes.  Examples: called by IOStorageFamily when I/O\n *  completes, often called on an \"original\" buffer when using a manipulated buffer to perform I/O\n *  on behalf of the first.\n *  @param bp Buffer whose outstanding count to set.\n */\nvoid    buf_setresid(buf_t bp, uint32_t resid);\n\n/*!\n *  @function buf_setdataptr\n *  @abstract Set the address at which a buffer's data will be stored.\n *  @discussion In traditional buffer use, the data pointer will be set automatically. This routine is\n *  useful with iobufs (allocated with buf_alloc()).\n *  @param bp Buffer whose data pointer to set.\n *  @param data Pointer to data region.\n */\nvoid    buf_setdataptr(buf_t bp, uintptr_t data);\n\n/*!\n *  @function buf_dataptr\n *  @abstract Get the address at which a buffer's data is stored; for iobufs, this must\n *  be set with buf_setdataptr().  See buf_map().\n *  @param bp Buffer whose data pointer to retrieve.\n *  @return Data pointer; NULL if unset.\n */\nuintptr_t buf_dataptr(buf_t bp);\n\n/*!\n *  @function buf_vnode\n *  @abstract Get the vnode associated with a buffer.\n *  @discussion Every buffer is associated with a file.  Because there is an I/O in flight,\n *  there is an iocount on this vnode; it is returned WITHOUT an extra iocount, and vnode_put()\n *  need NOT be called.\n *  @param bp Buffer whose vnode to retrieve.\n *  @return Buffer's vnode.\n */\nvnode_t buf_vnode(buf_t bp);\n\n/*!\n *  @function buf_setvnode\n *  @abstract Set the vnode associated with a buffer.\n *  @discussion This call need not be used on traditional buffers; it is for use with iobufs.\n *  @param bp Buffer whose vnode to set.\n *  @param vp The vnode to attach to the buffer.\n */\nvoid    buf_setvnode(buf_t bp, vnode_t vp);\n\n/*!\n *  @function buf_device\n *  @abstract Get the device ID associated with a buffer.\n *  @discussion In traditional buffer use, this value is NODEV until buf_strategy() is called unless\n *  buf_getblk() was passed a device vnode.  It is set on an iobuf if buf_alloc() is passed a device\n *  vnode or if buf_setdevice() is called.\n *  @param bp Buffer whose device ID to retrieve.\n *  @return Device id.\n */\ndev_t   buf_device(buf_t bp);\n\n/*!\n *  @function buf_setdevice\n *  @abstract Set the device associated with a buffer.\n *  @discussion A buffer's device is set in buf_strategy() (or in buf_getblk() if the file is a device).\n *  It is also set on an iobuf if buf_alloc() is passed a device vnode.\n *  @param bp Buffer whose device ID to set.\n *  @param vp Device to set on the buffer.\n *  @return 0 for success, EINVAL if vp is not a device file.\n */\nerrno_t buf_setdevice(buf_t bp, vnode_t vp);\n\n/*!\n *  @function buf_strategy\n *  @abstract Pass an I/O request for a buffer down to the device layer.\n *  @discussion This is one of the most important routines in the buffer cache layer.  For buffers obtained\n *  through buf_getblk, it handles finding physical block numbers for the I/O (with VNOP_BLKTOOFF and\n *  VNOP_BLOCKMAP), packaging the I/O into page-sized chunks, and initiating I/O on the disk by calling\n *  the device's strategy routine. If a buffer's UPL has been set manually with buf_setupl(), it assumes\n *  that the request is already correctly configured with a block number and a size divisible by page size\n *  and will just call directly to the device.\n *  @param devvp Device on which to perform I/O\n *  @param ap vnop_strategy_args structure (most importantly, a buffer).\n *  @return 0 for success, or errors from filesystem or device layers.\n */\nerrno_t buf_strategy(vnode_t devvp, void *ap);\n\n/*\n * Flags for buf_invalblkno()\n */\n#define BUF_WAIT        0x01\n\n/*!\n *  @function buf_invalblkno\n *  @abstract Invalidate a filesystem logical block in a file.\n *  @discussion buf_invalblkno() tries to make the data for a given block in a file\n *  invalid; if the buffer for that block is found in core and is not busy, we mark it\n *  invalid and call buf_brelse() (see \"flags\" param for what happens if the buffer is busy).\n *  buf_brelse(), noticing that it is invalid, will\n *  will return the buffer to the empty-buffer list and tell the VM subsystem to abandon\n *  the relevant pages.  Data will not be written to backing store--it will be cast aside.\n *  Note that this function will only work if the block in question has been\n *  obtained with a buf_getblk().  If data has been read into core without using\n *  traditional buffer cache routines, buf_invalblkno() will not be able to invalidate it--this\n *  includes the use of iobufs.\n *  @param vp vnode whose block to invalidate.\n *  @param lblkno Logical block number.\n *  @param flags BUF_WAIT: wait for busy buffers to become unbusy and invalidate them then.  Otherwise,\n *  just return EBUSY for busy blocks.\n *  @return 0 for success, EINVAL if vp is not a device file.\n */\nerrno_t buf_invalblkno(vnode_t vp, daddr64_t lblkno, int flags);\n\n/*!\n *  @function buf_callback\n *  @abstract Get the function set to be called when I/O on a buffer completes.\n *  @discussion A function returned by buf_callback was originally set with buf_setcallback().\n *  @param bp Buffer whose callback to get.\n *  @return 0 for success, or errors from filesystem or device layers.\n */\nvoid * buf_callback(buf_t bp);\n\n/*!\n *  @function buf_setcallback\n *  @abstract Set a function to be called once when I/O on a buffer completes.\n *  @discussion A one-shot callout set with buf_setcallback() will be called from buf_biodone()\n *  when I/O completes. It will be passed the \"transaction\" argument as well as the buffer.\n *  buf_setcallback() also marks the buffer as B_ASYNC.\n *  @param bp Buffer whose callback to set.\n *  @param callback function to use as callback.\n *  @param transaction Additional argument to callback function.\n *  @return 0; always succeeds.\n */\nerrno_t buf_setcallback(buf_t bp, void (*callback)(buf_t, void *), void *transaction);\n\n/*!\n *  @function buf_setupl\n *  @abstract Set the UPL (Universal Page List), and offset therein, on a buffer.\n *  @discussion buf_setupl() should only be called on buffers allocated with buf_alloc().\n *  A subsequent call to buf_map() will map the UPL and give back the address at which data\n *  begins. After buf_setupl() is called, a buffer is marked B_CLUSTER; when this is the case,\n *  buf_strategy() assumes that a buffer is correctly configured to be passed to the device\n *  layer without modification. Passing a NULL upl will clear the upl and the B_CLUSTER flag on the\n *  buffer.\n *  @param bp Buffer whose upl to set.\n *  @param upl UPL to set in the buffer.\n *  @param offset Offset within upl at which relevant data begin.\n *  @return 0 for success, EINVAL if the buffer was not allocated with buf_alloc().\n */\nerrno_t buf_setupl(buf_t bp, upl_t upl, uint32_t offset);\n\n/*!\n *  @function buf_clone\n *  @abstract Clone a buffer with a restricted range and an optional callback.\n *  @discussion Generates a buffer which is identical to its \"bp\" argument except that\n *  it spans a subset of the data of the original.  The buffer to be cloned should\n *  have been allocated with buf_alloc().  Checks its arguments to make sure\n *  that the data subset is coherent. Optionally, adds a callback function and argument to it\n *  to be called when I/O completes (as with buf_setcallback(), but B_ASYNC is not set).  If the original buffer had\n *  a upl set through buf_setupl(), this upl is copied to the new buffer; otherwise, the original's\n *  data pointer is used raw. The buffer must be released with buf_free().\n *  @param bp Buffer to clone.\n *  @param io_offset Offset, relative to start of data in original buffer, at which new buffer's data will begin.\n *  @param io_size Size of buffer region in new buffer, in the sense of buf_count().\n *  @param iodone Callback to be called from buf_biodone() when I/O completes, in the sense of buf_setcallback().\n *  @param arg Argument to pass to iodone() callback.\n *  @return NULL if io_offset/io_size combination is invalid for the buffer to be cloned; otherwise, the new buffer.\n */\nbuf_t   buf_clone(buf_t bp, int io_offset, int io_size, void (*iodone)(buf_t, void *), void *arg);\n\n\n/*!\n *  @function buf_create_shadow\n *  @abstract Create a shadow buffer with optional private storage and an optional callback.\n *  @param bp Buffer to shadow.\n *  @param force_copy If TRUE, do not link the shadaow to 'bp' and if 'external_storage' == NULL,\n *  force a copy of the data associated with 'bp'.\n *  @param external_storage If non-NULL, associate it with the new buffer as its storage instead of the\n *  storage currently associated with 'bp'.\n *  @param iodone Callback to be called from buf_biodone() when I/O completes, in the sense of buf_setcallback().\n *  @param arg Argument to pass to iodone() callback.\n *  @return NULL if the buffer to be shadowed is not B_META or a primary buffer (i.e. not a shadow buffer); otherwise, the new buffer.\n */\n\nbuf_t   buf_create_shadow(buf_t bp, boolean_t force_copy, uintptr_t external_storage, void (*iodone)(buf_t, void *), void *arg);\n\n\n/*!\n *  @function buf_shadow\n *  @abstract returns true if 'bp' is a shadow of another buffer.\n *  @param bp Buffer to query.\n *  @return 1 if 'bp' is a shadow, 0 otherwise.\n */\nint     buf_shadow(buf_t bp);\n\n\n/*!\n *  @function buf_alloc\n *  @abstract Allocate an uninitialized buffer.\n *  @discussion A buffer returned by buf_alloc() is marked as busy and as an iobuf; it has no storage set up and must be\n *  set up using buf_setdataptr() or buf_setupl()/buf_map().\n *  @param vp vnode to associate with the buffer: optionally NULL.  If vp is a device file, then\n *  the buffer's associated device will be set. If vp is NULL, it can be set later with buf_setvnode().\n *  @return New buffer.\n */\nbuf_t   buf_alloc(vnode_t vp);\n\n/*!\n *  @function buf_free\n *  @abstract Free a buffer that was allocated with buf_alloc().\n *  @discussion The storage (UPL, data pointer) associated with an iobuf must be freed manually.\n *  @param bp The buffer to free.\n */\nvoid    buf_free(buf_t bp);\n\n/*\n * flags for buf_invalidateblks\n */\n#define BUF_WRITE_DATA  0x0001          /* write data blocks first */\n#define BUF_SKIP_META   0x0002          /* skip over metadata blocks */\n#define BUF_INVALIDATE_LOCKED   0x0004  /* force B_LOCKED blocks to be invalidated */\n\n/*!\n *  @function buf_invalidateblks\n *  @abstract Invalidate all the blocks associated with a vnode.\n *  @discussion This function does for all blocks associated with a vnode what buf_invalblkno does for one block.\n *  Again, it will only be able to invalidate data which were populated with traditional buffer cache routines,\n *  i.e. by buf_getblk() and callers thereof. Unlike buf_invalblkno(), it can be made to write dirty data to disk\n *  rather than casting it aside.\n *  @param vp The vnode whose data to invalidate.\n *  @param flags BUF_WRITE_DATA: write dirty data to disk with VNOP_BWRITE() before kicking buffer cache entries out.\n *  BUF_SKIP_META: do not invalidate metadata blocks.\n *  @param slpflag Flags to pass to \"msleep\" while waiting to acquire busy buffers.\n *  @param slptimeo Timeout in \"hz\" (1/100 second) to wait for a buffer to become unbusy before waking from sleep\n *  and re-starting the scan.\n *  @return 0 for success, error values from msleep().\n */\nint     buf_invalidateblks(vnode_t vp, int flags, int slpflag, int slptimeo);\n\n/*\n * flags for buf_flushdirtyblks and buf_iterate\n */\n#define BUF_SKIP_NONLOCKED      0x01\n#define BUF_SKIP_LOCKED         0x02\n#define BUF_SCAN_CLEAN          0x04    /* scan the clean buffers */\n#define BUF_SCAN_DIRTY          0x08    /* scan the dirty buffers */\n#define BUF_NOTIFY_BUSY         0x10    /* notify the caller about the busy pages during the scan */\n\n\n#define BUF_RETURNED            0\n#define BUF_RETURNED_DONE       1\n#define BUF_CLAIMED             2\n#define BUF_CLAIMED_DONE        3\n/*!\n *  @function buf_flushdirtyblks\n *  @abstract Write dirty file blocks to disk.\n *  @param vp The vnode whose blocks to flush.\n *  @param wait Wait for writes to complete before returning.\n *  @param flags Can pass zero, meaning \"flush all dirty buffers.\"\n *  BUF_SKIP_NONLOCKED: Skip buffers which are not busy when we encounter them.\n *  BUF_SKIP_LOCKED: Skip buffers which are busy when we encounter them.\n *  @param msg String to pass to msleep().\n */\nvoid    buf_flushdirtyblks(vnode_t vp, int wait, int flags, const char *msg);\n\n/*!\n *  @function buf_iterate\n *  @abstract Perform some operation on all buffers associated with a vnode.\n *  @param vp The vnode whose buffers to scan.\n *  @param callout Function to call on each buffer.  Should return one of:\n *  BUF_RETURNED: buf_iterate() should call buf_brelse() on the buffer.\n *  BUF_RETURNED_DONE: buf_iterate() should call buf_brelse() on the buffer and then stop iterating.\n *  BUF_CLAIMED: buf_iterate() should continue iterating (and not call buf_brelse()).\n *  BUF_CLAIMED_DONE: buf_iterate() should stop iterating (and not call buf_brelse()).\n *  @param flags\n *  BUF_SKIP_NONLOCKED: Skip buffers which are not busy when we encounter them. BUF_SKIP_LOCKED: Skip buffers which are busy when we encounter them.\n *  BUF_SCAN_CLEAN: Call out on clean buffers.\n *  BUF_SCAN_DIRTY: Call out on dirty buffers.\n *  BUF_NOTIFY_BUSY: If a buffer cannot be acquired, pass a NULL buffer to callout; otherwise,\n *  that buffer will be silently skipped.\n *  @param arg Argument to pass to callout in addition to buffer.\n */\nvoid    buf_iterate(vnode_t vp, int (*callout)(buf_t, void *), int flags, void *arg);\n\n/*!\n *  @function buf_clear\n *  @abstract Zero out the storage associated with a buffer.\n *  @discussion Calls buf_map() to get the buffer's data address; for a B_CLUSTER\n *  buffer (one which has had buf_setupl() called on it), it tries to map the buffer's\n *  UPL into memory; should only be called once during the life cycle of an iobuf (one allocated\n *  with buf_alloc()).\n *  @param bp The buffer to zero out.\n */\nvoid    buf_clear(buf_t bp);\n\n/*!\n *  @function buf_bawrite\n *  @abstract Start an asychronous write on a buffer.\n *  @discussion Calls VNOP_BWRITE to start the process of propagating an asynchronous write down to the device layer.\n *  Callers can wait for writes to complete at their discretion using buf_biowait().  When this function is called,\n *  data should already have been written to the buffer's data region.\n *  @param bp The buffer on which to initiate I/O.\n *  @return EWOULDBLOCK if write count is high and \"throttle\" is zero; otherwise, errors from VNOP_BWRITE.\n */\nerrno_t buf_bawrite(buf_t bp);\n\n/*!\n *  @function buf_bdwrite\n *  @abstract Mark a buffer for delayed write.\n *  @discussion Marks a buffer as waiting for delayed write and the current I/O as complete; data will be written to backing store\n *  before the buffer is reused, but it will not be queued for I/O immediately.  Note that for buffers allocated\n *  with buf_alloc(), there are no such guarantees; you must take care of your own flushing to disk.  If\n *  the number of delayed writes pending on the system is greater than an internal limit and the caller has not\n *  requested otherwise [see return_error] , buf_bdwrite() will unilaterally launch an asynchronous I/O with buf_bawrite() to keep the pile of\n *  delayed writes from getting too large.\n *  @param bp The buffer to mark for delayed write.\n *  @return EAGAIN for return_error != 0 case, 0 for succeess, errors from buf_bawrite.\n */\nerrno_t buf_bdwrite(buf_t bp);\n\n/*!\n *  @function buf_bwrite\n *  @abstract Write a buffer's data to backing store.\n *  @discussion Once the data in a buffer has been modified, buf_bwrite() starts sending it to disk by calling\n *  VNOP_STRATEGY.  Unless B_ASYNC has been set on the buffer (by buf_setflags() or otherwise), data will have\n *  been written to disk when buf_bwrite() returns.  See Bach (p 56).\n *  @param bp The buffer to write to disk.\n *  @return 0 for success; errors from buf_biowait().\n */\nerrno_t buf_bwrite(buf_t bp);\n\n/*!\n *  @function buf_biodone\n *  @abstract Mark an I/O as completed.\n *  @discussion buf_biodone() should be called by whosoever decides that an I/O on a buffer is complete; for example,\n *  IOStorageFamily.  It clears the dirty flag on a buffer and signals on the vnode that a write has completed\n *  with vnode_writedone(). If a callout or filter has been set on the buffer, that function is called.  In the case\n *  of a callout, that function is expected to take care of cleaning up and freeing the buffer.\n *  Otherwise, if the buffer is marked B_ASYNC (e.g. it was passed to buf_bawrite()), then buf_biodone()\n *  considers itself justified in calling buf_brelse() to return it to free lists--no one is waiting for it.  Finally,\n *  waiters on the bp (e.g. in buf_biowait()) are woken up.\n *  @param bp The buffer to mark as done with I/O.\n */\nvoid    buf_biodone(buf_t bp);\n\n/*!\n *  @function buf_biowait\n *  @abstract Wait for I/O on a buffer to complete.\n *  @discussion Waits for I/O on a buffer to finish, as marked by a buf_biodone() call.\n *  @param bp The buffer to wait on.\n *  @return 0 for a successful wait; nonzero the buffer has been marked as EINTR or had an error set on it.\n */\nerrno_t buf_biowait(buf_t bp);\n\n/*!\n *  @function buf_brelse\n *  @abstract Release any claim to a buffer, sending it back to free lists.\n *  @discussion buf_brelse() cleans up buffer state and releases a buffer to the free lists.  If the buffer\n *  is not marked invalid and its pages are dirty (e.g. a delayed write was made), its data will be commited\n *  to backing store. If it is marked invalid, its data will be discarded completely.\n *  A valid, cacheable buffer will be put on a list and kept in the buffer hash so it\n *  can be found again; otherwise, it will be dissociated from its vnode and treated as empty.  Which list a valid\n *  buffer is placed on depends on the use of buf_markaged(), whether it is metadata, and the B_LOCKED flag.  A\n *  B_LOCKED buffer will not be available for reuse by other files, though its data may be paged out.\n *  Note that buf_brelse() is intended for use with traditionally allocated buffers.\n *  @param bp The buffer to release.\n */\nvoid    buf_brelse(buf_t bp);\n\n/*!\n *  @function buf_bread\n *  @abstract Synchronously read a block of a file.\n *  @discussion buf_bread() is the traditional way to read a single logical block of a file through the buffer cache.\n *  It tries to find the buffer and corresponding page(s) in core, calls VNOP_STRATEGY if necessary to bring the data\n *  into memory, and waits for I/O to complete.  It should not be used to read blocks of greater than 4K (one VM page)\n *  in size; use cluster routines for large reads.  Indeed, the cluster layer is a more efficient choice for reading DATA\n *  unless you need some finely-tuned semantics that it cannot provide.\n *  @param vp The file from which to read.\n *  @param blkno The logical (filesystem) block number to read.\n *  @param size Size of block; do not use for sizes > 4K.\n *  @param cred Credential to store and use for reading from disk if data are not already in core.\n *  @param bpp Destination pointer for buffer.\n *  @return 0 for success, or an error from buf_biowait().\n */\nerrno_t buf_bread(vnode_t vp, daddr64_t blkno, int size, kauth_cred_t cred, buf_t *bpp);\n\n/*!\n *  @function buf_breadn\n *  @abstract Read a block from a file with read-ahead.\n *  @discussion buf_breadn() reads one block synchronously in the style of buf_bread() and fires\n *  off a specified set of asynchronous reads to improve the likelihood of future cache hits.\n *  It should not be used to read blocks of greater than 4K (one VM page) in size; use cluster\n *  routines for large reads.  Indeed, the cluster layer is a more efficient choice for reading DATA\n *  unless you need some finely-tuned semantics that it cannot provide.\n *  @param vp The file from which to read.\n *  @param blkno The logical (filesystem) block number to read synchronously.\n *  @param size Size of block; do not use for sizes > 4K.\n *  @param rablks Array of logical block numbers for asynchronous read-aheads.\n *  @param rasizes Array of block sizes for asynchronous read-aheads, each index corresponding to same index in \"rablks.\"\n *  @param nrablks Number of entries in read-ahead arrays.\n *  @param cred Credential to store and use for reading from disk if data are not already in core.\n *  @param bpp Destination pointer for buffer.\n *  @return 0 for success, or an error from buf_biowait().\n */\nerrno_t buf_breadn(vnode_t vp, daddr64_t blkno, int size, daddr64_t *rablks, int *rasizes, int nrablks, kauth_cred_t cred, buf_t *bpp);\n\n/*!\n *  @function buf_meta_bread\n *  @abstract Synchronously read a metadata block of a file.\n *  @discussion buf_meta_bread() is the traditional way to read a single logical block of a file through the buffer cache.\n *  It tries to find the buffer and corresponding page(s) in core, calls VNOP_STRATEGY if necessary to bring the data\n *  into memory, and waits for I/O to complete.  It should not be used to read blocks of greater than 4K (one VM page)\n *  in size; use cluster routines for large reads.  Reading meta-data through the traditional buffer cache, unlike\n *  reading data, is efficient and encouraged, especially if the blocks being read are significantly smaller than page size.\n *  @param vp The file from which to read.\n *  @param blkno The logical (filesystem) block number to read.\n *  @param size Size of block; do not use for sizes > 4K.\n *  @param cred Credential to store and use for reading from disk if data are not already in core.\n *  @param bpp Destination pointer for buffer.\n *  @return 0 for success, or an error from buf_biowait().\n */\nerrno_t buf_meta_bread(vnode_t vp, daddr64_t blkno, int size, kauth_cred_t cred, buf_t *bpp);\n\n/*!\n *  @function buf_meta_breadn\n *  @abstract Read a metadata block from a file with read-ahead.\n *  @discussion buf_meta_breadn() reads one block synchronously in the style of buf_meta_bread() and fires\n *  off a specified set of asynchronous reads to improve the likelihood of future cache hits.\n *  It should not be used to read blocks of greater than 4K (one VM page) in size; use cluster\n *  routines for large reads.\n *  @param vp The file from which to read.\n *  @param blkno The logical (filesystem) block number to read synchronously.\n *  @param size Size of block; do not use for sizes > 4K.\n *  @param rablks Array of logical block numbers for asynchronous read-aheads.\n *  @param rasizes Array of block sizes for asynchronous read-aheads, each index corresponding to same index in \"rablks.\"\n *  @param nrablks Number of entries in read-ahead arrays.\n *  @param cred Credential to store and use for reading from disk if data are not already in core.\n *  @param bpp Destination pointer for buffer.\n *  @return 0 for success, or an error from buf_biowait().\n */\nerrno_t buf_meta_breadn(vnode_t vp, daddr64_t blkno, int size, daddr64_t *rablks, int *rasizes, int nrablks, kauth_cred_t cred, buf_t *bpp);\n\n/*!\n *  @function minphys\n *  @abstract Adjust a buffer's count to be no more than maximum physical I/O transfer size for the host architecture.\n *  @discussion physio() takes as a parameter a function to bound transfer sizes for each VNOP_STRATEGY() call.  minphys()\n *  is a default implementation.  It calls buf_setcount() to make the buffer's count the min() of its current count\n *  and the max I/O size for the host architecture.\n *  @param bp The buffer whose byte count to modify.\n *  @return New byte count.\n */\nu_int   minphys(buf_t bp);\n\n/*!\n *  @function physio\n *  @abstract Perform I/O on a device to/from target memory described by a uio.\n *  @discussion physio() allows I/O directly from a device to user-space memory.  It waits\n *  for all I/O to complete before returning.\n *  @param f_strategy Strategy routine to call to initiate I/O.\n *  @param bp Buffer to configure and pass to strategy routine; can be NULL.\n *  @param dev Device on which to perform I/O.\n *  @param flags B_READ or B_WRITE.\n *  @param f_minphys Function which calls buf_setcount() to set a byte count which is suitably\n *  small for the device in question.  Returns byte count that has been set (or unchanged) on the buffer.\n *  @param uio UIO describing the I/O operation.\n *  @param blocksize Logical block size for this vnode.\n *  @return 0 for success; EFAULT for an invalid uio; errors from buf_biowait().\n */\nint     physio(void (*f_strategy)(buf_t), buf_t bp, dev_t dev, int flags, u_int (*f_minphys)(buf_t), struct uio *uio, int blocksize);\n\n\n/*\n * Flags for operation type in getblk()\n */\n#define BLK_READ        0x01    /* buffer for read */\n#define BLK_WRITE       0x02    /* buffer for write */\n#define BLK_META        0x10    /* buffer for metadata */\n/*\n * modifier for above flags...  if set, getblk will only return\n * a bp that is already valid... i.e. found in the cache\n */\n#define BLK_ONLYVALID   0x80000000\n\n/*!\n *  @function buf_getblk\n *  @abstract Traditional buffer cache routine to get a buffer corresponding to a logical block in a file.\n *  @discussion buf_getblk() gets a buffer, not necessarily containing valid data, representing a block in a file.\n *  A metadata buffer will be returned with its own zone-allocated storage, managed by the traditional buffer-cache\n *  layer, whereas data buffers will be returned hooked into backing by the UBC (which in fact controls the caching of data).\n *  buf_getblk() first looks for the buffer header in cache; if the buffer is in-core but busy, buf_getblk() will wait for it to become\n *  unbusy, depending on the slpflag and slptimeo parameters. If the buffer is found unbusy and is a metadata buffer,\n *  it must already contain valid data and will be returned directly; data buffers will have a UPL configured to\n *  prepare for interaction with the underlying UBC.  If the buffer is found in core, it will be marked as such\n *  and buf_fromcache() will return truth. A buffer is allocated and initialized (but not filled with data)\n *  if none is found in core. buf_bread(), buf_breadn(), buf_meta_bread(), and buf_meta_breadn() all\n *  return buffers obtained with buf_getblk().\n *  @param vp File for which to get block.\n *  @param blkno Logical block number.\n *  @param size Size of block.\n *  @param slpflag Flag to pass to msleep() while waiting for buffer to become unbusy.\n *  @param slptimeo Time, in milliseconds, to wait for buffer to become unbusy.  0 means to wait indefinitely.\n *  @param operation BLK_READ: want a read buffer.  BLK_WRITE: want a write buffer.  BLK_META: want a metadata buffer.  BLK_ONLYVALID:\n *  only return buffers which are found in core (do not allocate anew), and do not change buffer size.  The last remark means\n *  that if a given logical block is found in core with a different size than what is requested, the buffer size will not be modified.\n *  @return Buffer found in core or newly allocated, either containing valid data or ready for I/O.\n */\nbuf_t   buf_getblk(vnode_t vp, daddr64_t blkno, int size, int slpflag, int slptimeo, int operation);\n\n/*!\n *  @function buf_geteblk\n *  @abstract Get a metadata buffer which is marked invalid and not associated with any vnode.\n *  @discussion A buffer is returned with zone-allocated storage of the specified size, marked B_META and invalid.\n *  It has no vnode and is not visible in the buffer hash.\n *  @param size Size of buffer.\n *  @return Always returns a new buffer.\n */\nbuf_t   buf_geteblk(int size);\n\n/*!\n *  @function buf_clear_redundancy_flags\n *  @abstract Clear flags on a buffer.\n *  @discussion buffer_redundancy_flags &= ~flags\n *  @param bp Buffer whose flags to clear.\n *  @param flags Flags to remove from buffer's mask\n */\nvoid    buf_clear_redundancy_flags(buf_t bp, uint32_t flags);\n\n/*!\n *  @function buf_redundancyflags\n *  @abstract Get redundancy flags set on a buffer.\n *  @param bp Buffer whose redundancy flags to grab.\n *  @return flags.\n */\nuint32_t        buf_redundancy_flags(buf_t bp);\n\n/*!\n *  @function buf_setredundancyflags\n *  @abstract Set redundancy flags on a buffer.\n *  @discussion buffer_redundancy_flags |= flags\n *  @param bp Buffer whose flags to set.\n *  @param flags Flags to add to buffer's redundancy flags\n */\nvoid    buf_set_redundancy_flags(buf_t bp, uint32_t flags);\n\n/*!\n *  @function buf_attr\n *  @abstract Gets the attributes for this buf.\n *  @param bp Buffer whose attributes to get.\n *  @return bufattr_t.\n */\nbufattr_t buf_attr(buf_t bp);\n\n/*!\n *  @function buf_markstatic\n *  @abstract Mark a buffer as being likely to contain static data.\n *  @param bp Buffer to mark.\n */\nvoid buf_markstatic(buf_t bp);\n\n/*!\n *  @function buf_static\n *  @abstract Check if a buffer contains static data.\n *  @param bp Buffer to test.\n *  @return Nonzero if buffer has static data, 0 otherwise.\n */\nint     buf_static(buf_t bp);\n\n/*!\n *  @function bufattr_markiosched\n *  @abstract Mark a buffer as belonging to an io scheduled mount point\n *  @param bap Buffer attributes to mark.\n *  @discussion Marks the buffer so that spec_strategy() will know that it belongs to an io scheduled mount point\n */\nvoid bufattr_markioscheduled(bufattr_t bap);\n\n/*!\n *  @function bufattr_iosched\n *  @abstract Check if a buffer is marked as io scheduled\n *  @param bap Buffer attributes to test.\n *  @return Nonzero if the buffer is marked io scheduled, 0 otherwise.\n */\nint bufattr_ioscheduled(bufattr_t bap);\n\n/*!\n *  @function bufattr_markexpeditedmeta\n *  @abstract Mark a metadata I/O buffer as expedited (i.e. requires a high I/O tier).\n *  @param bap Buffer attributes to mark.\n *  @discussion Marks the buffer so that spec_strategy() will know that it should be expedited\n */\nvoid bufattr_markexpeditedmeta(bufattr_t bap);\n\n/*!\n *  @function bufattr_expeditedmeta\n *  @abstract Check if a buffer is marked as expedited metadata I/O.\n *  @param bap Buffer attributes to test.\n *  @return Nonzero if the buffer is marked expedited metadata I/O, 0 otherwise.\n */\nint bufattr_expeditedmeta(bufattr_t bap);\n\n\n__END_DECLS\n\n\n/* Macros to clear/set/test flags. */\n#define SET(t, f)       (t) |= (f)\n#define CLR(t, f)       (t) &= ~(f)\n#define ISSET(t, f)     ((t) & (f))\n\n\n#endif /* !_SYS_BUF_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/cdefs.h",
    "content": "/*\n * Copyright (c) 2000-2018 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/* Copyright 1995 NeXT Computer, Inc. All rights reserved. */\n/*\n * Copyright (c) 1991, 1993\n *\tThe Regents of the University of California.  All rights reserved.\n *\n * This code is derived from software contributed to Berkeley by\n * Berkeley Software Design, Inc.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *\tThis product includes software developed by the University of\n *\tCalifornia, Berkeley and its contributors.\n * 4. Neither the name of the University nor the names of its contributors\n *    may be used to endorse or promote products derived from this software\n *    without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n *\t@(#)cdefs.h\t8.8 (Berkeley) 1/9/95\n */\n\n#ifndef _CDEFS_H_\n#define _CDEFS_H_\n\n#if defined(__cplusplus)\n#define __BEGIN_DECLS   extern \"C\" {\n#define __END_DECLS     }\n#else\n#define __BEGIN_DECLS\n#define __END_DECLS\n#endif\n\n/* This SDK is designed to work with clang and specific versions of\n * gcc >= 4.0 with Apple's patch sets */\n#if !defined(__GNUC__) || __GNUC__ < 4\n#warning \"Unsupported compiler detected\"\n#endif\n\n/*\n * Compatibility with compilers and environments that don't support compiler\n * feature checking function-like macros.\n */\n#ifndef __has_builtin\n#define __has_builtin(x) 0\n#endif\n#ifndef __has_include\n#define __has_include(x) 0\n#endif\n#ifndef __has_feature\n#define __has_feature(x) 0\n#endif\n#ifndef __has_attribute\n#define __has_attribute(x) 0\n#endif\n#ifndef __has_extension\n#define __has_extension(x) 0\n#endif\n\n/*\n * The __CONCAT macro is used to concatenate parts of symbol names, e.g.\n * with \"#define OLD(foo) __CONCAT(old,foo)\", OLD(foo) produces oldfoo.\n * The __CONCAT macro is a bit tricky -- make sure you don't put spaces\n * in between its arguments.  __CONCAT can also concatenate double-quoted\n * strings produced by the __STRING macro, but this only works with ANSI C.\n */\n#if defined(__STDC__) || defined(__cplusplus)\n#define __P(protos)     protos          /* full-blown ANSI C */\n#define __CONCAT(x, y)   x ## y\n#define __STRING(x)     #x\n\n#define __const         const           /* define reserved names to standard */\n#define __signed        signed\n#define __volatile      volatile\n#if defined(__cplusplus)\n#define __inline        inline          /* convert to C++ keyword */\n#else\n#ifndef __GNUC__\n#define __inline                        /* delete GCC keyword */\n#endif /* !__GNUC__ */\n#endif /* !__cplusplus */\n\n#else   /* !(__STDC__ || __cplusplus) */\n#define __P(protos)     ()              /* traditional C preprocessor */\n#define __CONCAT(x, y)   x /**/ y\n#define __STRING(x)     \"x\"\n\n#ifndef __GNUC__\n#define __const                         /* delete pseudo-ANSI C keywords */\n#define __inline\n#define __signed\n#define __volatile\n#endif  /* !__GNUC__ */\n\n/*\n * In non-ANSI C environments, new programs will want ANSI-only C keywords\n * deleted from the program and old programs will want them left alone.\n * When using a compiler other than gcc, programs using the ANSI C keywords\n * const, inline etc. as normal identifiers should define -DNO_ANSI_KEYWORDS.\n * When using \"gcc -traditional\", we assume that this is the intent; if\n * __GNUC__ is defined but __STDC__ is not, we leave the new keywords alone.\n */\n#ifndef NO_ANSI_KEYWORDS\n#define const           __const                 /* convert ANSI C keywords */\n#define inline          __inline\n#define signed          __signed\n#define volatile        __volatile\n#endif /* !NO_ANSI_KEYWORDS */\n#endif /* !(__STDC__ || __cplusplus) */\n\n/*\n * __pure2 can be used for functions that are only a function of their scalar\n * arguments (meaning they can't dereference pointers).\n *\n * __stateful_pure can be used for functions that have no side effects,\n * but depend on the state of the memory.\n */\n#define __dead2         __attribute__((__noreturn__))\n#define __pure2         __attribute__((__const__))\n#define __stateful_pure __attribute__((__pure__))\n\n/* __unused denotes variables and functions that may not be used, preventing\n * the compiler from warning about it if not used.\n */\n#define __unused        __attribute__((__unused__))\n\n/* __used forces variables and functions to be included even if it appears\n * to the compiler that they are not used (and would thust be discarded).\n */\n#define __used          __attribute__((__used__))\n\n/* __cold marks code used for debugging or that is rarely taken\n * and tells the compiler to optimize for size and outline code.\n */\n#if __has_attribute(cold)\n#define __cold          __attribute__((__cold__))\n#else\n#define __cold\n#endif\n\n/* __exported denotes symbols that should be exported even when symbols\n * are hidden by default.\n * __exported_push/_exported_pop are pragmas used to delimit a range of\n *  symbols that should be exported even when symbols are hidden by default.\n */\n#define __exported      __attribute__((__visibility__(\"default\")))\n#define __exported_push _Pragma(\"GCC visibility push(default)\")\n#define __exported_pop  _Pragma(\"GCC visibility pop\")\n\n/* __deprecated causes the compiler to produce a warning when encountering\n * code using the deprecated functionality.\n * __deprecated_msg() does the same, and compilers that support it will print\n * a message along with the deprecation warning.\n * This may require turning on such warning with the -Wdeprecated flag.\n * __deprecated_enum_msg() should be used on enums, and compilers that support\n * it will print the deprecation warning.\n * __kpi_deprecated() specifically indicates deprecation of kernel programming\n * interfaces in Kernel.framework used by KEXTs.\n */\n#define __deprecated    __attribute__((__deprecated__))\n\n#if __has_extension(attribute_deprecated_with_message) || \\\n        (defined(__GNUC__) && ((__GNUC__ >= 5) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5))))\n\t#define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))\n#else\n\t#define __deprecated_msg(_msg) __attribute__((__deprecated__))\n#endif\n\n#if __has_extension(enumerator_attributes)\n\t#define __deprecated_enum_msg(_msg) __deprecated_msg(_msg)\n#else\n\t#define __deprecated_enum_msg(_msg)\n#endif\n\n#define __kpi_deprecated(_msg)\n\n/* __unavailable causes the compiler to error out when encountering\n * code using the tagged function\n */\n#if __has_attribute(unavailable)\n#define __unavailable __attribute__((__unavailable__))\n#else\n#define __unavailable\n#endif\n\n#define __kpi_unavailable\n\n#define __kpi_deprecated_arm64_macos_unavailable\n\n/* Delete pseudo-keywords wherever they are not available or needed. */\n#ifndef __dead\n#define __dead\n#define __pure\n#endif\n\n/*\n * We use `__restrict' as a way to define the `restrict' type qualifier\n * without disturbing older software that is unaware of C99 keywords.\n */\n#if __STDC_VERSION__ < 199901\n#define __restrict\n#else\n#define __restrict      restrict\n#endif\n\n/* Compatibility with compilers and environments that don't support the\n * nullability feature.\n */\n\n#if !__has_feature(nullability)\n#ifndef __nullable\n#define __nullable\n#endif\n#ifndef __nonnull\n#define __nonnull\n#endif\n#ifndef __null_unspecified\n#define __null_unspecified\n#endif\n#ifndef _Nullable\n#define _Nullable\n#endif\n#ifndef _Nonnull\n#define _Nonnull\n#endif\n#ifndef _Null_unspecified\n#define _Null_unspecified\n#endif\n#endif\n\n/*\n * __disable_tail_calls causes the compiler to not perform tail call\n * optimization inside the marked function.\n */\n#if __has_attribute(disable_tail_calls)\n#define __disable_tail_calls    __attribute__((__disable_tail_calls__))\n#else\n#define __disable_tail_calls\n#endif\n\n/*\n * __not_tail_called causes the compiler to prevent tail call optimization\n * on statically bound calls to the function.  It has no effect on indirect\n * calls.  Virtual functions, objective-c methods, and functions marked as\n * \"always_inline\" cannot be marked as __not_tail_called.\n */\n#if __has_attribute(not_tail_called)\n#define __not_tail_called       __attribute__((__not_tail_called__))\n#else\n#define __not_tail_called\n#endif\n\n/*\n * __result_use_check warns callers of a function that not using the function\n * return value is a bug, i.e. dismissing malloc() return value results in a\n * memory leak.\n */\n#if __has_attribute(warn_unused_result)\n#define __result_use_check __attribute__((__warn_unused_result__))\n#else\n#define __result_use_check\n#endif\n\n/*\n * __swift_unavailable causes the compiler to mark a symbol as specifically\n * unavailable in Swift, regardless of any other availability in C.\n */\n#if __has_feature(attribute_availability_swift)\n#define __swift_unavailable(_msg)       __attribute__((__availability__(swift, unavailable, message=_msg)))\n#else\n#define __swift_unavailable(_msg)\n#endif\n\n/*\n * __abortlike is the attribute to put on functions like abort() that are\n * typically used to mark assertions. These optimize the codegen\n * for outlining while still maintaining debugability.\n */\n#ifndef __abortlike\n#define __abortlike __dead2 __cold __not_tail_called\n#endif\n\n/* Declaring inline functions within headers is error-prone due to differences\n * across various versions of the C language and extensions.  __header_inline\n * can be used to declare inline functions within system headers.  In cases\n * where you want to force inlining instead of letting the compiler make\n * the decision, you can use __header_always_inline.\n *\n * Be aware that using inline for functions which compilers may also provide\n * builtins can behave differently under various compilers.  If you intend to\n * provide an inline version of such a function, you may want to use a macro\n * instead.\n *\n * The check for !__GNUC__ || __clang__ is because gcc doesn't correctly\n * support c99 inline in some cases:\n * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55965\n */\n\n#if defined(__cplusplus) || \\\n        (__STDC_VERSION__ >= 199901L && \\\n        !defined(__GNUC_GNU_INLINE__) && \\\n        (!defined(__GNUC__) || defined(__clang__)))\n# define __header_inline           inline\n#elif defined(__GNUC__) && defined(__GNUC_STDC_INLINE__)\n# define __header_inline           extern __inline __attribute__((__gnu_inline__))\n#elif defined(__GNUC__)\n# define __header_inline           extern __inline\n#else\n/* If we land here, we've encountered an unsupported compiler,\n * so hopefully it understands static __inline as a fallback.\n */\n# define __header_inline           static __inline\n#endif\n\n#ifdef __GNUC__\n# define __header_always_inline    __header_inline __attribute__ ((__always_inline__))\n#else\n/* Unfortunately, we're using a compiler that we don't know how to force to\n * inline.  Oh well.\n */\n# define __header_always_inline    __header_inline\n#endif\n\n/*\n * Compiler-dependent macros that bracket portions of code where the\n * \"-Wunreachable-code\" warning should be ignored. Please use sparingly.\n */\n#if defined(__clang__)\n# define __unreachable_ok_push \\\n\t _Pragma(\"clang diagnostic push\") \\\n\t _Pragma(\"clang diagnostic ignored \\\"-Wunreachable-code\\\"\")\n# define __unreachable_ok_pop \\\n\t _Pragma(\"clang diagnostic pop\")\n#elif defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))\n# define __unreachable_ok_push \\\n\t _Pragma(\"GCC diagnostic push\") \\\n\t _Pragma(\"GCC diagnostic ignored \\\"-Wunreachable-code\\\"\")\n# define __unreachable_ok_pop \\\n\t _Pragma(\"GCC diagnostic pop\")\n#else\n# define __unreachable_ok_push\n# define __unreachable_ok_pop\n#endif\n\n/*\n * Compiler-dependent macros to declare that functions take printf-like\n * or scanf-like arguments.  They are null except for versions of gcc\n * that are known to support the features properly.  Functions declared\n * with these attributes will cause compilation warnings if there is a\n * mismatch between the format string and subsequent function parameter\n * types.\n */\n#define __printflike(fmtarg, firstvararg) \\\n\t        __attribute__((__format__ (__printf__, fmtarg, firstvararg)))\n#define __printf0like(fmtarg, firstvararg) \\\n\t        __attribute__((__format__ (__printf0__, fmtarg, firstvararg)))\n#define __scanflike(fmtarg, firstvararg) \\\n\t        __attribute__((__format__ (__scanf__, fmtarg, firstvararg)))\n\n#define __IDSTRING(name, string) static const char name[] __used = string\n\n#ifndef __COPYRIGHT\n#define __COPYRIGHT(s) __IDSTRING(copyright,s)\n#endif\n\n#ifndef __RCSID\n#define __RCSID(s) __IDSTRING(rcsid,s)\n#endif\n\n#ifndef __SCCSID\n#define __SCCSID(s) __IDSTRING(sccsid,s)\n#endif\n\n#ifndef __PROJECT_VERSION\n#define __PROJECT_VERSION(s) __IDSTRING(project_version,s)\n#endif\n\n/* Source compatibility only, ID string not emitted in object file */\n#ifndef __FBSDID\n#define __FBSDID(s)\n#endif\n\n#ifndef __DECONST\n#define __DECONST(type, var)    __CAST_AWAY_QUALIFIER(var, const, type)\n#endif\n\n#ifndef __DEVOLATILE\n#define __DEVOLATILE(type, var) __CAST_AWAY_QUALIFIER(var, volatile, type)\n#endif\n\n#ifndef __DEQUALIFY\n#define __DEQUALIFY(type, var)  __CAST_AWAY_QUALIFIER(var, const volatile, type)\n#endif\n\n/*\n * __alloc_size can be used to label function arguments that represent the\n * size of memory that the function allocates and returns. The one-argument\n * form labels a single argument that gives the allocation size (where the\n * arguments are numbered from 1):\n *\n * void\t*malloc(size_t __size) __alloc_size(1);\n *\n * The two-argument form handles the case where the size is calculated as the\n * product of two arguments:\n *\n * void\t*calloc(size_t __count, size_t __size) __alloc_size(1,2);\n */\n#ifndef __alloc_size\n#if __has_attribute(alloc_size)\n#define __alloc_size(...) __attribute__((alloc_size(__VA_ARGS__)))\n#else\n#define __alloc_size(...)\n#endif\n#endif // __alloc_size\n\n/*\n * COMPILATION ENVIRONMENTS -- see compat(5) for additional detail\n *\n * DEFAULT\tBy default newly complied code will get POSIX APIs plus\n *\t\tApple API extensions in scope.\n *\n *\t\tMost users will use this compilation environment to avoid\n *\t\tbehavioral differences between 32 and 64 bit code.\n *\n * LEGACY\tDefining _NONSTD_SOURCE will get pre-POSIX APIs plus Apple\n *\t\tAPI extensions in scope.\n *\n *\t\tThis is generally equivalent to the Tiger release compilation\n *\t\tenvironment, except that it cannot be applied to 64 bit code;\n *\t\tits use is discouraged.\n *\n *\t\tWe expect this environment to be deprecated in the future.\n *\n * STRICT\tDefining _POSIX_C_SOURCE or _XOPEN_SOURCE restricts the\n *\t\tavailable APIs to exactly the set of APIs defined by the\n *\t\tcorresponding standard, based on the value defined.\n *\n *\t\tA correct, portable definition for _POSIX_C_SOURCE is 200112L.\n *\t\tA correct, portable definition for _XOPEN_SOURCE is 600L.\n *\n *\t\tApple API extensions are not visible in this environment,\n *\t\twhich can cause Apple specific code to fail to compile,\n *\t\tor behave incorrectly if prototypes are not in scope or\n *\t\twarnings about missing prototypes are not enabled or ignored.\n *\n * In any compilation environment, for correct symbol resolution to occur,\n * function prototypes must be in scope.  It is recommended that all Apple\n * tools users add either the \"-Wall\" or \"-Wimplicit-function-declaration\"\n * compiler flags to their projects to be warned when a function is being\n * used without a prototype in scope.\n */\n\n/* These settings are particular to each product. */\n/* Platform: MacOSX */\n#if defined(__i386__)\n#define __DARWIN_ONLY_64_BIT_INO_T      0\n#define __DARWIN_ONLY_UNIX_CONFORMANCE  0\n#define __DARWIN_ONLY_VERS_1050         0\n#elif defined(__x86_64__)\n#define __DARWIN_ONLY_64_BIT_INO_T      0\n#define __DARWIN_ONLY_UNIX_CONFORMANCE  1\n#define __DARWIN_ONLY_VERS_1050         0\n#else\n#define __DARWIN_ONLY_64_BIT_INO_T      1\n#define __DARWIN_ONLY_UNIX_CONFORMANCE  1\n#define __DARWIN_ONLY_VERS_1050         1\n#endif\n\n/*\n * The __DARWIN_ALIAS macros are used to do symbol renaming; they allow\n * legacy code to use the old symbol, thus maintaining binary compatibility\n * while new code can use a standards compliant version of the same function.\n *\n * __DARWIN_ALIAS is used by itself if the function signature has not\n * changed, it is used along with a #ifdef check for __DARWIN_UNIX03\n * if the signature has changed.  Because the __LP64__ environment\n * only supports UNIX03 semantics it causes __DARWIN_UNIX03 to be\n * defined, but causes __DARWIN_ALIAS to do no symbol mangling.\n *\n * As a special case, when XCode is used to target a specific version of the\n * OS, the manifest constant __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__\n * will be defined by the compiler, with the digits representing major version\n * time 100 + minor version times 10 (e.g. 10.5 := 1050).  If we are targeting\n * pre-10.5, and it is the default compilation environment, revert the\n * compilation environment to pre-__DARWIN_UNIX03.\n */\n#if !defined(__DARWIN_UNIX03)\n#  if   __DARWIN_ONLY_UNIX_CONFORMANCE\n#    if defined(_NONSTD_SOURCE)\n#      error \"Can't define _NONSTD_SOURCE when only UNIX conformance is available.\"\n#    endif /* _NONSTD_SOURCE */\n#    define __DARWIN_UNIX03     1\n#  elif defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && ((__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ - 0) < 1040)\n#    define __DARWIN_UNIX03     0\n#  elif defined(_DARWIN_C_SOURCE) || defined(_XOPEN_SOURCE) || defined(_POSIX_C_SOURCE)\n#    if defined(_NONSTD_SOURCE)\n#      error \"Can't define both _NONSTD_SOURCE and any of _DARWIN_C_SOURCE, _XOPEN_SOURCE or _POSIX_C_SOURCE.\"\n#    endif /* _NONSTD_SOURCE */\n#    define __DARWIN_UNIX03     1\n#  elif defined(_NONSTD_SOURCE)\n#    define __DARWIN_UNIX03     0\n#  else /* default */\n#    if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && ((__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ - 0) < 1050)\n#      define __DARWIN_UNIX03   0\n#    else /* __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1050 */\n#      define __DARWIN_UNIX03   1\n#    endif /* __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1050 */\n#  endif /* _DARWIN_C_SOURCE || _XOPEN_SOURCE || _POSIX_C_SOURCE || __LP64__ */\n#endif /* !__DARWIN_UNIX03 */\n\n#if !defined(__DARWIN_64_BIT_INO_T)\n#  if   defined(_DARWIN_USE_64_BIT_INODE)\n#    if defined(_DARWIN_NO_64_BIT_INODE)\n#      error \"Can't define both _DARWIN_USE_64_BIT_INODE and _DARWIN_NO_64_BIT_INODE.\"\n#    endif /* _DARWIN_NO_64_BIT_INODE */\n#    define __DARWIN_64_BIT_INO_T 1\n#  elif defined(_DARWIN_NO_64_BIT_INODE)\n#    if __DARWIN_ONLY_64_BIT_INO_T\n#      error \"Can't define _DARWIN_NO_64_BIT_INODE when only 64-bit inodes are available.\"\n#    endif /* __DARWIN_ONLY_64_BIT_INO_T */\n#    define __DARWIN_64_BIT_INO_T 0\n#  else /* default */\n#    if __DARWIN_ONLY_64_BIT_INO_T\n#      define __DARWIN_64_BIT_INO_T 1\n#    elif defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && ((__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ - 0) < 1060) || __DARWIN_UNIX03 == 0\n#      define __DARWIN_64_BIT_INO_T 0\n#    else /* default */\n#      define __DARWIN_64_BIT_INO_T 1\n#    endif /* __DARWIN_ONLY_64_BIT_INO_T */\n#  endif\n#endif /* !__DARWIN_64_BIT_INO_T */\n\n#if !defined(__DARWIN_VERS_1050)\n#  if   __DARWIN_ONLY_VERS_1050\n#    define __DARWIN_VERS_1050 1\n#  elif defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && ((__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ - 0) < 1050) || __DARWIN_UNIX03 == 0\n#    define __DARWIN_VERS_1050 0\n#  else /* default */\n#    define __DARWIN_VERS_1050 1\n#  endif\n#endif /* !__DARWIN_VERS_1050 */\n\n#if !defined(__DARWIN_NON_CANCELABLE)\n#    define __DARWIN_NON_CANCELABLE 0\n#endif /* !__DARWIN_NON_CANCELABLE */\n\n/*\n * symbol suffixes used for symbol versioning\n */\n#if __DARWIN_UNIX03\n#  if __DARWIN_ONLY_UNIX_CONFORMANCE\n#    define __DARWIN_SUF_UNIX03         /* nothing */\n#  else /* !__DARWIN_ONLY_UNIX_CONFORMANCE */\n#    define __DARWIN_SUF_UNIX03         \"$UNIX2003\"\n#  endif /* __DARWIN_ONLY_UNIX_CONFORMANCE */\n\n#  if __DARWIN_64_BIT_INO_T\n#    if __DARWIN_ONLY_64_BIT_INO_T\n#      define __DARWIN_SUF_64_BIT_INO_T /* nothing */\n#    else /* !__DARWIN_ONLY_64_BIT_INO_T */\n#      define __DARWIN_SUF_64_BIT_INO_T \"$INODE64\"\n#    endif /* __DARWIN_ONLY_64_BIT_INO_T */\n#  else /* !__DARWIN_64_BIT_INO_T */\n#    define __DARWIN_SUF_64_BIT_INO_T   /* nothing */\n#  endif /* __DARWIN_64_BIT_INO_T */\n\n#  if __DARWIN_VERS_1050\n#    if __DARWIN_ONLY_VERS_1050\n#      define __DARWIN_SUF_1050         /* nothing */\n#    else /* !__DARWIN_ONLY_VERS_1050 */\n#      define __DARWIN_SUF_1050         \"$1050\"\n#    endif /* __DARWIN_ONLY_VERS_1050 */\n#  else /* !__DARWIN_VERS_1050 */\n#    define __DARWIN_SUF_1050           /* nothing */\n#  endif /* __DARWIN_VERS_1050 */\n\n#  if __DARWIN_NON_CANCELABLE\n#    define __DARWIN_SUF_NON_CANCELABLE \"$NOCANCEL\"\n#  else /* !__DARWIN_NON_CANCELABLE */\n#    define __DARWIN_SUF_NON_CANCELABLE /* nothing */\n#  endif /* __DARWIN_NON_CANCELABLE */\n\n#else /* !__DARWIN_UNIX03 */\n#  define __DARWIN_SUF_UNIX03           /* nothing */\n#  define __DARWIN_SUF_64_BIT_INO_T     /* nothing */\n#  define __DARWIN_SUF_NON_CANCELABLE   /* nothing */\n#  define __DARWIN_SUF_1050             /* nothing */\n#endif /* __DARWIN_UNIX03 */\n\n#define __DARWIN_SUF_EXTSN              \"$DARWIN_EXTSN\"\n\n/*\n * symbol versioning macros\n */\n#define __DARWIN_ALIAS(sym)             __asm(\"_\" __STRING(sym) __DARWIN_SUF_UNIX03)\n#define __DARWIN_ALIAS_C(sym)           __asm(\"_\" __STRING(sym) __DARWIN_SUF_NON_CANCELABLE __DARWIN_SUF_UNIX03)\n#define __DARWIN_ALIAS_I(sym)           __asm(\"_\" __STRING(sym) __DARWIN_SUF_64_BIT_INO_T __DARWIN_SUF_UNIX03)\n#define __DARWIN_NOCANCEL(sym)          __asm(\"_\" __STRING(sym) __DARWIN_SUF_NON_CANCELABLE)\n#define __DARWIN_INODE64(sym)           __asm(\"_\" __STRING(sym) __DARWIN_SUF_64_BIT_INO_T)\n\n#define __DARWIN_1050(sym)              __asm(\"_\" __STRING(sym) __DARWIN_SUF_1050)\n#define __DARWIN_1050ALIAS(sym)         __asm(\"_\" __STRING(sym) __DARWIN_SUF_1050 __DARWIN_SUF_UNIX03)\n#define __DARWIN_1050ALIAS_C(sym)       __asm(\"_\" __STRING(sym) __DARWIN_SUF_1050 __DARWIN_SUF_NON_CANCELABLE __DARWIN_SUF_UNIX03)\n#define __DARWIN_1050ALIAS_I(sym)       __asm(\"_\" __STRING(sym) __DARWIN_SUF_1050 __DARWIN_SUF_64_BIT_INO_T __DARWIN_SUF_UNIX03)\n#define __DARWIN_1050INODE64(sym)       __asm(\"_\" __STRING(sym) __DARWIN_SUF_1050 __DARWIN_SUF_64_BIT_INO_T)\n\n#define __DARWIN_EXTSN(sym)             __asm(\"_\" __STRING(sym) __DARWIN_SUF_EXTSN)\n#define __DARWIN_EXTSN_C(sym)           __asm(\"_\" __STRING(sym) __DARWIN_SUF_EXTSN __DARWIN_SUF_NON_CANCELABLE)\n\n/*\n * symbol release macros\n */\n#include <sys/_symbol_aliasing.h>\n\n#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__)\n#define __DARWIN_ALIAS_STARTING(_mac, _iphone, x)   __DARWIN_ALIAS_STARTING_IPHONE_##_iphone(x)\n#elif defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__)\n#define __DARWIN_ALIAS_STARTING(_mac, _iphone, x)   __DARWIN_ALIAS_STARTING_MAC_##_mac(x)\n#else\n#define __DARWIN_ALIAS_STARTING(_mac, _iphone, x)   x\n#endif\n\n\n/*\n * POSIX.1 requires that the macros we test be defined before any standard\n * header file is included.  This permits us to convert values for feature\n * testing, as necessary, using only _POSIX_C_SOURCE.\n *\n * Here's a quick run-down of the versions:\n *  defined(_POSIX_SOURCE)\t\t1003.1-1988\n *  _POSIX_C_SOURCE == 1L\t\t1003.1-1990\n *  _POSIX_C_SOURCE == 2L\t\t1003.2-1992 C Language Binding Option\n *  _POSIX_C_SOURCE == 199309L\t\t1003.1b-1993\n *  _POSIX_C_SOURCE == 199506L\t\t1003.1c-1995, 1003.1i-1995,\n *\t\t\t\t\tand the omnibus ISO/IEC 9945-1: 1996\n *  _POSIX_C_SOURCE == 200112L\t\t1003.1-2001\n *  _POSIX_C_SOURCE == 200809L\t\t1003.1-2008\n *\n * In addition, the X/Open Portability Guide, which is now the Single UNIX\n * Specification, defines a feature-test macro which indicates the version of\n * that specification, and which subsumes _POSIX_C_SOURCE.\n */\n\n/* Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1L. */\n#if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE == 1L\n#undef _POSIX_C_SOURCE\n#define _POSIX_C_SOURCE         199009L\n#endif\n\n/* Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2L. */\n#if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE == 2L\n#undef _POSIX_C_SOURCE\n#define _POSIX_C_SOURCE         199209L\n#endif\n\n/* Deal with various X/Open Portability Guides and Single UNIX Spec. */\n#ifdef _XOPEN_SOURCE\n#if _XOPEN_SOURCE - 0L >= 700L && (!defined(_POSIX_C_SOURCE) || _POSIX_C_SOURCE - 0L < 200809L)\n#undef _POSIX_C_SOURCE\n#define _POSIX_C_SOURCE         200809L\n#elif _XOPEN_SOURCE - 0L >= 600L && (!defined(_POSIX_C_SOURCE) || _POSIX_C_SOURCE - 0L < 200112L)\n#undef _POSIX_C_SOURCE\n#define _POSIX_C_SOURCE         200112L\n#elif _XOPEN_SOURCE - 0L >= 500L && (!defined(_POSIX_C_SOURCE) || _POSIX_C_SOURCE - 0L < 199506L)\n#undef _POSIX_C_SOURCE\n#define _POSIX_C_SOURCE         199506L\n#endif\n#endif\n\n/*\n * Deal with all versions of POSIX.  The ordering relative to the tests above is\n * important.\n */\n#if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE)\n#define _POSIX_C_SOURCE         198808L\n#endif\n\n/* POSIX C deprecation macros */\n#include <sys/_posix_availability.h>\n\n#define __POSIX_C_DEPRECATED(ver) ___POSIX_C_DEPRECATED_STARTING_##ver\n\n/*\n * Set a single macro which will always be defined and can be used to determine\n * the appropriate namespace.  For POSIX, these values will correspond to\n * _POSIX_C_SOURCE value.  Currently there are two additional levels corresponding\n * to ANSI (_ANSI_SOURCE) and Darwin extensions (_DARWIN_C_SOURCE)\n */\n#define __DARWIN_C_ANSI         010000L\n#define __DARWIN_C_FULL         900000L\n\n#if   defined(_ANSI_SOURCE)\n#define __DARWIN_C_LEVEL        __DARWIN_C_ANSI\n#elif defined(_POSIX_C_SOURCE) && !defined(_DARWIN_C_SOURCE) && !defined(_NONSTD_SOURCE)\n#define __DARWIN_C_LEVEL        _POSIX_C_SOURCE\n#else\n#define __DARWIN_C_LEVEL        __DARWIN_C_FULL\n#endif\n\n/* If the developer has neither requested a strict language mode nor a version\n * of POSIX, turn on functionality provided by __STDC_WANT_LIB_EXT1__ as part\n * of __DARWIN_C_FULL.\n */\n#if !defined(__STDC_WANT_LIB_EXT1__) && !defined(__STRICT_ANSI__) && __DARWIN_C_LEVEL >= __DARWIN_C_FULL\n#define __STDC_WANT_LIB_EXT1__ 1\n#endif\n\n/*\n * long long is not supported in c89 (__STRICT_ANSI__), but g++ -ansi and\n * c99 still want long longs.  While not perfect, we allow long longs for\n * g++.\n */\n#if (defined(__STRICT_ANSI__) && (__STDC_VERSION__ - 0 < 199901L) && !defined(__GNUG__))\n#define __DARWIN_NO_LONG_LONG 1\n#else\n#define __DARWIN_NO_LONG_LONG 0\n#endif\n\n/*****************************************\n*  Public darwin-specific feature macros\n*****************************************/\n\n/*\n * _DARWIN_FEATURE_64_BIT_INODE indicates that the ino_t type is 64-bit, and\n * structures modified for 64-bit inodes (like struct stat) will be used.\n */\n#if __DARWIN_64_BIT_INO_T\n#define _DARWIN_FEATURE_64_BIT_INODE            1\n#endif\n\n/*\n * _DARWIN_FEATURE_64_ONLY_BIT_INODE indicates that the ino_t type may only\n * be 64-bit; there is no support for 32-bit ino_t when this macro is defined\n * (and non-zero).  There is no struct stat64 either, as the regular\n * struct stat will already be the 64-bit version.\n */\n#if __DARWIN_ONLY_64_BIT_INO_T\n#define _DARWIN_FEATURE_ONLY_64_BIT_INODE       1\n#endif\n\n/*\n * _DARWIN_FEATURE_ONLY_VERS_1050 indicates that only those APIs updated\n * in 10.5 exists; no pre-10.5 variants are available.\n */\n#if __DARWIN_ONLY_VERS_1050\n#define _DARWIN_FEATURE_ONLY_VERS_1050          1\n#endif\n\n/*\n * _DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE indicates only UNIX conforming API\n * are available (the legacy BSD APIs are not available)\n */\n#if __DARWIN_ONLY_UNIX_CONFORMANCE\n#define _DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE   1\n#endif\n\n/*\n * _DARWIN_FEATURE_UNIX_CONFORMANCE indicates whether UNIX conformance is on,\n * and specifies the conformance level (3 is SUSv3)\n */\n#if __DARWIN_UNIX03\n#define _DARWIN_FEATURE_UNIX_CONFORMANCE        3\n#endif\n\n\n/*\n * This macro casts away the qualifier from the variable\n *\n * Note: use at your own risk, removing qualifiers can result in\n * catastrophic run-time failures.\n */\n#ifndef __CAST_AWAY_QUALIFIER\n#define __CAST_AWAY_QUALIFIER(variable, qualifier, type)  (type) (long)(variable)\n#endif\n\n/*\n * __XNU_PRIVATE_EXTERN is a linkage decoration indicating that a symbol can be\n * used from other compilation units, but not other libraries or executables.\n */\n#ifndef __XNU_PRIVATE_EXTERN\n#define __XNU_PRIVATE_EXTERN __attribute__((visibility(\"hidden\")))\n#endif\n\n\n/*\n * Architecture validation for current SDK\n */\n#if !defined(__sys_cdefs_arch_unknown__) && defined(__i386__)\n#elif !defined(__sys_cdefs_arch_unknown__) && defined(__x86_64__)\n#elif !defined(__sys_cdefs_arch_unknown__) && defined(__arm__)\n#elif !defined(__sys_cdefs_arch_unknown__) && defined(__arm64__)\n#else\n#error Unsupported architecture\n#endif\n\n\n\n#define __compiler_barrier() __asm__ __volatile__(\"\" ::: \"memory\")\n\n#if __has_attribute(enum_extensibility)\n#define __enum_open __attribute__((__enum_extensibility__(open)))\n#define __enum_closed __attribute__((__enum_extensibility__(closed)))\n#else\n#define __enum_open\n#define __enum_closed\n#endif // __has_attribute(enum_extensibility)\n\n#if __has_attribute(flag_enum)\n#define __enum_options __attribute__((__flag_enum__))\n#else\n#define __enum_options\n#endif\n\n/*\n * Similar to OS_ENUM/OS_CLOSED_ENUM/OS_OPTIONS/OS_CLOSED_OPTIONS\n *\n * This provides more advanced type checking on compilers supporting\n * the proper extensions, even in C.\n */\n#if __has_feature(objc_fixed_enum) || __has_extension(cxx_fixed_enum) || \\\n        __has_extension(cxx_strong_enums)\n#define __enum_decl(_name, _type, ...) \\\n\t        typedef enum : _type __VA_ARGS__ __enum_open _name\n#define __enum_closed_decl(_name, _type, ...) \\\n\t        typedef enum : _type __VA_ARGS__ __enum_closed _name\n#define __options_decl(_name, _type, ...) \\\n\t        typedef enum : _type __VA_ARGS__ __enum_open __enum_options _name\n#define __options_closed_decl(_name, _type, ...) \\\n\t        typedef enum : _type __VA_ARGS__ __enum_closed __enum_options _name\n#else\n#define __enum_decl(_name, _type, ...) \\\n\t        typedef _type _name; enum __VA_ARGS__ __enum_open\n#define __enum_closed_decl(_name, _type, ...) \\\n\t        typedef _type _name; enum __VA_ARGS__ __enum_closed\n#define __options_decl(_name, _type, ...) \\\n\t        typedef _type _name; enum __VA_ARGS__ __enum_open __enum_options\n#define __options_closed_decl(_name, _type, ...) \\\n\t        typedef _type _name; enum __VA_ARGS__ __enum_closed __enum_options\n#endif\n\n\n#define __kernel_ptr_semantics\n#define __kernel_data_semantics\n#define __kernel_dual_semantics\n\n\n#endif /* !_CDEFS_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/clonefile.h",
    "content": "/*\n * Copyright (c) 2015-2017 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n\n#ifndef _SYS_CLONEFILE_H_\n#define _SYS_CLONEFILE_H_\n\n/* Options for clonefile calls */\n#define CLONE_NOFOLLOW      0x0001     /* Don't follow symbolic links */\n#define CLONE_NOOWNERCOPY   0x0002     /* Don't copy ownership information from source */\n\n\n#include <sys/cdefs.h>\n#include <machine/_types.h>\n#include <_types/_uint32_t.h>\n#include <Availability.h>\n\n__BEGIN_DECLS\n\nint clonefileat(int, const char *, int, const char *, uint32_t) __OSX_AVAILABLE(10.12) __IOS_AVAILABLE(10.0) __TVOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0);\n\nint fclonefileat(int, int, const char *, uint32_t) __OSX_AVAILABLE(10.12) __IOS_AVAILABLE(10.0) __TVOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0);\n\nint clonefile(const char *, const char *, uint32_t) __OSX_AVAILABLE(10.12) __IOS_AVAILABLE(10.0) __TVOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0);\n\n__END_DECLS\n\n\n#endif /* _SYS_CLONEFILE_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/commpage.h",
    "content": "/*\n * Copyright (c) 2017 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n#ifndef _COMMPAGE_H\n#define _COMMPAGE_H\n\n\n#endif\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/conf.h",
    "content": "/*\n * Copyright (c) 2000-2012 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */\n/*-\n * Copyright (c) 1990, 1993\n *\tThe Regents of the University of California.  All rights reserved.\n * (c) UNIX System Laboratories, Inc.\n * All or some portions of this file are derived from material licensed\n * to the University of California by American Telephone and Telegraph\n * Co. or Unix System Laboratories, Inc. and are reproduced herein with\n * the permission of UNIX System Laboratories, Inc.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *\tThis product includes software developed by the University of\n *\tCalifornia, Berkeley and its contributors.\n * 4. Neither the name of the University nor the names of its contributors\n *    may be used to endorse or promote products derived from this software\n *    without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n *\t@(#)conf.h\t8.5 (Berkeley) 1/9/95\n */\n\n#ifndef _SYS_CONF_H_\n#define _SYS_CONF_H_ 1\n\n#include <sys/appleapiopts.h>\n#include <sys/cdefs.h>\n#include <sys/queue.h>\n#include <stdint.h>\n\n/*\n * Definitions of device driver entry switches\n */\n\nstruct buf;\nstruct proc;\nstruct tty;\nstruct uio;\nstruct vnode;\n\n/*\n * Types for d_type.\n * These are returned by ioctl FIODTYPE\n */\n#define D_TAPE  1\n#define D_DISK  2\n#define D_TTY   3\n\n\n\n\n\n\n#endif /* _SYS_CONF_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/dir.h",
    "content": "/*\n * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */\n/*\n * Copyright (c) 1982, 1986, 1989, 1993\n *\tThe Regents of the University of California.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *\tThis product includes software developed by the University of\n *\tCalifornia, Berkeley and its contributors.\n * 4. Neither the name of the University nor the names of its contributors\n *    may be used to endorse or promote products derived from this software\n *    without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n *\t@(#)dir.h\t8.2 (Berkeley) 1/4/94\n */\n\n/*\n * The information in this file should be obtained from <dirent.h>\n * and is provided solely (and temporarily) for backward compatibility.\n */\n\n#ifndef _SYS_DIR_H_\n#define _SYS_DIR_H_\n\n#include <dirent.h>\n\n#ifndef __OBJC__\n\n/*\n * Backwards compatibility.\n */\n#define direct dirent\n\n/*\n * The DIRSIZ macro gives the minimum record length which will hold\n * the directory entry.  This requires the amount of space in struct direct\n * without the d_name field, plus enough space for the name with a terminating\n * null byte (dp->d_namlen+1), rounded up to a 4 byte boundary.\n */\n#undef DIRSIZ\n#define DIRSIZ(dp) \\\n    (((unsigned long)&((struct direct *)0)->d_name + (dp)->d_namlen+1 + 3) & ~3)\n\n#endif /* __OBJC__ */\n\n#endif /* !_SYS_DIR_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/dirent.h",
    "content": "/*\n * Copyright (c) 2000-2008 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */\n/*-\n * Copyright (c) 1989, 1993\n *\tThe Regents of the University of California.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *\tThis product includes software developed by the University of\n *\tCalifornia, Berkeley and its contributors.\n * 4. Neither the name of the University nor the names of its contributors\n *    may be used to endorse or promote products derived from this software\n *    without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n *\t@(#)dirent.h\t8.3 (Berkeley) 8/10/94\n */\n\n/*\n * The dirent structure defines the format of directory entries.\n *\n * A directory entry has a struct dirent at the front of it, containing its\n * inode number, the length of the entry, and the length of the name\n * contained in the entry.  These are followed by the name padded to a 4\n * byte boundary with null bytes.  All names are guaranteed null terminated.\n * The maximum length of a name in a directory is MAXNAMLEN when 32-bit\n * ino_t is in effect; (MAXPATHLEN - 1) when 64-bit ino_t is in effect.\n */\n\n#ifndef _SYS_DIRENT_H\n#define _SYS_DIRENT_H\n\n#include <sys/_types.h>\n#include <sys/cdefs.h>\n\n#include <sys/_types/_ino_t.h>\n\n\n#define __DARWIN_MAXNAMLEN      255\n\n#pragma pack(4)\n\n#if !__DARWIN_64_BIT_INO_T\nstruct dirent {\n\tino_t d_ino;                    /* file number of entry */\n\t__uint16_t d_reclen;            /* length of this record */\n\t__uint8_t  d_type;              /* file type, see below */\n\t__uint8_t  d_namlen;            /* length of string in d_name */\n\tchar d_name[__DARWIN_MAXNAMLEN + 1];    /* name must be no longer than this */\n};\n#endif /* !__DARWIN_64_BIT_INO_T */\n\n#pragma pack()\n\n#define __DARWIN_MAXPATHLEN     1024\n\n#define __DARWIN_STRUCT_DIRENTRY { \\\n\t__uint64_t  d_ino;      /* file number of entry */ \\\n\t__uint64_t  d_seekoff;  /* seek offset (optional, used by servers) */ \\\n\t__uint16_t  d_reclen;   /* length of this record */ \\\n\t__uint16_t  d_namlen;   /* length of string in d_name */ \\\n\t__uint8_t   d_type;     /* file type, see below */ \\\n\tchar      d_name[__DARWIN_MAXPATHLEN]; /* entry name (up to MAXPATHLEN bytes) */ \\\n}\n\n#if __DARWIN_64_BIT_INO_T\nstruct dirent __DARWIN_STRUCT_DIRENTRY;\n#endif /* __DARWIN_64_BIT_INO_T */\n\n\n\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n#define d_fileno        d_ino           /* backward compatibility */\n#define MAXNAMLEN       __DARWIN_MAXNAMLEN\n/*\n * File types\n */\n#define DT_UNKNOWN       0\n#define DT_FIFO          1\n#define DT_CHR           2\n#define DT_DIR           4\n#define DT_BLK           6\n#define DT_REG           8\n#define DT_LNK          10\n#define DT_SOCK         12\n#define DT_WHT          14\n\n/*\n * Convert between stat structure types and directory types.\n */\n#define IFTODT(mode)    (((mode) & 0170000) >> 12)\n#define DTTOIF(dirtype) ((dirtype) << 12)\n#endif\n\n\n#endif /* _SYS_DIRENT_H  */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/disk.h",
    "content": "/*\n * Copyright (c) 1998-2014 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n\n#ifndef _SYS_DISK_H_\n#define _SYS_DISK_H_\n\n#include <stdint.h>\n#include <sys/ioctl.h>\n\n\n/*\n * Definitions\n *\n * ioctl                                 description\n * ------------------------------------- ---------------------------------------\n * DKIOCEJECT                            eject media\n * DKIOCSYNCHRONIZE                      flush media\n *\n * DKIOCFORMAT                           format media\n * DKIOCGETFORMATCAPACITIES              get media's formattable capacities\n *\n * DKIOCGETBLOCKSIZE                     get media's block size\n * DKIOCGETBLOCKCOUNT                    get media's block count\n * DKIOCGETFIRMWAREPATH                  get media's firmware path\n *\n * DKIOCISFORMATTED                      is media formatted?\n * DKIOCISWRITABLE                       is media writable?\n *\n * DKIOCREQUESTIDLE                      idle media\n * DKIOCUNMAP                            delete unused data\n *\n * DKIOCGETLOCATION                      get device's physical location\n *\n * DKIOCGETMAXBLOCKCOUNTREAD             get maximum block count for reads\n * DKIOCGETMAXBLOCKCOUNTWRITE            get maximum block count for writes\n * DKIOCGETMAXBYTECOUNTREAD              get maximum byte count for reads\n * DKIOCGETMAXBYTECOUNTWRITE             get maximum byte count for writes\n *\n * DKIOCGETMAXSEGMENTCOUNTREAD           get maximum segment count for reads\n * DKIOCGETMAXSEGMENTCOUNTWRITE          get maximum segment count for writes\n * DKIOCGETMAXSEGMENTBYTECOUNTREAD       get maximum segment byte count for reads\n * DKIOCGETMAXSEGMENTBYTECOUNTWRITE      get maximum segment byte count for writes\n *\n * DKIOCGETMINSEGMENTALIGNMENTBYTECOUNT  get minimum segment alignment in bytes\n * DKIOCGETMAXSEGMENTADDRESSABLEBITCOUNT get maximum segment width in bits\n *\n * DKIOCGETFEATURES                      get device's feature set\n * DKIOCGETPHYSICALBLOCKSIZE             get device's block size\n * DKIOCGETCOMMANDPOOLSIZE               get device's queue depth\n *\n * DKIOCGETPROVISIONSTATUS               get device's block provision status\n * DKIOCGETIOMINSATURATIONBYTECOUNT      get minimum byte count to saturate storage bandwidth\n *\n * DKIOCGETERRORDESCRIPTION              get description of any drive error\n *\n * DKIOCGETMAXSWAPWRITE                  get maximum swap file write per day in bytes\n */\n\n#define DK_FEATURE_BARRIER                    0x00000002\n#define DK_FEATURE_PRIORITY                   0x00000004\n#define DK_FEATURE_UNMAP                      0x00000010\n\n#define DK_SYNCHRONIZE_OPTION_BARRIER         0x00000002\n\ntypedef struct{\n\tuint64_t               offset;\n\tuint64_t               length;\n} dk_extent_t;\n\ntypedef struct{\n\tchar                   path[128];\n} dk_firmware_path_t;\n\ntypedef struct{\n\tuint64_t               blockCount;\n\tuint32_t               blockSize;\n\n\tuint8_t                reserved0096[4];    /* reserved, clear to zero */\n} dk_format_capacity_t;\n\ntypedef struct{\n\tdk_format_capacity_t * capacities;\n\tuint32_t               capacitiesCount;    /* use zero to probe count */\n\n#ifdef __LP64__\n\tuint8_t                reserved0096[4];    /* reserved, clear to zero */\n#else /* !__LP64__ */\n\tuint8_t                reserved0064[8];    /* reserved, clear to zero */\n#endif /* !__LP64__ */\n} dk_format_capacities_t;\n\ntypedef struct{\n\tuint64_t               offset;\n\tuint64_t               length;\n\n\tuint32_t               options;\n\n\tuint8_t                reserved0160[4];    /* reserved, clear to zero */\n} dk_synchronize_t;\n\ntypedef struct{\n\tdk_extent_t *          extents;\n\tuint32_t               extentsCount;\n\n\tuint32_t               options;\n\n#ifndef __LP64__\n\tuint8_t                reserved0096[4];    /* reserved, clear to zero */\n#endif /* !__LP64__ */\n} dk_unmap_t;\n\ntypedef struct{\n\tuint64_t           flags;\n\tuint64_t           hotfile_size;           /* in bytes */\n\tuint64_t           hibernate_minsize;\n\tuint64_t           swapfile_pinning;\n\n\tuint64_t           padding[4];\n} dk_corestorage_info_t;\n\n#define DK_CORESTORAGE_PIN_YOUR_METADATA        0x00000001\n#define DK_CORESTORAGE_ENABLE_HOTFILES          0x00000002\n#define DK_CORESTORAGE_PIN_YOUR_SWAPFILE        0x00000004\n\n#define DK_PROVISION_TYPE_MAPPED                0x00\n#define DK_PROVISION_TYPE_DEALLOCATED           0x01\n#define DK_PROVISION_TYPE_ANCHORED              0x02\n\ntypedef struct{\n\tuint64_t           offset;\n\tuint64_t           length;\n\tuint8_t            provisionType;\n\tuint8_t            reserved[7];\n} dk_provision_extent_t;\n\ntypedef struct{\n\tuint64_t                offset;         /* input:        logical byte offset */\n\tuint64_t                length;         /* input:        byte length, 0 for whole length */\n\tuint64_t                options;        /*               reserved, clear to zero */\n\tuint32_t                reserved;       /*               not used */\n\tuint32_t                extentsCount;   /* input/output: count for extents */\n\tdk_provision_extent_t * extents;        /* output:       provision extents */\n} dk_provision_status_t;\n\ntypedef struct{\n\tuint64_t               options;        /*               reserved, clear to zero */\n\tuint64_t               reserved;       /*               reserved, clear to zero */\n\tuint64_t               description_size;\n\tchar *                 description;\n} dk_error_description_t;\n\n#define DK_LOCATION_INTERNAL                   0x00000000\n#define DK_LOCATION_EXTERNAL                   0x00000001\n\n\n#define DKIOCEJECT                            _IO('d', 21)\n#define DKIOCSYNCHRONIZE                      _IOW('d', 22, dk_synchronize_t)\n\n#define DKIOCFORMAT                           _IOW('d', 26, dk_format_capacity_t)\n#define DKIOCGETFORMATCAPACITIES              _IOWR('d', 26, dk_format_capacities_t)\n\n#define DKIOCGETBLOCKSIZE                     _IOR('d', 24, uint32_t)\n#define DKIOCGETBLOCKCOUNT                    _IOR('d', 25, uint64_t)\n#define DKIOCGETFIRMWAREPATH                  _IOR('d', 28, dk_firmware_path_t)\n\n#define DKIOCISFORMATTED                      _IOR('d', 23, uint32_t)\n#define DKIOCISWRITABLE                       _IOR('d', 29, uint32_t)\n\n#define DKIOCREQUESTIDLE                      _IO('d', 30)\n#define DKIOCUNMAP                            _IOW('d', 31, dk_unmap_t)\n#define DKIOCCORESTORAGE                      _IOR('d', 32, dk_corestorage_info_t)\n\n#define DKIOCGETLOCATION                      _IOR('d', 33, uint64_t)\n\n#define DKIOCGETMAXBLOCKCOUNTREAD             _IOR('d', 64, uint64_t)\n#define DKIOCGETMAXBLOCKCOUNTWRITE            _IOR('d', 65, uint64_t)\n#define DKIOCGETMAXBYTECOUNTREAD              _IOR('d', 70, uint64_t)\n#define DKIOCGETMAXBYTECOUNTWRITE             _IOR('d', 71, uint64_t)\n\n#define DKIOCGETMAXSEGMENTCOUNTREAD           _IOR('d', 66, uint64_t)\n#define DKIOCGETMAXSEGMENTCOUNTWRITE          _IOR('d', 67, uint64_t)\n#define DKIOCGETMAXSEGMENTBYTECOUNTREAD       _IOR('d', 68, uint64_t)\n#define DKIOCGETMAXSEGMENTBYTECOUNTWRITE      _IOR('d', 69, uint64_t)\n\n#define DKIOCGETMINSEGMENTALIGNMENTBYTECOUNT  _IOR('d', 74, uint64_t)\n#define DKIOCGETMAXSEGMENTADDRESSABLEBITCOUNT _IOR('d', 75, uint64_t)\n\n#define DKIOCGETFEATURES                      _IOR('d', 76, uint32_t)\n#define DKIOCGETPHYSICALBLOCKSIZE             _IOR('d', 77, uint32_t)\n#define DKIOCGETCOMMANDPOOLSIZE               _IOR('d', 78, uint32_t)\n\n#define DKIOCGETPROVISIONSTATUS               _IOWR('d', 79, dk_provision_status_t)\n\n#define DKIOCGETERRORDESCRIPTION              _IOR('d', 80, dk_error_description_t)\n\n#define DKIOCSYNCHRONIZECACHE                 _IO('d', 22)\n\n\n\n#endif  /* _SYS_DISK_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/dkstat.h",
    "content": "/*\n * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */\n/*-\n * Copyright (c) 1990, 1993\n *\tThe Regents of the University of California.  All rights reserved.\n * (c) UNIX System Laboratories, Inc.\n * All or some portions of this file are derived from material licensed\n * to the University of California by American Telephone and Telegraph\n * Co. or Unix System Laboratories, Inc. and are reproduced herein with\n * the permission of UNIX System Laboratories, Inc.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *\tThis product includes software developed by the University of\n *\tCalifornia, Berkeley and its contributors.\n * 4. Neither the name of the University nor the names of its contributors\n *    may be used to endorse or promote products derived from this software\n *    without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n *\t@(#)dkstat.h\t8.2 (Berkeley) 1/21/94\n */\n\n#ifndef _SYS_DKSTAT_H_\n#define _SYS_DKSTAT_H_\n\n\n#endif  /* _SYS_DKSTAT_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/domain.h",
    "content": "/*\n * Copyright (c) 2000-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/* Copyright (c) 1998, 1999 Apple Computer, Inc. All Rights Reserved */\n/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */\n/*\n * Copyright (c) 1982, 1986, 1993\n *\tThe Regents of the University of California.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *\tThis product includes software developed by the University of\n *\tCalifornia, Berkeley and its contributors.\n * 4. Neither the name of the University nor the names of its contributors\n *    may be used to endorse or promote products derived from this software\n *    without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n *\t@(#)domain.h\t8.1 (Berkeley) 6/2/93\n * $FreeBSD: src/sys/sys/domain.h,v 1.14 1999/12/29 04:24:40 peter Exp $\n */\n\n#ifndef _SYS_DOMAIN_H_\n#define _SYS_DOMAIN_H_\n\n#endif  /* _SYS_DOMAIN_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/dtrace.h",
    "content": "/*\n * CDDL HEADER START\n *\n * The contents of this file are subject to the terms of the\n * Common Development and Distribution License (the \"License\").\n * You may not use this file except in compliance with the License.\n *\n * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE\n * or http://www.opensolaris.org/os/licensing.\n * See the License for the specific language governing permissions\n * and limitations under the License.\n *\n * When distributing Covered Code, include this CDDL HEADER in each\n * file and include the License file at usr/src/OPENSOLARIS.LICENSE.\n * If applicable, add the following below this CDDL HEADER, with the\n * fields enclosed by brackets \"[]\" replaced with your own identifying\n * information: Portions Copyright [yyyy] [name of copyright owner]\n *\n * CDDL HEADER END\n */\n\n/*\n * Portions copyright (c) 2013, Joyent, Inc. All rights reserved.\n * Portions Copyright (c) 2013 by Delphix. All rights reserved.\n */\n\n/*\n * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.\n * Use is subject to license terms.\n *\n * Portions Copyright (c) 2012 by Delphix. All rights reserved.\n */\n\n#ifndef _SYS_DTRACE_H\n#define _SYS_DTRACE_H\n\n#ifdef  __cplusplus\nextern \"C\" {\n#endif\n\n/*\n * DTrace Dynamic Tracing Software: Kernel Interfaces\n *\n * Note: The contents of this file are private to the implementation of the\n * Solaris system and DTrace subsystem and are subject to change at any time\n * without notice.  Applications and drivers using these interfaces will fail\n * to run on future releases.  These interfaces should not be used for any\n * purpose except those expressly outlined in dtrace(7D) and libdtrace(3LIB).\n * Please refer to the \"Solaris Dynamic Tracing Guide\" for more information.\n */\n\n#ifndef _ASM\n\n#if !defined(__APPLE__)\n#include <sys/types.h>\n#include <sys/modctl.h>\n#include <sys/processor.h>\n#include <sys/systm.h>\n#include <sys/ctf_api.h>\n#include <sys/cyclic.h>\n#include <sys/int_limits.h>\n#else /* is Apple Mac OS X */\n\n#if defined(__LP64__)\n#if !defined(_LP64)\n#define _LP64 /* Solaris vs. Darwin */\n#endif\n#else\n#if !defined(_ILP32)\n#define _ILP32 /* Solaris vs. Darwin */\n#endif\n#endif\n\n#if defined(__BIG_ENDIAN__)\n#if !defined(_BIG_ENDIAN)\n#define _BIG_ENDIAN /* Solaris vs. Darwin */\n#endif\n#elif defined(__LITTLE_ENDIAN__)\n#if !defined(_LITTLE_ENDIAN)\n#define _LITTLE_ENDIAN /* Solaris vs. Darwin */\n#endif\n#else\n#error Unknown endian-ness\n#endif\n\n\n#include <sys/types.h>\n#include <sys/param.h>\n#include <stdint.h>\n\n#ifndef NULL\n#define NULL ((void *)0) /* quiets many warnings */\n#endif\n\n#define SEC\t\t\t1\n#define MILLISEC\t1000\n#define MICROSEC\t1000000\n#define NANOSEC\t\t1000000000\n\n#define S_ROUND(x, a)   ((x) + (((a) ? (a) : 1) - 1) & ~(((a) ? (a) : 1) - 1))\n#define P2ROUNDUP(x, align)             (-(-(x) & -(align)))\n#define\tP2PHASEUP(x, align, phase)\t((phase) - (((phase) - (x)) & -(align)))\n\n#define\tCTF_MODEL_ILP32\t1\t/* object data model is ILP32 */\n#define\tCTF_MODEL_LP64\t2\t/* object data model is LP64 */\n#ifdef __LP64__\n#define\tCTF_MODEL_NATIVE\tCTF_MODEL_LP64\n#else\n#define\tCTF_MODEL_NATIVE\tCTF_MODEL_ILP32\n#endif\n\ntypedef uint8_t\t\tuchar_t;\ntypedef uint16_t\tushort_t;\ntypedef uint32_t\tuint_t;\ntypedef unsigned long\tulong_t;\ntypedef uint64_t\tu_longlong_t;\ntypedef int64_t\t\tlonglong_t;\ntypedef int64_t\t\toff64_t;\ntypedef int\t\t\tprocessorid_t;\ntypedef int64_t\t\thrtime_t;\n\ntypedef enum { B_FALSE = 0, B_TRUE = 1 } _dtrace_boolean;\n\ntypedef uint8_t UUID[16]; /* For modctl use in dtrace.h */\n\nstruct modctl; /* In lieu of Solaris <sys/modctl.h> */\n/* NOTHING */  /* In lieu of Solaris <sys/processor.h> */\n#include <sys/ioctl.h> /* In lieu of Solaris <sys/systm.h> */\n/* In lieu of Solaris <sys/ctf_api.h> */\ntypedef struct ctf_file ctf_file_t;\ntypedef long ctf_id_t;\n/* NOTHING */ /* In lieu of Solaris <sys/cyclic.h> */\n/* NOTHING */ /* In lieu of Solaris <sys/int_limits.h> */\n\ntypedef uint32_t        zoneid_t;\n\n#include <sys/dtrace_glue.h>\n\n#include <stdarg.h> \ntypedef va_list __va_list;\n\n/* Solaris proc_t is the struct. Darwin's proc_t is a pointer to it. */\n#define proc_t struct proc /* Steer clear of the Darwin typedef for proc_t */\n\n#include <os/overflow.h>\n#endif /* __APPLE__ */\n\n/*\n * DTrace Universal Constants and Typedefs\n */\n#define\tDTRACE_CPUALL\t\t-1\t/* all CPUs */\n#define\tDTRACE_IDNONE\t\t0\t/* invalid probe identifier */\n#define\tDTRACE_EPIDNONE\t\t0\t/* invalid enabled probe identifier */\n#define\tDTRACE_AGGIDNONE\t0\t/* invalid aggregation identifier */\n#define\tDTRACE_AGGVARIDNONE\t0\t/* invalid aggregation variable ID */\n#define\tDTRACE_CACHEIDNONE\t0\t/* invalid predicate cache */\n#define\tDTRACE_PROVNONE\t\t0\t/* invalid provider identifier */\n#define\tDTRACE_METAPROVNONE\t0\t/* invalid meta-provider identifier */\n#define\tDTRACE_ARGNONE\t\t-1\t/* invalid argument index */\n\n#define\tDTRACE_PROVNAMELEN\t64\n#define\tDTRACE_MODNAMELEN\t64\n#define\tDTRACE_FUNCNAMELEN\t128\n#define\tDTRACE_NAMELEN\t\t64\n#define\tDTRACE_FULLNAMELEN\t(DTRACE_PROVNAMELEN + DTRACE_MODNAMELEN + \\\n\t\t\t\tDTRACE_FUNCNAMELEN + DTRACE_NAMELEN + 4)\n#define\tDTRACE_ARGTYPELEN\t128\n\ntypedef uint32_t dtrace_id_t;\t\t/* probe identifier */\ntypedef uint32_t dtrace_epid_t;\t\t/* enabled probe identifier */\ntypedef uint32_t dtrace_aggid_t;\t/* aggregation identifier */\ntypedef int64_t dtrace_aggvarid_t;\t/* aggregation variable identifier */\ntypedef uint16_t dtrace_actkind_t;\t/* action kind */\ntypedef int64_t dtrace_optval_t;\t/* option value */\ntypedef uint32_t dtrace_cacheid_t;\t/* predicate cache identifier */\n\ntypedef enum dtrace_probespec {\n        DTRACE_PROBESPEC_NONE = -1,\n        DTRACE_PROBESPEC_PROVIDER = 0,\n        DTRACE_PROBESPEC_MOD,\n        DTRACE_PROBESPEC_FUNC,\n        DTRACE_PROBESPEC_NAME\n} dtrace_probespec_t;\n\n/*\n * DTrace Intermediate Format (DIF)\n *\n * The following definitions describe the DTrace Intermediate Format (DIF), a\n * a RISC-like instruction set and program encoding used to represent\n * predicates and actions that can be bound to DTrace probes.  The constants\n * below defining the number of available registers are suggested minimums; the\n * compiler should use DTRACEIOC_CONF to dynamically obtain the number of\n * registers provided by the current DTrace implementation.\n */\n#define\tDIF_VERSION_1\t1\t\t/* DIF version 1: Solaris 10 Beta */\n#define\tDIF_VERSION_2\t2\t\t/* DIF version 2: Solaris 10 FCS */\n#define\tDIF_VERSION\tDIF_VERSION_2\t/* latest DIF instruction set version */\n#define\tDIF_DIR_NREGS\t8\t\t/* number of DIF integer registers */\n#define\tDIF_DTR_NREGS\t8\t\t/* number of DIF tuple registers */\n\n#define\tDIF_OP_OR\t1\t\t/* or\tr1, r2, rd */\n#define\tDIF_OP_XOR\t2\t\t/* xor\tr1, r2, rd */\n#define\tDIF_OP_AND\t3\t\t/* and\tr1, r2, rd */\n#define\tDIF_OP_SLL\t4\t\t/* sll\tr1, r2, rd */\n#define\tDIF_OP_SRL\t5\t\t/* srl\tr1, r2, rd */\n#define\tDIF_OP_SUB\t6\t\t/* sub\tr1, r2, rd */\n#define\tDIF_OP_ADD\t7\t\t/* add\tr1, r2, rd */\n#define\tDIF_OP_MUL\t8\t\t/* mul\tr1, r2, rd */\n#define\tDIF_OP_SDIV\t9\t\t/* sdiv\tr1, r2, rd */\n#define\tDIF_OP_UDIV\t10\t\t/* udiv r1, r2, rd */\n#define\tDIF_OP_SREM\t11\t\t/* srem r1, r2, rd */\n#define\tDIF_OP_UREM\t12\t\t/* urem r1, r2, rd */\n#define\tDIF_OP_NOT\t13\t\t/* not\tr1, rd */\n#define\tDIF_OP_MOV\t14\t\t/* mov\tr1, rd */\n#define\tDIF_OP_CMP\t15\t\t/* cmp\tr1, r2 */\n#define\tDIF_OP_TST\t16\t\t/* tst  r1 */\n#define\tDIF_OP_BA\t17\t\t/* ba\tlabel */\n#define\tDIF_OP_BE\t18\t\t/* be\tlabel */\n#define\tDIF_OP_BNE\t19\t\t/* bne\tlabel */\n#define\tDIF_OP_BG\t20\t\t/* bg\tlabel */\n#define\tDIF_OP_BGU\t21\t\t/* bgu\tlabel */\n#define\tDIF_OP_BGE\t22\t\t/* bge\tlabel */\n#define\tDIF_OP_BGEU\t23\t\t/* bgeu\tlabel */\n#define\tDIF_OP_BL\t24\t\t/* bl\tlabel */\n#define\tDIF_OP_BLU\t25\t\t/* blu\tlabel */\n#define\tDIF_OP_BLE\t26\t\t/* ble\tlabel */\n#define\tDIF_OP_BLEU\t27\t\t/* bleu\tlabel */\n#define\tDIF_OP_LDSB\t28\t\t/* ldsb\t[r1], rd */\n#define\tDIF_OP_LDSH\t29\t\t/* ldsh\t[r1], rd */\n#define\tDIF_OP_LDSW\t30\t\t/* ldsw [r1], rd */\n#define\tDIF_OP_LDUB\t31\t\t/* ldub\t[r1], rd */\n#define\tDIF_OP_LDUH\t32\t\t/* lduh\t[r1], rd */\n#define\tDIF_OP_LDUW\t33\t\t/* lduw\t[r1], rd */\n#define\tDIF_OP_LDX\t34\t\t/* ldx\t[r1], rd */\n#define\tDIF_OP_RET\t35\t\t/* ret\trd */\n#define\tDIF_OP_NOP\t36\t\t/* nop */\n#define\tDIF_OP_SETX\t37\t\t/* setx\tintindex, rd */\n#define\tDIF_OP_SETS\t38\t\t/* sets strindex, rd */\n#define\tDIF_OP_SCMP\t39\t\t/* scmp\tr1, r2 */\n#define\tDIF_OP_LDGA\t40\t\t/* ldga\tvar, ri, rd */\n#define\tDIF_OP_LDGS\t41\t\t/* ldgs var, rd */\n#define\tDIF_OP_STGS\t42\t\t/* stgs var, rs */\n#define\tDIF_OP_LDTA\t43\t\t/* ldta var, ri, rd */\n#define\tDIF_OP_LDTS\t44\t\t/* ldts var, rd */\n#define\tDIF_OP_STTS\t45\t\t/* stts var, rs */\n#define\tDIF_OP_SRA\t46\t\t/* sra\tr1, r2, rd */\n#define\tDIF_OP_CALL\t47\t\t/* call\tsubr, rd */\n#define\tDIF_OP_PUSHTR\t48\t\t/* pushtr type, rs, rr */\n#define\tDIF_OP_PUSHTV\t49\t\t/* pushtv type, rs, rv */\n#define\tDIF_OP_POPTS\t50\t\t/* popts */\n#define\tDIF_OP_FLUSHTS\t51\t\t/* flushts */\n#define\tDIF_OP_LDGAA\t52\t\t/* ldgaa var, rd */\n#define\tDIF_OP_LDTAA\t53\t\t/* ldtaa var, rd */\n#define\tDIF_OP_STGAA\t54\t\t/* stgaa var, rs */\n#define\tDIF_OP_STTAA\t55\t\t/* sttaa var, rs */\n#define\tDIF_OP_LDLS\t56\t\t/* ldls\tvar, rd */\n#define\tDIF_OP_STLS\t57\t\t/* stls\tvar, rs */\n#define\tDIF_OP_ALLOCS\t58\t\t/* allocs r1, rd */\n#define\tDIF_OP_COPYS\t59\t\t/* copys  r1, r2, rd */\n#define\tDIF_OP_STB\t60\t\t/* stb\tr1, [rd] */\n#define\tDIF_OP_STH\t61\t\t/* sth\tr1, [rd] */\n#define\tDIF_OP_STW\t62\t\t/* stw\tr1, [rd] */\n#define\tDIF_OP_STX\t63\t\t/* stx\tr1, [rd] */\n#define\tDIF_OP_ULDSB\t64\t\t/* uldsb [r1], rd */\n#define\tDIF_OP_ULDSH\t65\t\t/* uldsh [r1], rd */\n#define\tDIF_OP_ULDSW\t66\t\t/* uldsw [r1], rd */\n#define\tDIF_OP_ULDUB\t67\t\t/* uldub [r1], rd */\n#define\tDIF_OP_ULDUH\t68\t\t/* ulduh [r1], rd */\n#define\tDIF_OP_ULDUW\t69\t\t/* ulduw [r1], rd */\n#define\tDIF_OP_ULDX\t70\t\t/* uldx  [r1], rd */\n#define\tDIF_OP_RLDSB\t71\t\t/* rldsb [r1], rd */\n#define\tDIF_OP_RLDSH\t72\t\t/* rldsh [r1], rd */\n#define\tDIF_OP_RLDSW\t73\t\t/* rldsw [r1], rd */\n#define\tDIF_OP_RLDUB\t74\t\t/* rldub [r1], rd */\n#define\tDIF_OP_RLDUH\t75\t\t/* rlduh [r1], rd */\n#define\tDIF_OP_RLDUW\t76\t\t/* rlduw [r1], rd */\n#define\tDIF_OP_RLDX\t77\t\t/* rldx  [r1], rd */\n#define\tDIF_OP_XLATE\t78\t\t/* xlate xlrindex, rd */\n#define\tDIF_OP_XLARG\t79\t\t/* xlarg xlrindex, rd */\n#define\tDIF_OP_STRIP\t80\t\t/* strip r1, key, rd */\n\n#define\tDIF_INTOFF_MAX\t\t0xffff\t/* highest integer table offset */\n#define\tDIF_STROFF_MAX\t\t0xffff\t/* highest string table offset */\n#define\tDIF_REGISTER_MAX\t0xff\t/* highest register number */\n#define\tDIF_VARIABLE_MAX\t0xffff\t/* highest variable identifier */\n#define\tDIF_SUBROUTINE_MAX\t0xffff\t/* highest subroutine code */\n\n#define\tDIF_VAR_ARRAY_MIN\t0x0000\t/* lowest numbered array variable */\n#define\tDIF_VAR_ARRAY_UBASE\t0x0080\t/* lowest user-defined array */\n#define\tDIF_VAR_ARRAY_MAX\t0x00ff\t/* highest numbered array variable */\n\n#define\tDIF_VAR_OTHER_MIN\t0x0100\t/* lowest numbered scalar or assc */\n#define\tDIF_VAR_OTHER_UBASE\t0x0500\t/* lowest user-defined scalar or assc */\n#define\tDIF_VAR_OTHER_MAX\t0xffff\t/* highest numbered scalar or assc */\n\n#define\tDIF_VAR_ARGS\t\t0x0000\t/* arguments array */\n#define\tDIF_VAR_REGS\t\t0x0001\t/* registers array */\n#define\tDIF_VAR_UREGS\t\t0x0002\t/* user registers array */\n#define\tDIF_VAR_VMREGS\t\t0x0003\t/* virtual machine registers array */\n#define\tDIF_VAR_CURTHREAD\t0x0100\t/* thread pointer */\n#define\tDIF_VAR_TIMESTAMP\t0x0101\t/* timestamp */\n#define\tDIF_VAR_VTIMESTAMP\t0x0102\t/* virtual timestamp */\n#define\tDIF_VAR_IPL\t\t0x0103\t/* interrupt priority level */\n#define\tDIF_VAR_EPID\t\t0x0104\t/* enabled probe ID */\n#define\tDIF_VAR_ID\t\t0x0105\t/* probe ID */\n#define\tDIF_VAR_ARG0\t\t0x0106\t/* first argument */\n#define\tDIF_VAR_ARG1\t\t0x0107\t/* second argument */\n#define\tDIF_VAR_ARG2\t\t0x0108\t/* third argument */\n#define\tDIF_VAR_ARG3\t\t0x0109\t/* fourth argument */\n#define\tDIF_VAR_ARG4\t\t0x010a\t/* fifth argument */\n#define\tDIF_VAR_ARG5\t\t0x010b\t/* sixth argument */\n#define\tDIF_VAR_ARG6\t\t0x010c\t/* seventh argument */\n#define\tDIF_VAR_ARG7\t\t0x010d\t/* eighth argument */\n#define\tDIF_VAR_ARG8\t\t0x010e\t/* ninth argument */\n#define\tDIF_VAR_ARG9\t\t0x010f\t/* tenth argument */\n#define\tDIF_VAR_STACKDEPTH\t0x0110\t/* stack depth */\n#define\tDIF_VAR_CALLER\t\t0x0111\t/* caller */\n#define\tDIF_VAR_PROBEPROV\t0x0112\t/* probe provider */\n#define\tDIF_VAR_PROBEMOD\t0x0113\t/* probe module */\n#define\tDIF_VAR_PROBEFUNC\t0x0114\t/* probe function */\n#define\tDIF_VAR_PROBENAME\t0x0115\t/* probe name */\n#define\tDIF_VAR_PID\t\t0x0116\t/* process ID */\n#define\tDIF_VAR_TID\t\t0x0117\t/* (per-process) thread ID */\n#define\tDIF_VAR_EXECNAME\t0x0118\t/* name of executable */\n#define\tDIF_VAR_ZONENAME\t0x0119\t/* zone name associated with process */\n#define\tDIF_VAR_WALLTIMESTAMP\t0x011a\t/* wall-clock timestamp */\n#define\tDIF_VAR_USTACKDEPTH\t0x011b\t/* user-land stack depth */\n#define\tDIF_VAR_UCALLER\t\t0x011c\t/* user-level caller */\n#define\tDIF_VAR_PPID\t\t0x011d\t/* parent process ID */\n#define\tDIF_VAR_UID\t\t0x011e\t/* process user ID */\n#define\tDIF_VAR_GID\t\t0x011f\t/* process group ID */\n#define\tDIF_VAR_ERRNO\t\t0x0120\t/* thread errno */\n#if defined(__APPLE__)\n#define DIF_VAR_PTHREAD_SELF\t0x0200\t/* Apple specific PTHREAD_SELF (Not currently supported!) */\n#define DIF_VAR_DISPATCHQADDR\t0x0201\t/* Apple specific dispatch queue addr */\n#define DIF_VAR_MACHTIMESTAMP\t0x0202\t/* mach_absolute_time() */\n#define DIF_VAR_CPU\t\t0x0203\t/* cpu number */\n#define DIF_VAR_CPUINSTRS\t0x0204\t/* cpu instructions */\n#define DIF_VAR_CPUCYCLES\t0x0205\t/* cpu cycles */\n#define DIF_VAR_VINSTRS\t\t0x0206\t/* virtual instructions */\n#define DIF_VAR_VCYCLES\t\t0x0207\t/* virtual cycles */\n#define DIF_VAR_MACHCTIMESTAMP\t0x0208\t/* mach_continuous_time() */\n#endif /* __APPLE __ */\n\n#define\tDIF_SUBR_RAND\t\t\t0\n#define\tDIF_SUBR_MUTEX_OWNED\t\t1\n#define\tDIF_SUBR_MUTEX_OWNER\t\t2\n#define\tDIF_SUBR_MUTEX_TYPE_ADAPTIVE\t3\n#define\tDIF_SUBR_MUTEX_TYPE_SPIN\t4\n#define\tDIF_SUBR_RW_READ_HELD\t\t5\n#define\tDIF_SUBR_RW_WRITE_HELD\t\t6\n#define\tDIF_SUBR_RW_ISWRITER\t\t7\n#define\tDIF_SUBR_COPYIN\t\t\t8\n#define\tDIF_SUBR_COPYINSTR\t\t9\n#define\tDIF_SUBR_SPECULATION\t\t10\n#define\tDIF_SUBR_PROGENYOF\t\t11\n#define\tDIF_SUBR_STRLEN\t\t\t12\n#define\tDIF_SUBR_COPYOUT\t\t13\n#define\tDIF_SUBR_COPYOUTSTR\t\t14\n#define\tDIF_SUBR_ALLOCA\t\t\t15\n#define\tDIF_SUBR_BCOPY\t\t\t16\n#define\tDIF_SUBR_COPYINTO\t\t17\n#define\tDIF_SUBR_MSGDSIZE\t\t18\n#define\tDIF_SUBR_MSGSIZE\t\t19\n#define\tDIF_SUBR_GETMAJOR\t\t20\n#define\tDIF_SUBR_GETMINOR\t\t21\n#define\tDIF_SUBR_DDI_PATHNAME\t\t22\n#define\tDIF_SUBR_STRJOIN\t\t23\n#define\tDIF_SUBR_LLTOSTR\t\t24\n#define\tDIF_SUBR_BASENAME\t\t25\n#define\tDIF_SUBR_DIRNAME\t\t26\n#define\tDIF_SUBR_CLEANPATH\t\t27\n#define\tDIF_SUBR_STRCHR\t\t\t28\n#define\tDIF_SUBR_STRRCHR\t\t29\n#define\tDIF_SUBR_STRSTR\t\t\t30\n#define\tDIF_SUBR_STRTOK\t\t\t31\n#define\tDIF_SUBR_SUBSTR\t\t\t32\n#define\tDIF_SUBR_INDEX\t\t\t33\n#define\tDIF_SUBR_RINDEX\t\t\t34\n#define\tDIF_SUBR_HTONS\t\t\t35\n#define\tDIF_SUBR_HTONL\t\t\t36\n#define\tDIF_SUBR_HTONLL\t\t\t37\n#define\tDIF_SUBR_NTOHS\t\t\t38\n#define\tDIF_SUBR_NTOHL\t\t\t39\n#define\tDIF_SUBR_NTOHLL\t\t\t40\n#define\tDIF_SUBR_INET_NTOP\t\t41\n#define\tDIF_SUBR_INET_NTOA\t\t42\n#define\tDIF_SUBR_INET_NTOA6\t\t43\n#define\tDIF_SUBR_TOUPPER\t\t44\n#define\tDIF_SUBR_TOLOWER\t\t45\n#define DIF_SUBR_JSON\t\t\t46\n#define DIF_SUBR_STRTOLL\t\t47\n#define DIF_SUBR_STRIP\t\t\t48\n#define DIF_SUBR_MAX\t\t\t48      /* max subroutine value */\n\n/* Apple-specific subroutines */\n#if defined(__APPLE__)\n#define DIF_SUBR_APPLE_MIN\t\t200\t/* min apple-specific subroutine value */\n#define DIF_SUBR_VM_KERNEL_ADDRPERM\t200\n#define DIF_SUBR_KDEBUG_TRACE\t\t201\n#define DIF_SUBR_KDEBUG_TRACE_STRING\t202\n#define DIF_SUBR_MTONS\t\t\t203\n#define DIF_SUBR_PHYSMEM_READ\t\t204\n#define DIF_SUBR_PHYSMEM_WRITE\t\t205\n#define DIF_SUBR_KVTOPHYS\t\t206\n#define DIF_SUBR_LIVEDUMP\t\t207\n#define DIF_SUBR_APPLE_MAX\t\t207      /* max apple-specific subroutine value */\n#endif /* __APPLE__ */\n\ntypedef uint32_t dif_instr_t;\n\n#define DIF_INSTR_OP(i)                 (((i) >> 24) & 0xff)\n#define DIF_INSTR_R1(i)                 (((i) >> 16) & 0xff)\n#define DIF_INSTR_R2(i)                 (((i) >>  8) & 0xff)\n#define DIF_INSTR_RD(i)                 ((i) & 0xff)\n#define DIF_INSTR_RS(i)                 ((i) & 0xff)\n#define DIF_INSTR_IMM2(i)               (((i) >>  8) & 0xff)\n#define DIF_INSTR_LABEL(i)              ((i) & 0xffffff)\n#define DIF_INSTR_VAR(i)                (((i) >>  8) & 0xffff)\n#define DIF_INSTR_INTEGER(i)            (((i) >>  8) & 0xffff)\n#define DIF_INSTR_STRING(i)             (((i) >>  8) & 0xffff)\n#define DIF_INSTR_SUBR(i)               (((i) >>  8) & 0xffff)\n#define DIF_INSTR_TYPE(i)               (((i) >> 16) & 0xff)\n#define DIF_INSTR_XLREF(i)              (((i) >>  8) & 0xffff)\n\n#define DIF_INSTR_FMT(op, r1, r2, d) \\\n        (((op) << 24) | ((r1) << 16) | ((r2) << 8) | (d))\n\n#define DIF_INSTR_NOT(r1, d)            (DIF_INSTR_FMT(DIF_OP_NOT, r1, 0, d))\n#define DIF_INSTR_MOV(r1, d)            (DIF_INSTR_FMT(DIF_OP_MOV, r1, 0, d))\n#define DIF_INSTR_CMP(op, r1, r2)       (DIF_INSTR_FMT(op, r1, r2, 0))\n#define DIF_INSTR_TST(r1)               (DIF_INSTR_FMT(DIF_OP_TST, r1, 0, 0))\n#define DIF_INSTR_BRANCH(op, label)     (((op) << 24) | (label))\n#define DIF_INSTR_LOAD(op, r1, d)       (DIF_INSTR_FMT(op, r1, 0, d))\n#define DIF_INSTR_STORE(op, r1, d)      (DIF_INSTR_FMT(op, r1, 0, d))\n#define DIF_INSTR_SETX(i, d)            ((DIF_OP_SETX << 24) | ((i) << 8) | (d))\n#define DIF_INSTR_SETS(s, d)            ((DIF_OP_SETS << 24) | ((s) << 8) | (d))\n#define DIF_INSTR_RET(d)                (DIF_INSTR_FMT(DIF_OP_RET, 0, 0, d))\n#define DIF_INSTR_NOP                   (DIF_OP_NOP << 24)\n#define DIF_INSTR_LDA(op, v, r, d)      (DIF_INSTR_FMT(op, v, r, d))\n#define DIF_INSTR_LDV(op, v, d)         (((op) << 24) | ((v) << 8) | (d))\n#define DIF_INSTR_STV(op, v, rs)        (((op) << 24) | ((v) << 8) | (rs))\n#define DIF_INSTR_CALL(s, d)            ((DIF_OP_CALL << 24) | ((s) << 8) | (d))\n#define DIF_INSTR_PUSHTS(op, t, r2, rs) (DIF_INSTR_FMT(op, t, r2, rs))\n#define DIF_INSTR_POPTS                 (DIF_OP_POPTS << 24)\n#define DIF_INSTR_FLUSHTS               (DIF_OP_FLUSHTS << 24)\n#define DIF_INSTR_ALLOCS(r1, d)         (DIF_INSTR_FMT(DIF_OP_ALLOCS, r1, 0, d))\n#define DIF_INSTR_COPYS(r1, r2, d)      (DIF_INSTR_FMT(DIF_OP_COPYS, r1, r2, d))\n#define DIF_INSTR_XLATE(op, r, d)       (((op) << 24) | ((r) << 8) | (d))\n\n#define DIF_REG_R0      0               /* %r0 is always set to zero */\n\n/*\n * A DTrace Intermediate Format Type (DIF Type) is used to represent the types\n * of variables, function and associative array arguments, and the return type\n * for each DIF object (shown below).  It contains a description of the type,\n * its size in bytes, and a module identifier.\n */\ntypedef struct dtrace_diftype {\n        uint8_t dtdt_kind;              /* type kind (see below) */\n        uint8_t dtdt_ckind;             /* type kind in CTF */\n        uint8_t dtdt_flags;             /* type flags (see below) */\n        uint8_t dtdt_pad;               /* reserved for future use */\n        uint32_t dtdt_size;             /* type size in bytes (unless string) */\n} dtrace_diftype_t;\n\n#define DIF_TYPE_CTF            0       /* type is a CTF type */\n#define DIF_TYPE_STRING         1       /* type is a D string */\n\n#define DIF_TF_BYREF            0x1     /* type is passed by reference */\n#define DIF_TF_BYUREF           0x2     /* user type is passed by reference */\n\n/*\n * A DTrace Intermediate Format variable record is used to describe each of the\n * variables referenced by a given DIF object.  It contains an integer variable\n * identifier along with variable scope and properties, as shown below.  The\n * size of this structure must be sizeof (int) aligned.\n */\ntypedef struct dtrace_difv {\n        uint32_t dtdv_name;             /* variable name index in dtdo_strtab */\n        uint32_t dtdv_id;               /* variable reference identifier */\n        uint8_t dtdv_kind;              /* variable kind (see below) */\n        uint8_t dtdv_scope;             /* variable scope (see below) */\n        uint16_t dtdv_flags;            /* variable flags (see below) */\n        dtrace_diftype_t dtdv_type;     /* variable type (see above) */\n} dtrace_difv_t;\n\n#define DIFV_KIND_ARRAY         0       /* variable is an array of quantities */\n#define DIFV_KIND_SCALAR        1       /* variable is a scalar quantity */\n\n#define DIFV_SCOPE_GLOBAL       0       /* variable has global scope */\n#define DIFV_SCOPE_THREAD       1       /* variable has thread scope */\n#define DIFV_SCOPE_LOCAL        2       /* variable has local scope */\n\n#define DIFV_F_REF              0x1     /* variable is referenced by DIFO */\n#define DIFV_F_MOD              0x2     /* variable is written by DIFO */\n\n/*\n * DTrace Actions\n *\n * The upper byte determines the class of the action; the low bytes determines\n * the specific action within that class.  The classes of actions are as\n * follows:\n *\n *   [ no class ]                  <= May record process- or kernel-related data\n *   DTRACEACT_PROC                <= Only records process-related data\n *   DTRACEACT_PROC_DESTRUCTIVE    <= Potentially destructive to processes\n *   DTRACEACT_KERNEL              <= Only records kernel-related data\n *   DTRACEACT_KERNEL_DESTRUCTIVE  <= Potentially destructive to the kernel\n *   DTRACEACT_SPECULATIVE         <= Speculation-related action\n *   DTRACEACT_AGGREGATION         <= Aggregating action\n */\n#define DTRACEACT_NONE                  0       /* no action */\n#define DTRACEACT_DIFEXPR               1       /* action is DIF expression */\n#define DTRACEACT_EXIT                  2       /* exit() action */\n#define DTRACEACT_PRINTF                3       /* printf() action */\n#define DTRACEACT_PRINTA                4       /* printa() action */\n#define DTRACEACT_LIBACT                5       /* library-controlled action */\n#define DTRACEACT_TRACEMEM              6       /* tracemem() action */\n#define DTRACEACT_TRACEMEM_DYNSIZE      7       /* dynamic tracemem() size */\n\n#if defined(__APPLE__)\n#define DTRACEACT_APPLEBINARY           50      /* Apple DT perf. tool action */\n#endif /* __APPLE__ */\n\n#define DTRACEACT_PROC                  0x0100\n#define DTRACEACT_USTACK                (DTRACEACT_PROC + 1)\n#define DTRACEACT_JSTACK                (DTRACEACT_PROC + 2)\n#define DTRACEACT_USYM                  (DTRACEACT_PROC + 3)\n#define DTRACEACT_UMOD                  (DTRACEACT_PROC + 4)\n#define DTRACEACT_UADDR                 (DTRACEACT_PROC + 5)\n\n#define DTRACEACT_PROC_DESTRUCTIVE      0x0200\n#define DTRACEACT_STOP                  (DTRACEACT_PROC_DESTRUCTIVE + 1)\n#define DTRACEACT_RAISE                 (DTRACEACT_PROC_DESTRUCTIVE + 2)\n#define DTRACEACT_SYSTEM                (DTRACEACT_PROC_DESTRUCTIVE + 3)\n#define DTRACEACT_FREOPEN               (DTRACEACT_PROC_DESTRUCTIVE + 4)\n\t\n#if defined(__APPLE__)\n/*\n * Dtrace stop() will task_suspend the currently running process.\n * Dtrace pidresume(pid) will task_resume it.\n */\n\t\n#define DTRACEACT_PIDRESUME\t\t(DTRACEACT_PROC_DESTRUCTIVE + 50)\n#endif /* __APPLE__ */\t\n\n#define DTRACEACT_PROC_CONTROL          0x0300\n\n#define DTRACEACT_KERNEL                0x0400\n#define DTRACEACT_STACK                 (DTRACEACT_KERNEL + 1)\n#define DTRACEACT_SYM                   (DTRACEACT_KERNEL + 2)\n#define DTRACEACT_MOD                   (DTRACEACT_KERNEL + 3)\n\n#define DTRACEACT_KERNEL_DESTRUCTIVE    0x0500\n#define DTRACEACT_BREAKPOINT            (DTRACEACT_KERNEL_DESTRUCTIVE + 1)\n#define DTRACEACT_PANIC                 (DTRACEACT_KERNEL_DESTRUCTIVE + 2)\n#define DTRACEACT_CHILL                 (DTRACEACT_KERNEL_DESTRUCTIVE + 3)\n\n#define DTRACEACT_SPECULATIVE           0x0600\n#define DTRACEACT_SPECULATE             (DTRACEACT_SPECULATIVE + 1)\n#define DTRACEACT_COMMIT                (DTRACEACT_SPECULATIVE + 2)\n#define DTRACEACT_DISCARD               (DTRACEACT_SPECULATIVE + 3)\n\n#define DTRACEACT_CLASS(x)              ((x) & 0xff00)\n\n#define DTRACEACT_ISDESTRUCTIVE(x)      \\\n        (DTRACEACT_CLASS(x) == DTRACEACT_PROC_DESTRUCTIVE || \\\n        DTRACEACT_CLASS(x) == DTRACEACT_KERNEL_DESTRUCTIVE)\n\n#define DTRACEACT_ISSPECULATIVE(x)      \\\n        (DTRACEACT_CLASS(x) == DTRACEACT_SPECULATIVE)\n\n#define DTRACEACT_ISPRINTFLIKE(x)       \\\n        ((x) == DTRACEACT_PRINTF || (x) == DTRACEACT_PRINTA || \\\n        (x) == DTRACEACT_SYSTEM || (x) == DTRACEACT_FREOPEN)\n\n/*\n * DTrace Aggregating Actions\n *\n * These are functions f(x) for which the following is true:\n *\n *    f(f(x_0) U f(x_1) U ... U f(x_n)) = f(x_0 U x_1 U ... U x_n)\n *\n * where x_n is a set of arbitrary data.  Aggregating actions are in their own\n * DTrace action class, DTTRACEACT_AGGREGATION.  The macros provided here allow\n * for easier processing of the aggregation argument and data payload for a few\n * aggregating actions (notably:  quantize(), lquantize(), and ustack()).\n */\n#define DTRACEACT_AGGREGATION           0x0700\n#define DTRACEAGG_COUNT                 (DTRACEACT_AGGREGATION + 1)\n#define DTRACEAGG_MIN                   (DTRACEACT_AGGREGATION + 2)\n#define DTRACEAGG_MAX                   (DTRACEACT_AGGREGATION + 3)\n#define DTRACEAGG_AVG                   (DTRACEACT_AGGREGATION + 4)\n#define DTRACEAGG_SUM                   (DTRACEACT_AGGREGATION + 5)\n#define DTRACEAGG_STDDEV                (DTRACEACT_AGGREGATION + 6)\n#define DTRACEAGG_QUANTIZE              (DTRACEACT_AGGREGATION + 7)\n#define DTRACEAGG_LQUANTIZE             (DTRACEACT_AGGREGATION + 8)\n#define DTRACEAGG_LLQUANTIZE            (DTRACEACT_AGGREGATION + 9)\n\n#define DTRACEACT_ISAGG(x)              \\\n        (DTRACEACT_CLASS(x) == DTRACEACT_AGGREGATION)\n\n#if !defined(__APPLE__)  /* Quiet compiler warning. */\n#define DTRACE_QUANTIZE_NBUCKETS        \\\n        (((sizeof (uint64_t) * NBBY) - 1) * 2 + 1)\n\n#define DTRACE_QUANTIZE_ZEROBUCKET      ((sizeof (uint64_t) * NBBY) - 1)\n#else\n#define DTRACE_QUANTIZE_NBUCKETS        \\\n        (int)(((sizeof (uint64_t) * NBBY) - 1) * 2 + 1)\n\n#define DTRACE_QUANTIZE_ZEROBUCKET      (int64_t)((sizeof (uint64_t) * NBBY) - 1)\n#endif /* __APPLE __*/\n\n#define DTRACE_QUANTIZE_BUCKETVAL(buck)                                 \\\n        (int64_t)((buck) < DTRACE_QUANTIZE_ZEROBUCKET ?                 \\\n        -(1LL << (DTRACE_QUANTIZE_ZEROBUCKET - 1 - (buck))) :           \\\n        (buck) == DTRACE_QUANTIZE_ZEROBUCKET ? 0 :                      \\\n        1LL << ((buck) - DTRACE_QUANTIZE_ZEROBUCKET - 1))\n\n#define DTRACE_LQUANTIZE_STEPSHIFT              48\n#define DTRACE_LQUANTIZE_STEPMASK               ((uint64_t)UINT16_MAX << 48)\n#define DTRACE_LQUANTIZE_LEVELSHIFT             32\n#define DTRACE_LQUANTIZE_LEVELMASK              ((uint64_t)UINT16_MAX << 32)\n#define DTRACE_LQUANTIZE_BASESHIFT              0\n#define DTRACE_LQUANTIZE_BASEMASK               UINT32_MAX\n\n#define DTRACE_LQUANTIZE_STEP(x)                \\\n        (uint16_t)(((x) & DTRACE_LQUANTIZE_STEPMASK) >> \\\n        DTRACE_LQUANTIZE_STEPSHIFT)\n\n#define DTRACE_LQUANTIZE_LEVELS(x)              \\\n        (uint16_t)(((x) & DTRACE_LQUANTIZE_LEVELMASK) >> \\\n        DTRACE_LQUANTIZE_LEVELSHIFT)\n\n#define DTRACE_LQUANTIZE_BASE(x)                \\\n        (int32_t)(((x) & DTRACE_LQUANTIZE_BASEMASK) >> \\\n        DTRACE_LQUANTIZE_BASESHIFT)\n\n#define  DTRACE_LLQUANTIZE_FACTORSHIFT          48\n#define  DTRACE_LLQUANTIZE_FACTORMASK           ((uint64_t)UINT16_MAX << 48)\n#define  DTRACE_LLQUANTIZE_LOWSHIFT             32\n#define  DTRACE_LLQUANTIZE_LOWMASK              ((uint64_t)UINT16_MAX << 32)\n#define  DTRACE_LLQUANTIZE_HIGHSHIFT            16\n#define  DTRACE_LLQUANTIZE_HIGHMASK             ((uint64_t)UINT16_MAX << 16)\n#define  DTRACE_LLQUANTIZE_NSTEPSHIFT           0\n#define  DTRACE_LLQUANTIZE_NSTEPMASK            UINT16_MAX\n\n#define  DTRACE_LLQUANTIZE_FACTOR(x)   \\\n        (uint16_t)(((x) & DTRACE_LLQUANTIZE_FACTORMASK) >> \\\n        DTRACE_LLQUANTIZE_FACTORSHIFT)\n\n#define  DTRACE_LLQUANTIZE_LOW(x)    \\\n        (uint16_t)(((x) & DTRACE_LLQUANTIZE_LOWMASK) >> \\\n        DTRACE_LLQUANTIZE_LOWSHIFT)\n\n#define  DTRACE_LLQUANTIZE_HIGH(x)   \\\n        (uint16_t)(((x) & DTRACE_LLQUANTIZE_HIGHMASK) >> \\\n        DTRACE_LLQUANTIZE_HIGHSHIFT)\n\n#define  DTRACE_LLQUANTIZE_NSTEP(x)    \\\n        (uint16_t)(((x) & DTRACE_LLQUANTIZE_NSTEPMASK) >> \\\n        DTRACE_LLQUANTIZE_NSTEPSHIFT)\n\n#define DTRACE_USTACK_NFRAMES(x)        (uint32_t)((x) & UINT32_MAX)\n#define DTRACE_USTACK_STRSIZE(x)        (uint32_t)((x) >> 32)\n#define DTRACE_USTACK_ARG(x, y)         \\\n        ((((uint64_t)(y)) << 32) | ((x) & UINT32_MAX))\n\n#if !defined(__APPLE__)\n\n#ifndef _LP64\n#ifndef _LITTLE_ENDIAN\n#define DTRACE_PTR(type, name)  uint32_t name##pad; type *name\n#else\n#define DTRACE_PTR(type, name)  type *name; uint32_t name##pad\n#endif\n#else\n#define DTRACE_PTR(type, name)  type *name\n#endif\n\n#else\n\n#ifndef _LP64\n#define DTRACE_PTR(type, name)  user_addr_t name\n#else\n#define DTRACE_PTR(type, name)  type *name\n#endif\n\n#endif /* __APPLE__ */\n\n/*\n * DTrace Object Format (DOF)\n *\n * DTrace programs can be persistently encoded in the DOF format so that they\n * may be embedded in other programs (for example, in an ELF file) or in the\n * dtrace driver configuration file for use in anonymous tracing.  The DOF\n * format is versioned and extensible so that it can be revised and so that\n * internal data structures can be modified or extended compatibly.  All DOF\n * structures use fixed-size types, so the 32-bit and 64-bit representations\n * are identical and consumers can use either data model transparently.\n *\n * The file layout is structured as follows:\n *\n * +---------------+-------------------+----- ... ----+---- ... ------+\n * |   dof_hdr_t   |  dof_sec_t[ ... ] |   loadable   | non-loadable  |\n * | (file header) | (section headers) | section data | section data  |\n * +---------------+-------------------+----- ... ----+---- ... ------+\n * |<------------ dof_hdr.dofh_loadsz --------------->|               |\n * |<------------ dof_hdr.dofh_filesz ------------------------------->|\n *\n * The file header stores meta-data including a magic number, data model for\n * the instrumentation, data encoding, and properties of the DIF code within.\n * The header describes its own size and the size of the section headers.  By\n * convention, an array of section headers follows the file header, and then\n * the data for all loadable sections and unloadable sections.  This permits\n * consumer code to easily download the headers and all loadable data into the\n * DTrace driver in one contiguous chunk, omitting other extraneous sections.\n *\n * The section headers describe the size, offset, alignment, and section type\n * for each section.  Sections are described using a set of #defines that tell\n * the consumer what kind of data is expected.  Sections can contain links to\n * other sections by storing a dof_secidx_t, an index into the section header\n * array, inside of the section data structures.  The section header includes\n * an entry size so that sections with data arrays can grow their structures.\n *\n * The DOF data itself can contain many snippets of DIF (i.e. >1 DIFOs), which\n * are represented themselves as a collection of related DOF sections.  This\n * permits us to change the set of sections associated with a DIFO over time,\n * and also permits us to encode DIFOs that contain different sets of sections.\n * When a DOF section wants to refer to a DIFO, it stores the dof_secidx_t of a\n * section of type DOF_SECT_DIFOHDR.  This section's data is then an array of\n * dof_secidx_t's which in turn denote the sections associated with this DIFO.\n *\n * This loose coupling of the file structure (header and sections) to the\n * structure of the DTrace program itself (ECB descriptions, action\n * descriptions, and DIFOs) permits activities such as relocation processing\n * to occur in a single pass without having to understand D program structure.\n *\n * Finally, strings are always stored in ELF-style string tables along with a\n * string table section index and string table offset.  Therefore strings in\n * DOF are always arbitrary-length and not bound to the current implementation.\n */\n\n#define DOF_ID_SIZE     16      /* total size of dofh_ident[] in bytes */\n\ntypedef struct dof_hdr {\n        uint8_t dofh_ident[DOF_ID_SIZE]; /* identification bytes (see below) */\n        uint32_t dofh_flags;            /* file attribute flags (if any) */\n        uint32_t dofh_hdrsize;          /* size of file header in bytes */\n        uint32_t dofh_secsize;          /* size of section header in bytes */\n        uint32_t dofh_secnum;           /* number of section headers */\n        uint64_t dofh_secoff;           /* file offset of section headers */\n        uint64_t dofh_loadsz;           /* file size of loadable portion */\n        uint64_t dofh_filesz;           /* file size of entire DOF file */\n        uint64_t dofh_pad;              /* reserved for future use */\n} dof_hdr_t;\n\n#define DOF_ID_MAG0     0       /* first byte of magic number */\n#define DOF_ID_MAG1     1       /* second byte of magic number */\n#define DOF_ID_MAG2     2       /* third byte of magic number */\n#define DOF_ID_MAG3     3       /* fourth byte of magic number */\n#define DOF_ID_MODEL    4       /* DOF data model (see below) */\n#define DOF_ID_ENCODING 5       /* DOF data encoding (see below) */\n#define DOF_ID_VERSION  6       /* DOF file format major version (see below) */\n#define DOF_ID_DIFVERS  7       /* DIF instruction set version */\n#define DOF_ID_DIFIREG  8       /* DIF integer registers used by compiler */\n#define DOF_ID_DIFTREG  9       /* DIF tuple registers used by compiler */\n#define DOF_ID_PAD      10      /* start of padding bytes (all zeroes) */\n\n#define DOF_MAG_MAG0    0x7F    /* DOF_ID_MAG[0-3] */\n#define DOF_MAG_MAG1    'D'\n#define DOF_MAG_MAG2    'O'\n#define DOF_MAG_MAG3    'F'\n\n#define DOF_MAG_STRING  \"\\177DOF\"\n#define DOF_MAG_STRLEN  4\n\n#define DOF_MODEL_NONE  0       /* DOF_ID_MODEL */\n#define DOF_MODEL_ILP32 1\n#define DOF_MODEL_LP64  2\n\n#ifdef _LP64\n#define DOF_MODEL_NATIVE        DOF_MODEL_LP64\n#else\n#define DOF_MODEL_NATIVE        DOF_MODEL_ILP32\n#endif\n\n#define DOF_ENCODE_NONE 0       /* DOF_ID_ENCODING */\n#define DOF_ENCODE_LSB  1\n#define DOF_ENCODE_MSB  2\n\n#ifdef _BIG_ENDIAN\n#define DOF_ENCODE_NATIVE       DOF_ENCODE_MSB\n#else\n#define DOF_ENCODE_NATIVE       DOF_ENCODE_LSB\n#endif\n\n#define\tDOF_VERSION_1\t1\t/* DOF version 1: Solaris 10 FCS */\n#define\tDOF_VERSION_2\t2\t/* DOF version 2: Solaris Express 6/06 */\n#if !defined(__APPLE__)\n#define\tDOF_VERSION\tDOF_VERSION_2\t/* Latest DOF version */\n#else\n#define\tDOF_VERSION_3\t3\t/* DOF version 3: Minimum version for Leopard */\n#define\tDOF_VERSION\tDOF_VERSION_3\t/* Latest DOF version */\n#endif /* __APPLE__ */\n\n#define DOF_FL_VALID    0       /* mask of all valid dofh_flags bits */\n\ntypedef uint32_t dof_secidx_t;  /* section header table index type */\ntypedef uint32_t dof_stridx_t;  /* string table index type */\n\n#define DOF_SECIDX_NONE (-1U)   /* null value for section indices */\n#define DOF_STRIDX_NONE (-1U)   /* null value for string indices */\n\ntypedef struct dof_sec {\n        uint32_t dofs_type;     /* section type (see below) */\n        uint32_t dofs_align;    /* section data memory alignment */\n        uint32_t dofs_flags;    /* section flags (if any) */\n        uint32_t dofs_entsize;  /* size of section entry (if table) */\n        uint64_t dofs_offset;   /* offset of section data within file */\n        uint64_t dofs_size;     /* size of section data in bytes */\n} dof_sec_t;\n\n#define\tDOF_SECT_NONE\t\t0\t/* null section */\n#define\tDOF_SECT_COMMENTS\t1\t/* compiler comments */\n#define\tDOF_SECT_SOURCE\t\t2\t/* D program source code */\n#define\tDOF_SECT_ECBDESC\t3\t/* dof_ecbdesc_t */\n#define\tDOF_SECT_PROBEDESC\t4\t/* dof_probedesc_t */\n#define\tDOF_SECT_ACTDESC\t5\t/* dof_actdesc_t array */\n#define\tDOF_SECT_DIFOHDR\t6\t/* dof_difohdr_t (variable length) */\n#define\tDOF_SECT_DIF\t\t7\t/* uint32_t array of byte code */\n#define\tDOF_SECT_STRTAB\t\t8\t/* string table */\n#define\tDOF_SECT_VARTAB\t\t9\t/* dtrace_difv_t array */\n#define\tDOF_SECT_RELTAB\t\t10\t/* dof_relodesc_t array */\n#define\tDOF_SECT_TYPTAB\t\t11\t/* dtrace_diftype_t array */\n#define\tDOF_SECT_URELHDR\t12\t/* dof_relohdr_t (user relocations) */\n#define\tDOF_SECT_KRELHDR\t13\t/* dof_relohdr_t (kernel relocations) */\n#define\tDOF_SECT_OPTDESC\t14\t/* dof_optdesc_t array */\n#define\tDOF_SECT_PROVIDER\t15\t/* dof_provider_t */\n#define\tDOF_SECT_PROBES\t\t16\t/* dof_probe_t array */\n#define\tDOF_SECT_PRARGS\t\t17\t/* uint8_t array (probe arg mappings) */\n#define\tDOF_SECT_PROFFS\t\t18\t/* uint32_t array (probe arg offsets) */\n#define\tDOF_SECT_INTTAB\t\t19\t/* uint64_t array */\n#define\tDOF_SECT_UTSNAME\t20\t/* struct utsname */\n#define\tDOF_SECT_XLTAB\t\t21\t/* dof_xlref_t array */\n#define\tDOF_SECT_XLMEMBERS\t22\t/* dof_xlmember_t array */\n#define\tDOF_SECT_XLIMPORT\t23\t/* dof_xlator_t */\n#define\tDOF_SECT_XLEXPORT\t24\t/* dof_xlator_t */\n#define\tDOF_SECT_PREXPORT\t25\t/* dof_secidx_t array (exported objs) */\n#define\tDOF_SECT_PRENOFFS\t26\t/* uint32_t array (enabled offsets) */\n\n#define DOF_SECF_LOAD           1       /* section should be loaded */\n\ntypedef struct dof_ecbdesc {\n        dof_secidx_t dofe_probes;       /* link to DOF_SECT_PROBEDESC */\n        dof_secidx_t dofe_pred;         /* link to DOF_SECT_DIFOHDR */\n        dof_secidx_t dofe_actions;      /* link to DOF_SECT_ACTDESC */\n        uint32_t dofe_pad;              /* reserved for future use */\n        uint64_t dofe_uarg;             /* user-supplied library argument */\n} dof_ecbdesc_t;\n\ntypedef struct dof_probedesc {\n        dof_secidx_t dofp_strtab;       /* link to DOF_SECT_STRTAB section */\n        dof_stridx_t dofp_provider;     /* provider string */\n        dof_stridx_t dofp_mod;          /* module string */\n        dof_stridx_t dofp_func;         /* function string */\n        dof_stridx_t dofp_name;         /* name string */\n        uint32_t dofp_id;               /* probe identifier (or zero) */\n} dof_probedesc_t;\n\ntypedef struct dof_actdesc {\n        dof_secidx_t dofa_difo;         /* link to DOF_SECT_DIFOHDR */\n        dof_secidx_t dofa_strtab;       /* link to DOF_SECT_STRTAB section */\n        uint32_t dofa_kind;             /* action kind (DTRACEACT_* constant) */\n        uint32_t dofa_ntuple;           /* number of subsequent tuple actions */\n        uint64_t dofa_arg;              /* kind-specific argument */\n        uint64_t dofa_uarg;             /* user-supplied argument */\n} dof_actdesc_t;\n\ntypedef struct dof_difohdr {\n        dtrace_diftype_t dofd_rtype;    /* return type for this fragment */\n        dof_secidx_t dofd_links[1];     /* variable length array of indices */\n} dof_difohdr_t;\n\ntypedef struct dof_relohdr {\n        dof_secidx_t dofr_strtab;       /* link to DOF_SECT_STRTAB for names */\n        dof_secidx_t dofr_relsec;       /* link to DOF_SECT_RELTAB for relos */\n        dof_secidx_t dofr_tgtsec;       /* link to section we are relocating */\n} dof_relohdr_t;\n\ntypedef struct dof_relodesc {\n        dof_stridx_t dofr_name;         /* string name of relocation symbol */\n        uint32_t dofr_type;             /* relo type (DOF_RELO_* constant) */\n        uint64_t dofr_offset;           /* byte offset for relocation */\n        uint64_t dofr_data;             /* additional type-specific data */\n} dof_relodesc_t;\n\n#define DOF_RELO_NONE   0               /* empty relocation entry */\n#define DOF_RELO_SETX   1               /* relocate setx value */\n\ntypedef struct dof_optdesc {\n        uint32_t dofo_option;           /* option identifier */\n        dof_secidx_t dofo_strtab;       /* string table, if string option */\n        uint64_t dofo_value;            /* option value or string index */\n} dof_optdesc_t;\n\ntypedef uint32_t dof_attr_t;            /* encoded stability attributes */\n\n#define DOF_ATTR(n, d, c)       (((n) << 24) | ((d) << 16) | ((c) << 8))\n#define DOF_ATTR_NAME(a)        (((a) >> 24) & 0xff)\n#define DOF_ATTR_DATA(a)        (((a) >> 16) & 0xff)\n#define DOF_ATTR_CLASS(a)       (((a) >>  8) & 0xff)\n\ntypedef struct dof_provider {\n\tdof_secidx_t dofpv_strtab;\t/* link to DOF_SECT_STRTAB section */\n\tdof_secidx_t dofpv_probes;\t/* link to DOF_SECT_PROBES section */\n\tdof_secidx_t dofpv_prargs;\t/* link to DOF_SECT_PRARGS section */\n\tdof_secidx_t dofpv_proffs;\t/* link to DOF_SECT_PROFFS section */\n\tdof_stridx_t dofpv_name;\t/* provider name string */\n\tdof_attr_t dofpv_provattr;\t/* provider attributes */\n\tdof_attr_t dofpv_modattr;\t/* module attributes */\n\tdof_attr_t dofpv_funcattr;\t/* function attributes */\n\tdof_attr_t dofpv_nameattr;\t/* name attributes */\n\tdof_attr_t dofpv_argsattr;\t/* args attributes */\n\tdof_secidx_t dofpv_prenoffs;\t/* link to DOF_SECT_PRENOFFS section */\n} dof_provider_t;\n\ntypedef struct dof_probe {\n\tuint64_t dofpr_addr;\t\t/* probe base address or offset */\n\tdof_stridx_t dofpr_func;\t/* probe function string */\n\tdof_stridx_t dofpr_name;\t/* probe name string */\n\tdof_stridx_t dofpr_nargv;\t/* native argument type strings */\n\tdof_stridx_t dofpr_xargv;\t/* translated argument type strings */\n\tuint32_t dofpr_argidx;\t\t/* index of first argument mapping */\n\tuint32_t dofpr_offidx;\t\t/* index of first offset entry */\n\tuint8_t dofpr_nargc;\t\t/* native argument count */\n\tuint8_t dofpr_xargc;\t\t/* translated argument count */\n\tuint16_t dofpr_noffs;\t\t/* number of offset entries for probe */\n\tuint32_t dofpr_enoffidx;\t/* index of first is-enabled offset */\n\tuint16_t dofpr_nenoffs;\t\t/* number of is-enabled offsets */\n\tuint16_t dofpr_pad1;\t\t/* reserved for future use */\n\tuint32_t dofpr_pad2;\t\t/* reserved for future use */\n} dof_probe_t;\n\ntypedef struct dof_xlator {\n        dof_secidx_t dofxl_members;     /* link to DOF_SECT_XLMEMBERS section */\n        dof_secidx_t dofxl_strtab;      /* link to DOF_SECT_STRTAB section */\n        dof_stridx_t dofxl_argv;        /* input parameter type strings */\n        uint32_t dofxl_argc;            /* input parameter list length */\n        dof_stridx_t dofxl_type;        /* output type string name */\n        dof_attr_t dofxl_attr;          /* output stability attributes */\n} dof_xlator_t;\n\ntypedef struct dof_xlmember {\n        dof_secidx_t dofxm_difo;        /* member link to DOF_SECT_DIFOHDR */\n        dof_stridx_t dofxm_name;        /* member name */\n        dtrace_diftype_t dofxm_type;    /* member type */\n} dof_xlmember_t;\n\ntypedef struct dof_xlref {\n        dof_secidx_t dofxr_xlator;      /* link to DOF_SECT_XLATORS section */\n        uint32_t dofxr_member;          /* index of referenced dof_xlmember */\n        uint32_t dofxr_argn;            /* index of argument for DIF_OP_XLARG */\n} dof_xlref_t;\n\n/*\n * DTrace Intermediate Format Object (DIFO)\n *\n * A DIFO is used to store the compiled DIF for a D expression, its return\n * type, and its string and variable tables.  The string table is a single\n * buffer of character data into which sets instructions and variable\n * references can reference strings using a byte offset.  The variable table\n * is an array of dtrace_difv_t structures that describe the name and type of\n * each variable and the id used in the DIF code.  This structure is described\n * above in the DIF section of this header file.  The DIFO is used at both\n * user-level (in the library) and in the kernel, but the structure is never\n * passed between the two: the DOF structures form the only interface.  As a\n * result, the definition can change depending on the presence of _KERNEL.\n */\ntypedef struct dtrace_difo {\n        dif_instr_t *dtdo_buf;          /* instruction buffer */\n        uint64_t *dtdo_inttab;          /* integer table (optional) */\n        char *dtdo_strtab;              /* string table (optional) */\n        dtrace_difv_t *dtdo_vartab;     /* variable table (optional) */\n        uint_t dtdo_len;                /* length of instruction buffer */\n        uint_t dtdo_intlen;             /* length of integer table */\n        uint_t dtdo_strlen;             /* length of string table */\n        uint_t dtdo_varlen;             /* length of variable table */\n        dtrace_diftype_t dtdo_rtype;    /* return type */\n        uint_t dtdo_refcnt;             /* owner reference count */\n        uint_t dtdo_destructive;        /* invokes destructive subroutines */\n#ifndef _KERNEL\n        dof_relodesc_t *dtdo_kreltab;   /* kernel relocations */\n        dof_relodesc_t *dtdo_ureltab;   /* user relocations */\n        struct dt_node **dtdo_xlmtab;   /* translator references */\n        uint_t dtdo_krelen;             /* length of krelo table */\n        uint_t dtdo_urelen;             /* length of urelo table */\n        uint_t dtdo_xlmlen;             /* length of translator table */\n#endif\n} dtrace_difo_t;\n\n/*\n * DTrace Enabling Description Structures\n *\n * When DTrace is tracking the description of a DTrace enabling entity (probe,\n * predicate, action, ECB, record, etc.), it does so in a description\n * structure.  These structures all end in \"desc\", and are used at both\n * user-level and in the kernel -- but (with the exception of\n * dtrace_probedesc_t) they are never passed between them.  Typically,\n * user-level will use the description structures when assembling an enabling.\n * It will then distill those description structures into a DOF object (see\n * above), and send it into the kernel.  The kernel will again use the\n * description structures to create a description of the enabling as it reads\n * the DOF.  When the description is complete, the enabling will be actually\n * created -- turning it into the structures that represent the enabling\n * instead of merely describing it.  Not surprisingly, the description\n * structures bear a strong resemblance to the DOF structures that act as their\n * conduit.\n */\nstruct dtrace_predicate;\n\ntypedef struct dtrace_probedesc {\n        dtrace_id_t dtpd_id;                    /* probe identifier */\n        char dtpd_provider[DTRACE_PROVNAMELEN]; /* probe provider name */\n        char dtpd_mod[DTRACE_MODNAMELEN];       /* probe module name */\n        char dtpd_func[DTRACE_FUNCNAMELEN];     /* probe function name */\n        char dtpd_name[DTRACE_NAMELEN];         /* probe name */\n} dtrace_probedesc_t;\n\ntypedef struct dtrace_repldesc {\n        dtrace_probedesc_t dtrpd_match;         /* probe descr. to match */\n        dtrace_probedesc_t dtrpd_create;        /* probe descr. to create */\n} dtrace_repldesc_t;\n\ntypedef struct dtrace_preddesc {\n        dtrace_difo_t *dtpdd_difo;              /* pointer to DIF object */\n        struct dtrace_predicate *dtpdd_predicate; /* pointer to predicate */\n} dtrace_preddesc_t;\n\ntypedef struct dtrace_actdesc {\n        dtrace_difo_t *dtad_difo;               /* pointer to DIF object */\n        struct dtrace_actdesc *dtad_next;       /* next action */\n        dtrace_actkind_t dtad_kind;             /* kind of action */\n        uint32_t dtad_ntuple;                   /* number in tuple */\n        uint64_t dtad_arg;                      /* action argument */\n        uint64_t dtad_uarg;                     /* user argument */\n        int dtad_refcnt;                        /* reference count */\n} dtrace_actdesc_t;\n\n\ntypedef struct dtrace_ecbdesc {\n        dtrace_actdesc_t *dted_action;          /* action description(s) */\n        dtrace_preddesc_t dted_pred;            /* predicate description */\n        dtrace_probedesc_t dted_probe;          /* probe description */\n        uint64_t dted_uarg;                     /* library argument */\n        int dted_refcnt;                        /* reference count */\n        uint64_t dted_probegen;                 /* matched probe generation */\n} dtrace_ecbdesc_t;\n\n/*\n * APPLE NOTE: The kernel always rebuild dtrace_ecbdesc structures\n * coming from userspace, so there is no dted_probegen manipulation risk\n */\n\n/*\n * DTrace Metadata Description Structures\n *\n * DTrace separates the trace data stream from the metadata stream.  The only\n * metadata tokens placed in the data stream are the dtrace_rechdr_t (EPID +\n * timestamp) or (in the case of aggregations) aggregation identifiers.  To\n * determine the structure of the data, DTrace consumers pass the token to the\n * kernel, and receive in return a corresponding description of the enabled\n * probe (via the dtrace_eprobedesc structure) or the aggregation (via the\n * dtrace_aggdesc structure).  Both of these structures are expressed in terms\n * of record descriptions (via the dtrace_recdesc structure) that describe the\n * exact structure of the data.  Some record descriptions may also contain a\n * format identifier; this additional bit of metadata can be retrieved from the\n * kernel, for which a format description is returned via the dtrace_fmtdesc\n * structure.  Note that all four of these structures must be bitness-neutral\n * to allow for a 32-bit DTrace consumer on a 64-bit kernel.\n */\ntypedef struct dtrace_recdesc {\n        dtrace_actkind_t dtrd_action;           /* kind of action */\n        uint32_t dtrd_size;                     /* size of record */\n        uint32_t dtrd_offset;                   /* offset in ECB's data */\n        uint16_t dtrd_alignment;                /* required alignment */\n        uint16_t dtrd_format;                   /* format, if any */\n        uint64_t dtrd_arg;                      /* action argument */\n        uint64_t dtrd_uarg;                     /* user argument */\n} dtrace_recdesc_t;\n\ntypedef struct dtrace_eprobedesc {\n        dtrace_epid_t dtepd_epid;               /* enabled probe ID */\n        dtrace_id_t dtepd_probeid;              /* probe ID */\n        uint64_t dtepd_uarg;                    /* library argument */\n        uint32_t dtepd_size;                    /* total size */\n        int dtepd_nrecs;                        /* number of records */\n        dtrace_recdesc_t dtepd_rec[1];          /* records themselves */\n} dtrace_eprobedesc_t;\n\ntypedef struct dtrace_aggdesc {\n\tDTRACE_PTR(char, dtagd_name);\t\t/* not filled in by kernel */\n\tdtrace_aggvarid_t dtagd_varid;\t\t/* not filled in by kernel */\n\tint dtagd_flags;\t\t\t/* not filled in by kernel */\n\tdtrace_aggid_t dtagd_id;\t\t/* aggregation ID */\n\tdtrace_epid_t dtagd_epid;\t\t/* enabled probe ID */\n\tuint32_t dtagd_size;\t\t\t/* size in bytes */\n\tint dtagd_nrecs;\t\t\t/* number of records */\n\tuint32_t dtagd_pad;\t\t\t/* explicit padding */\n\tdtrace_recdesc_t dtagd_rec[1];\t\t/* record descriptions */\n} dtrace_aggdesc_t;\n\ntypedef struct dtrace_fmtdesc {\n        DTRACE_PTR(char, dtfd_string);          /* format string */\n        int dtfd_length;                        /* length of format string */\n        uint16_t dtfd_format;                   /* format identifier */\n} dtrace_fmtdesc_t;\n\n#define DTRACE_SIZEOF_EPROBEDESC(desc)                          \\\n        (sizeof (dtrace_eprobedesc_t) + ((desc)->dtepd_nrecs ?  \\\n        (((desc)->dtepd_nrecs - 1) * sizeof (dtrace_recdesc_t)) : 0))\n\n#define DTRACE_SIZEOF_AGGDESC(desc)                             \\\n        (sizeof (dtrace_aggdesc_t) + ((desc)->dtagd_nrecs ?     \\\n        (((desc)->dtagd_nrecs - 1) * sizeof (dtrace_recdesc_t)) : 0))\n\n/*\n * DTrace Option Interface\n *\n * Run-time DTrace options are set and retrieved via DOF_SECT_OPTDESC sections\n * in a DOF image.  The dof_optdesc structure contains an option identifier and\n * an option value.  The valid option identifiers are found below; the mapping\n * between option identifiers and option identifying strings is maintained at\n * user-level.  Note that the value of DTRACEOPT_UNSET is such that all of the\n * following are potentially valid option values:  all positive integers, zero\n * and negative one.  Some options (notably \"bufpolicy\" and \"bufresize\") take\n * predefined tokens as their values; these are defined with\n * DTRACEOPT_{option}_{token}.\n */\n#define\tDTRACEOPT_BUFSIZE\t0\t/* buffer size */\n#define\tDTRACEOPT_BUFPOLICY\t1\t/* buffer policy */\n#define\tDTRACEOPT_DYNVARSIZE\t2\t/* dynamic variable size */\n#define\tDTRACEOPT_AGGSIZE\t3\t/* aggregation size */\n#define\tDTRACEOPT_SPECSIZE\t4\t/* speculation size */\n#define\tDTRACEOPT_NSPEC\t\t5\t/* number of speculations */\n#define\tDTRACEOPT_STRSIZE\t6\t/* string size */\n#define\tDTRACEOPT_CLEANRATE\t7\t/* dynvar cleaning rate */\n#define\tDTRACEOPT_CPU\t\t8\t/* CPU to trace */\n#define\tDTRACEOPT_BUFRESIZE\t9\t/* buffer resizing policy */\n#define\tDTRACEOPT_GRABANON\t10\t/* grab anonymous state, if any */\n#define\tDTRACEOPT_FLOWINDENT\t11\t/* indent function entry/return */\n#define\tDTRACEOPT_QUIET\t\t12\t/* only output explicitly traced data */\n#define\tDTRACEOPT_STACKFRAMES\t13\t/* number of stack frames */\n#define\tDTRACEOPT_USTACKFRAMES\t14\t/* number of user stack frames */\n#define\tDTRACEOPT_AGGRATE\t15\t/* aggregation snapshot rate */\n#define\tDTRACEOPT_SWITCHRATE\t16\t/* buffer switching rate */\n#define\tDTRACEOPT_STATUSRATE\t17\t/* status rate */\n#define\tDTRACEOPT_DESTRUCTIVE\t18\t/* destructive actions allowed */\n#define\tDTRACEOPT_STACKINDENT\t19\t/* output indent for stack traces */\n#define\tDTRACEOPT_RAWBYTES\t20\t/* always print bytes in raw form */\n#define\tDTRACEOPT_JSTACKFRAMES\t21\t/* number of jstack() frames */\n#define\tDTRACEOPT_JSTACKSTRSIZE\t22\t/* size of jstack() string table */\n#define\tDTRACEOPT_AGGSORTKEY\t23\t/* sort aggregations by key */\n#define\tDTRACEOPT_AGGSORTREV\t24\t/* reverse-sort aggregations */\n#define\tDTRACEOPT_AGGSORTPOS\t25\t/* agg. position to sort on */\n#define\tDTRACEOPT_AGGSORTKEYPOS\t26\t/* agg. key position to sort on */\n#define\tDTRACEOPT_AGGHIST\t27 \t/* histogram aggregation output */\n#define\tDTRACEOPT_AGGPACK\t28 \t/* packed aggregation output */\n#define\tDTRACEOPT_AGGZOOM\t29 \t/* zoomed aggregation scaling */\n#define\tDTRACEOPT_TEMPORAL\t30\t/* temporally ordered output */\n#if !defined(__APPLE__)\n#define DTRACEOPT_MAX           31      /* number of options */\n#else\n#define DTRACEOPT_STACKSYMBOLS  31      /* clear to prevent stack symbolication */\n#define DTRACEOPT_BUFLIMIT      32\t/* buffer signaling limit in % of the size */\n#define DTRACEOPT_MAX           33      /* number of options */\n#endif /* __APPLE__ */\n\n#define\tDTRACEOPT_UNSET\t\t(dtrace_optval_t)-2\t/* unset option */\n\n#define\tDTRACEOPT_BUFPOLICY_RING\t0\t/* ring buffer */\n#define\tDTRACEOPT_BUFPOLICY_FILL\t1\t/* fill buffer, then stop */\n#define\tDTRACEOPT_BUFPOLICY_SWITCH\t2\t/* switch buffers */\n\n#define DTRACEOPT_BUFRESIZE_AUTO        0       /* automatic resizing */\n#define DTRACEOPT_BUFRESIZE_MANUAL      1       /* manual resizing */\n\n/*\n * DTrace Buffer Interface\n *\n * In order to get a snapshot of the principal or aggregation buffer,\n * user-level passes a buffer description to the kernel with the dtrace_bufdesc\n * structure.  This describes which CPU user-level is interested in, and\n * where user-level wishes the kernel to snapshot the buffer to (the\n * dtbd_data field).  The kernel uses the same structure to pass back some\n * information regarding the buffer:  the size of data actually copied out, the\n * number of drops, the number of errors, the offset of the oldest record,\n * and the time of the snapshot.\n *\n * If the buffer policy is a \"switch\" policy, taking a snapshot of the\n * principal buffer has the additional effect of switching the active and\n * inactive buffers.  Taking a snapshot of the aggregation buffer _always_ has\n * the additional effect of switching the active and inactive buffers.\n */\ntypedef struct dtrace_bufdesc {\n        uint64_t dtbd_size;                     /* size of buffer */\n        uint32_t dtbd_cpu;                      /* CPU or DTRACE_CPUALL */\n        uint32_t dtbd_errors;                   /* number of errors */\n        uint64_t dtbd_drops;                    /* number of drops */\n        DTRACE_PTR(char, dtbd_data);            /* data */\n        uint64_t dtbd_oldest;                   /* offset of oldest record */\n\tuint64_t dtbd_timestamp;\t\t/* hrtime of snapshot */\n} dtrace_bufdesc_t;\n\n/*\n * Each record in the buffer (dtbd_data) begins with a header that includes\n * the epid and a timestamp.  The timestamp is split into two 4-byte parts\n * so that we do not require 8-byte alignment.\n */\ntypedef struct dtrace_rechdr {\n\tdtrace_epid_t dtrh_epid;\t\t/* enabled probe id */\n\tuint32_t dtrh_timestamp_hi;\t\t/* high bits of hrtime_t */\n\tuint32_t dtrh_timestamp_lo;\t\t/* low bits of hrtime_t */\n} dtrace_rechdr_t;\n\n#define\tDTRACE_RECORD_LOAD_TIMESTAMP(dtrh)\t\t\t\\\n\t((dtrh)->dtrh_timestamp_lo +\t\t\t\t\\\n\t((uint64_t)(dtrh)->dtrh_timestamp_hi << 32))\n\n#define\tDTRACE_RECORD_STORE_TIMESTAMP(dtrh, hrtime) {\t\t\\\n\t(dtrh)->dtrh_timestamp_lo = (uint32_t)hrtime;\t\t\\\n\t(dtrh)->dtrh_timestamp_hi = hrtime >> 32;\t\t\\\n}\n\n/*\n * DTrace Status\n *\n * The status of DTrace is relayed via the dtrace_status structure.  This\n * structure contains members to count drops other than the capacity drops\n * available via the buffer interface (see above).  This consists of dynamic\n * drops (including capacity dynamic drops, rinsing drops and dirty drops), and\n * speculative drops (including capacity speculative drops, drops due to busy\n * speculative buffers and drops due to unavailable speculative buffers).\n * Additionally, the status structure contains a field to indicate the number\n * of \"fill\"-policy buffers have been filled and a boolean field to indicate\n * that exit() has been called.  If the dtst_exiting field is non-zero, no\n * further data will be generated until tracing is stopped (at which time any\n * enablings of the END action will be processed); if user-level sees that\n * this field is non-zero, tracing should be stopped as soon as possible.\n */\ntypedef struct dtrace_status {\n        uint64_t dtst_dyndrops;                 /* dynamic drops */\n        uint64_t dtst_dyndrops_rinsing;         /* dyn drops due to rinsing */\n        uint64_t dtst_dyndrops_dirty;           /* dyn drops due to dirty */\n        uint64_t dtst_specdrops;                /* speculative drops */\n        uint64_t dtst_specdrops_busy;           /* spec drops due to busy */\n        uint64_t dtst_specdrops_unavail;        /* spec drops due to unavail */\n        uint64_t dtst_errors;                   /* total errors */\n        uint64_t dtst_filled;                   /* number of filled bufs */\n        uint64_t dtst_stkstroverflows;          /* stack string tab overflows */\n        uint64_t dtst_dblerrors;                /* errors in ERROR probes */\n        char dtst_killed;                       /* non-zero if killed */\n        char dtst_exiting;                      /* non-zero if exit() called */\n        char dtst_pad[6];                       /* pad out to 64-bit align */\n} dtrace_status_t;\n\n/*\n * DTrace Configuration\n *\n * User-level may need to understand some elements of the kernel DTrace\n * configuration in order to generate correct DIF.  This information is\n * conveyed via the dtrace_conf structure.\n */\ntypedef struct dtrace_conf {\n        uint_t dtc_difversion;                  /* supported DIF version */\n        uint_t dtc_difintregs;                  /* # of DIF integer registers */\n        uint_t dtc_diftupregs;                  /* # of DIF tuple registers */\n        uint_t dtc_ctfmodel;                    /* CTF data model */\n        uint_t dtc_pad[8];                      /* reserved for future use */\n} dtrace_conf_t;\n\n/*\n * DTrace Faults\n *\n * The constants below DTRACEFLT_LIBRARY indicate probe processing faults;\n * constants at or above DTRACEFLT_LIBRARY indicate faults in probe\n * postprocessing at user-level.  Probe processing faults induce an ERROR\n * probe and are replicated in unistd.d to allow users' ERROR probes to decode\n * the error condition using thse symbolic labels.\n */\n#define DTRACEFLT_UNKNOWN               0       /* Unknown fault */\n#define DTRACEFLT_BADADDR               1       /* Bad address */\n#define DTRACEFLT_BADALIGN              2       /* Bad alignment */\n#define DTRACEFLT_ILLOP                 3       /* Illegal operation */\n#define DTRACEFLT_DIVZERO               4       /* Divide-by-zero */\n#define DTRACEFLT_NOSCRATCH             5       /* Out of scratch space */\n#define DTRACEFLT_KPRIV                 6       /* Illegal kernel access */\n#define DTRACEFLT_UPRIV                 7       /* Illegal user access */\n#define DTRACEFLT_TUPOFLOW              8       /* Tuple stack overflow */\n#define\tDTRACEFLT_BADSTACK\t\t9\t/* Bad stack */\n\n#define DTRACEFLT_LIBRARY               1000    /* Library-level fault */\n\n/*\n * DTrace Argument Types\n *\n * Because it would waste both space and time, argument types do not reside\n * with the probe.  In order to determine argument types for args[X]\n * variables, the D compiler queries for argument types on a probe-by-probe\n * basis.  (This optimizes for the common case that arguments are either not\n * used or used in an untyped fashion.)  Typed arguments are specified with a\n * string of the type name in the dtragd_native member of the argument\n * description structure.  Typed arguments may be further translated to types\n * of greater stability; the provider indicates such a translated argument by\n * filling in the dtargd_xlate member with the string of the translated type.\n * Finally, the provider may indicate which argument value a given argument\n * maps to by setting the dtargd_mapping member -- allowing a single argument\n * to map to multiple args[X] variables.\n */\ntypedef struct dtrace_argdesc {\n        dtrace_id_t dtargd_id;                  /* probe identifier */\n        int dtargd_ndx;                         /* arg number (-1 iff none) */\n        int dtargd_mapping;                     /* value mapping */\n        char dtargd_native[DTRACE_ARGTYPELEN];  /* native type name */\n        char dtargd_xlate[DTRACE_ARGTYPELEN];   /* translated type name */\n} dtrace_argdesc_t;\n\n/*\n * DTrace Stability Attributes\n *\n * Each DTrace provider advertises the name and data stability of each of its\n * probe description components, as well as its architectural dependencies.\n * The D compiler can query the provider attributes (dtrace_pattr_t below) in\n * order to compute the properties of an input program and report them.\n */\ntypedef uint8_t dtrace_stability_t;     /* stability code (see attributes(5)) */\ntypedef uint8_t dtrace_class_t;         /* architectural dependency class */\n\n#define\tDTRACE_STABILITY_INTERNAL\t0\t/* private to DTrace itself */\n#define\tDTRACE_STABILITY_PRIVATE\t1\t/* private to Sun (see docs) */\n#define\tDTRACE_STABILITY_OBSOLETE\t2\t/* scheduled for removal */\n#define\tDTRACE_STABILITY_EXTERNAL\t3\t/* not controlled by Sun */\n#define\tDTRACE_STABILITY_UNSTABLE\t4\t/* new or rapidly changing */\n#define\tDTRACE_STABILITY_EVOLVING\t5\t/* less rapidly changing */\n#define\tDTRACE_STABILITY_STABLE\t\t6\t/* mature interface from Sun */\n#define\tDTRACE_STABILITY_STANDARD\t7\t/* industry standard */\n#define\tDTRACE_STABILITY_MAX\t\t7\t/* maximum valid stability */\n\n#define\tDTRACE_CLASS_UNKNOWN\t0\t/* unknown architectural dependency */\n#define\tDTRACE_CLASS_CPU\t1\t/* CPU-module-specific */\n#define\tDTRACE_CLASS_PLATFORM\t2\t/* platform-specific (uname -i) */\n#define\tDTRACE_CLASS_GROUP\t3\t/* hardware-group-specific (uname -m) */\n#define\tDTRACE_CLASS_ISA\t4\t/* ISA-specific (uname -p) */\n#define\tDTRACE_CLASS_COMMON\t5\t/* common to all systems */\n#define\tDTRACE_CLASS_MAX\t5\t/* maximum valid class */\n\n#define\tDTRACE_PRIV_NONE\t0x0000\n#define\tDTRACE_PRIV_KERNEL\t0x0001\n#define\tDTRACE_PRIV_USER\t0x0002\n#define\tDTRACE_PRIV_PROC\t0x0004\n#define\tDTRACE_PRIV_OWNER\t0x0008\n#define\tDTRACE_PRIV_ZONEOWNER\t0x0010\n\n#define\tDTRACE_PRIV_ALL\t\\\n\t(DTRACE_PRIV_KERNEL | DTRACE_PRIV_USER | \\\n\tDTRACE_PRIV_PROC | DTRACE_PRIV_OWNER | DTRACE_PRIV_ZONEOWNER)\n\ntypedef struct dtrace_ppriv {\n\tuint32_t dtpp_flags;\t\t\t/* privilege flags */\n\tuid_t dtpp_uid;\t\t\t\t/* user ID */\n\tzoneid_t dtpp_zoneid;\t\t\t/* zone ID */\n} dtrace_ppriv_t;\n\ntypedef struct dtrace_attribute {\n        dtrace_stability_t dtat_name;           /* entity name stability */\n        dtrace_stability_t dtat_data;           /* entity data stability */\n        dtrace_class_t dtat_class;              /* entity data dependency */\n} dtrace_attribute_t;\n\ntypedef struct dtrace_pattr {\n        dtrace_attribute_t dtpa_provider;       /* provider attributes */\n        dtrace_attribute_t dtpa_mod;            /* module attributes */\n        dtrace_attribute_t dtpa_func;           /* function attributes */\n        dtrace_attribute_t dtpa_name;           /* name attributes */\n        dtrace_attribute_t dtpa_args;           /* args[] attributes */\n} dtrace_pattr_t;\n\ntypedef struct dtrace_providerdesc {\n        char dtvd_name[DTRACE_PROVNAMELEN];     /* provider name */\n        dtrace_pattr_t dtvd_attr;               /* stability attributes */\n        dtrace_ppriv_t dtvd_priv;               /* privileges required */\n} dtrace_providerdesc_t;\n\n/*\n * DTrace Pseudodevice Interface\n *\n * DTrace is controlled through ioctl(2)'s to the in-kernel dtrace:dtrace\n * pseudodevice driver.  These ioctls comprise the user-kernel interface to\n * DTrace.\n */\n#if !defined(__APPLE__)\n#define DTRACEIOC               (('d' << 24) | ('t' << 16) | ('r' << 8))\n#define DTRACEIOC_PROVIDER      (DTRACEIOC | 1)         /* provider query */\n#define DTRACEIOC_PROBES        (DTRACEIOC | 2)         /* probe query */\n#define DTRACEIOC_BUFSNAP       (DTRACEIOC | 4)         /* snapshot buffer */\n#define DTRACEIOC_PROBEMATCH    (DTRACEIOC | 5)         /* match probes */\n#define DTRACEIOC_ENABLE        (DTRACEIOC | 6)         /* enable probes */\n#define DTRACEIOC_AGGSNAP       (DTRACEIOC | 7)         /* snapshot agg. */\n#define DTRACEIOC_EPROBE        (DTRACEIOC | 8)         /* get eprobe desc. */\n#define DTRACEIOC_PROBEARG      (DTRACEIOC | 9)         /* get probe arg */\n#define DTRACEIOC_CONF          (DTRACEIOC | 10)        /* get config. */\n#define DTRACEIOC_STATUS        (DTRACEIOC | 11)        /* get status */\n#define DTRACEIOC_GO            (DTRACEIOC | 12)        /* start tracing */\n#define DTRACEIOC_STOP          (DTRACEIOC | 13)        /* stop tracing */\n#define DTRACEIOC_AGGDESC       (DTRACEIOC | 15)        /* get agg. desc. */\n#define DTRACEIOC_FORMAT        (DTRACEIOC | 16)        /* get format str */\n#define DTRACEIOC_DOFGET        (DTRACEIOC | 17)        /* get DOF */\n#define DTRACEIOC_REPLICATE     (DTRACEIOC | 18)        /* replicate enab */\n#else\n/* coding this as IOC_VOID allows this driver to handle its own copyin/copuout */\n#define DTRACEIOC               _IO('d',0)\n#define DTRACEIOC_PROVIDER      (DTRACEIOC | 1)         /* provider query */\n#define DTRACEIOC_PROBES        (DTRACEIOC | 2)         /* probe query */\n#define DTRACEIOC_BUFSNAP       (DTRACEIOC | 4)         /* snapshot buffer */\n#define DTRACEIOC_PROBEMATCH    (DTRACEIOC | 5)         /* match probes */\n#define DTRACEIOC_ENABLE        (DTRACEIOC | 6)         /* enable probes */\n#define DTRACEIOC_AGGSNAP       (DTRACEIOC | 7)         /* snapshot agg. */\n#define DTRACEIOC_EPROBE        (DTRACEIOC | 8)         /* get eprobe desc. */\n#define DTRACEIOC_PROBEARG      (DTRACEIOC | 9)         /* get probe arg */\n#define DTRACEIOC_CONF          (DTRACEIOC | 10)        /* get config. */\n#define DTRACEIOC_STATUS        (DTRACEIOC | 11)        /* get status */\n#define DTRACEIOC_GO            (DTRACEIOC | 12)        /* start tracing */\n#define DTRACEIOC_STOP          (DTRACEIOC | 13)        /* stop tracing */\n#define DTRACEIOC_AGGDESC       (DTRACEIOC | 15)        /* get agg. desc. */\n#define DTRACEIOC_FORMAT        (DTRACEIOC | 16)        /* get format str */\n#define DTRACEIOC_DOFGET        (DTRACEIOC | 17)        /* get DOF */\n#define DTRACEIOC_REPLICATE     (DTRACEIOC | 18)        /* replicate enab */\n#define DTRACEIOC_MODUUIDSLIST\t(DTRACEIOC | 30)\t/* APPLE ONLY, query for modules with missing symbols */\n#define DTRACEIOC_PROVMODSYMS\t(DTRACEIOC | 31)\t/* APPLE ONLY, provide missing symbols for a given module */\n#define DTRACEIOC_PROCWAITFOR\t(DTRACEIOC | 32)\t/* APPLE ONLY, wait for process exec */\n#define DTRACEIOC_SLEEP \t(DTRACEIOC | 33)\t/* APPLE ONLY, sleep */\n#define DTRACEIOC_SIGNAL\t(DTRACEIOC | 34)\t/* APPLE ONLY, signal sleeping process */\n\n/*\n * The following structs are used to provide symbol information to the kernel from userspace.\n */\n\ntypedef struct dtrace_symbol {\n\tuint64_t\tdtsym_addr;\t\t\t/* address of the symbol */\n\tuint64_t\tdtsym_size;\t\t\t/* size of the symbol, must be uint64_t to maintain alignment when called by 64b uproc in i386 kernel */\n\tchar \t\tdtsym_name[DTRACE_FUNCNAMELEN];\t/* symbol name */\n} dtrace_symbol_t;\n\ntypedef struct dtrace_module_symbols {\n\tUUID\t\tdtmodsyms_uuid;\n\tuint64_t\tdtmodsyms_count;\n\tdtrace_symbol_t\tdtmodsyms_symbols[1];\n} dtrace_module_symbols_t;\n\n/*\n * Safely compute the size in bytes of space we need to copyin module's symbols from userspace.\n * Assumes that count has been checked to be at least 1.\n */\n#define DTRACE_MODULE_SYMBOLS_SIZE(count) ({\\\n\t\tsize_t _sym_count = (size_t)(count - 1); \\\n\t\tsize_t _buf_size = 0; \\\n\t\tif (os_mul_and_add_overflow(_sym_count, \\\n\t\t\t\t\t\t\t\t\tsizeof(dtrace_symbol_t), \\\n\t\t\t\t\t\t\t\t\tsizeof(dtrace_module_symbols_t), \\\n\t\t\t\t\t\t\t\t\t&_buf_size)) { \\\n\t\t\t_buf_size = 0; \\\n\t\t} \\\n\t\t_buf_size; })\n\ntypedef struct dtrace_module_uuids_list {\n\tuint64_t\tdtmul_count;\n\tUUID\t\tdtmul_uuid[1];\n} dtrace_module_uuids_list_t;\n\n#define DTRACE_MODULE_UUIDS_LIST_SIZE(count) (sizeof(dtrace_module_uuids_list_t) + ((count - 1) * sizeof(UUID)))\n\ntypedef struct dtrace_procdesc {\n\t/* Must be specified by user-space */\n\tchar\t\tp_name[128];\n\t/* Set or modified by the Kernel */\n\tint\t\tp_name_length;\n\tpid_t\t\tp_pid;\n} dtrace_procdesc_t;\n\n/**\n * DTrace wake reasons.\n * This is used in userspace to determine what's the reason why it woke up,\n * to start aggregating / switching buffer right away if it is because a buffer\n * got over its limit\n */\n#define DTRACE_WAKE_TIMEOUT 0 /* dtrace client woke up because of a timeout */\n#define DTRACE_WAKE_BUF_LIMIT 1 /* dtrace client woke up because of a over limit buffer */\n\n#endif /* __APPLE__ */\n\n/*\n * DTrace Helpers\n *\n * In general, DTrace establishes probes in processes and takes actions on\n * processes without knowing their specific user-level structures.  Instead of\n * existing in the framework, process-specific knowledge is contained by the\n * enabling D program -- which can apply process-specific knowledge by making\n * appropriate use of DTrace primitives like copyin() and copyinstr() to\n * operate on user-level data.  However, there may exist some specific probes\n * of particular semantic relevance that the application developer may wish to\n * explicitly export.  For example, an application may wish to export a probe\n * at the point that it begins and ends certain well-defined transactions.  In\n * addition to providing probes, programs may wish to offer assistance for\n * certain actions.  For example, in highly dynamic environments (e.g., Java),\n * it may be difficult to obtain a stack trace in terms of meaningful symbol\n * names (the translation from instruction addresses to corresponding symbol\n * names may only be possible in situ); these environments may wish to define\n * a series of actions to be applied in situ to obtain a meaningful stack\n * trace.\n *\n * These two mechanisms -- user-level statically defined tracing and assisting\n * DTrace actions -- are provided via DTrace _helpers_.  Helpers are specified\n * via DOF, but unlike enabling DOF, helper DOF may contain definitions of\n * providers, probes and their arguments.  If a helper wishes to provide\n * action assistance, probe descriptions and corresponding DIF actions may be\n * specified in the helper DOF.  For such helper actions, however, the probe\n * description describes the specific helper:  all DTrace helpers have the\n * provider name \"dtrace\" and the module name \"helper\", and the name of the\n * helper is contained in the function name (for example, the ustack() helper\n * is named \"ustack\").  Any helper-specific name may be contained in the name\n * (for example, if a helper were to have a constructor, it might be named\n * \"dtrace:helper:<helper>:init\").  Helper actions are only called when the\n * action that they are helping is taken.  Helper actions may only return DIF\n * expressions, and may only call the following subroutines:\n *\n *    alloca()      <= Allocates memory out of the consumer's scratch space\n *    bcopy()       <= Copies memory to scratch space\n *    copyin()      <= Copies memory from user-level into consumer's scratch\n *    copyinto()    <= Copies memory into a specific location in scratch\n *    copyinstr()   <= Copies a string into a specific location in scratch\n *\n * Helper actions may only access the following built-in variables:\n *\n *    curthread     <= Current kthread_t pointer\n *    tid           <= Current thread identifier\n *    pid           <= Current process identifier\n *    ppid          <= Parent process identifier\n *    uid           <= Current user ID\n *    gid           <= Current group ID\n *    execname      <= Current executable name\n *    zonename      <= Current zone name\n *\n * Helper actions may not manipulate or allocate dynamic variables, but they\n * may have clause-local and statically-allocated global variables.  The\n * helper action variable state is specific to the helper action -- variables\n * used by the helper action may not be accessed outside of the helper\n * action, and the helper action may not access variables that like outside\n * of it.  Helper actions may not load from kernel memory at-large; they are\n * restricting to loading current user state (via copyin() and variants) and\n * scratch space.  As with probe enablings, helper actions are executed in\n * program order.  The result of the helper action is the result of the last\n * executing helper expression.\n *\n * Helpers -- composed of either providers/probes or probes/actions (or both)\n * -- are added by opening the \"helper\" minor node, and issuing an ioctl(2)\n * (DTRACEHIOC_ADDDOF) that specifies the dof_helper_t structure. This\n * encapsulates the name and base address of the user-level library or\n * executable publishing the helpers and probes as well as the DOF that\n * contains the definitions of those helpers and probes.\n *\n * The DTRACEHIOC_ADD and DTRACEHIOC_REMOVE are left in place for legacy\n * helpers and should no longer be used.  No other ioctls are valid on the\n * helper minor node.\n */\n#if !defined(__APPLE__)\n#define DTRACEHIOC              (('d' << 24) | ('t' << 16) | ('h' << 8))\n#define DTRACEHIOC_ADD          (DTRACEHIOC | 1)        /* add helper */\n#define DTRACEHIOC_REMOVE       (DTRACEHIOC | 2)        /* remove helper */\n#define DTRACEHIOC_ADDDOF       (DTRACEHIOC | 3)        /* add helper DOF */\n#else\n#define DTRACEHIOC_REMOVE\t_IO('h', 2)\t\t\t/* remove helper */\n#define DTRACEHIOC_ADDDOF\t_IOW('h', 4, user_addr_t)\t/* add helper DOF */\n#endif /* __APPLE__ */\n\ntypedef struct dof_helper {\n        char dofhp_mod[DTRACE_MODNAMELEN];      /* executable or library name */\n        uint64_t dofhp_addr;                    /* base address of object */\n        uint64_t dofhp_dof;                     /* address of helper DOF */\n} dof_helper_t;\n\n#if defined(__APPLE__)\n/*\n * This structure is used to register one or more dof_helper_t(s).\n * For counts greater than one, malloc the structure as if the\n * dofiod_helpers field was \"count\" sized. The kernel will copyin\n * data of size:\n *\n * sizeof(dof_ioctl_data_t) + ((count - 1) * sizeof(dof_helper_t))\n */\ntypedef struct dof_ioctl_data {\n\t/*\n\t * This field must be 64 bits to keep the alignment the same\n\t * when 64 bit user procs are sending data to 32 bit xnu\n\t */\n\tuint64_t dofiod_count;\n\tdof_helper_t dofiod_helpers[1];\n} dof_ioctl_data_t;\n\n#define DOF_IOCTL_DATA_T_SIZE(count) (sizeof(dof_ioctl_data_t) + ((count - 1) * sizeof(dof_helper_t)))\n\n#endif\n\n#define DTRACEMNR_DTRACE        \"dtrace\"        /* node for DTrace ops */\n#if !defined(__APPLE__)\n#define\tDTRACEMNR_HELPER\t\"helper\"\t/* node for helpers */\n#else\n#define DTRACEMNR_HELPER        \"dtracehelper\"  /* node for helpers */\n#endif /* __APPLE__ */\n#define DTRACEMNRN_DTRACE       0               /* minor for DTrace ops */\n#define DTRACEMNRN_HELPER       1               /* minor for helpers */\n#define DTRACEMNRN_CLONE        2               /* first clone minor */\n\n#ifdef _KERNEL\n\n/*\n * DTrace Provider API\n *\n * The following functions are implemented by the DTrace framework and are\n * used to implement separate in-kernel DTrace providers.  Common functions\n * are provided in uts/common/os/dtrace.c.  ISA-dependent subroutines are\n * defined in uts/<isa>/dtrace/dtrace_asm.s or uts/<isa>/dtrace/dtrace_isa.c.\n *\n * The provider API has two halves:  the API that the providers consume from\n * DTrace, and the API that providers make available to DTrace.\n *\n * 1 Framework-to-Provider API\n *\n * 1.1  Overview\n *\n * The Framework-to-Provider API is represented by the dtrace_pops structure\n * that the provider passes to the framework when registering itself.  This\n * structure consists of the following members:\n *\n *   dtps_provide()          <-- Provide all probes, all modules\n *   dtps_provide_module()   <-- Provide all probes in specified module\n *   dtps_enable()           <-- Enable specified probe\n *   dtps_disable()          <-- Disable specified probe\n *   dtps_suspend()          <-- Suspend specified probe\n *   dtps_resume()           <-- Resume specified probe\n *   dtps_getargdesc()       <-- Get the argument description for args[X]\n *   dtps_getargval()        <-- Get the value for an argX or args[X] variable\n *   dtps_usermode()         <-- Find out if the probe was fired in user mode\n *   dtps_destroy()          <-- Destroy all state associated with this probe\n *\n * 1.2  void dtps_provide(void *arg, const dtrace_probedesc_t *spec)\n *\n * 1.2.1  Overview\n *\n *   Called to indicate that the provider should provide all probes.  If the\n *   specified description is non-NULL, dtps_provide() is being called because\n *   no probe matched a specified probe -- if the provider has the ability to\n *   create custom probes, it may wish to create a probe that matches the\n *   specified description.\n *\n * 1.2.2  Arguments and notes\n *\n *   The first argument is the cookie as passed to dtrace_register().  The\n *   second argument is a pointer to a probe description that the provider may\n *   wish to consider when creating custom probes.  The provider is expected to\n *   call back into the DTrace framework via dtrace_probe_create() to create\n *   any necessary probes.  dtps_provide() may be called even if the provider\n *   has made available all probes; the provider should check the return value\n *   of dtrace_probe_create() to handle this case.  Note that the provider need\n *   not implement both dtps_provide() and dtps_provide_module(); see\n *   \"Arguments and Notes\" for dtrace_register(), below.\n *\n * 1.2.3  Return value\n *\n *   None.\n *\n * 1.2.4  Caller's context\n *\n *   dtps_provide() is typically called from open() or ioctl() context, but may\n *   be called from other contexts as well.  The DTrace framework is locked in\n *   such a way that providers may not register or unregister.  This means that\n *   the provider may not call any DTrace API that affects its registration with\n *   the framework, including dtrace_register(), dtrace_unregister(),\n *   dtrace_invalidate(), and dtrace_condense().  However, the context is such\n *   that the provider may (and indeed, is expected to) call probe-related\n *   DTrace routines, including dtrace_probe_create(), dtrace_probe_lookup(),\n *   and dtrace_probe_arg().\n *\n * 1.3  void dtps_provide_module(void *arg, struct modctl *mp)\n *\n * 1.3.1  Overview\n *\n *   Called to indicate that the provider should provide all probes in the\n *   specified module.\n *\n * 1.3.2  Arguments and notes\n *\n *   The first argument is the cookie as passed to dtrace_register().  The\n *   second argument is a pointer to a modctl structure that indicates the\n *   module for which probes should be created.\n *\n * 1.3.3  Return value\n *\n *   None.\n *\n * 1.3.4  Caller's context\n *\n *   dtps_provide_module() may be called from open() or ioctl() context, but\n *   may also be called from a module loading context.  mod_lock is held, and\n *   the DTrace framework is locked in such a way that providers may not\n *   register or unregister.  This means that the provider may not call any\n *   DTrace API that affects its registration with the framework, including\n *   dtrace_register(), dtrace_unregister(), dtrace_invalidate(), and\n *   dtrace_condense().  However, the context is such that the provider may (and\n *   indeed, is expected to) call probe-related DTrace routines, including\n *   dtrace_probe_create(), dtrace_probe_lookup(), and dtrace_probe_arg().  Note\n *   that the provider need not implement both dtps_provide() and\n *   dtps_provide_module(); see \"Arguments and Notes\" for dtrace_register(),\n *   below.\n *\n * 1.4  int dtps_enable(void *arg, dtrace_id_t id, void *parg)\n *\n * 1.4.1  Overview\n *\n *   Called to enable the specified probe.\n *\n * 1.4.2  Arguments and notes\n *\n *   The first argument is the cookie as passed to dtrace_register().  The\n *   second argument is the identifier of the probe to be enabled.  The third\n *   argument is the probe argument as passed to dtrace_probe_create().\n *   dtps_enable() will be called when a probe transitions from not being\n *   enabled at all to having one or more ECB.  The number of ECBs associated\n *   with the probe may change without subsequent calls into the provider.\n *   When the number of ECBs drops to zero, the provider will be explicitly\n *   told to disable the probe via dtps_disable().  dtrace_probe() should never\n *   be called for a probe identifier that hasn't been explicitly enabled via\n *   dtps_enable().\n *\n * 1.4.3  Return value\n *\n *   On success, dtps_enable() should return 0. On failure, -1 should be\n *   returned.\n *\n * 1.4.4  Caller's context\n *\n *   The DTrace framework is locked in such a way that it may not be called\n *   back into at all.  cpu_lock is held.  mod_lock is not held and may not\n *   be acquired.\n *\n * 1.5  void dtps_disable(void *arg, dtrace_id_t id, void *parg)\n *\n * 1.5.1  Overview\n *\n *   Called to disable the specified probe.\n *\n * 1.5.2  Arguments and notes\n *\n *   The first argument is the cookie as passed to dtrace_register().  The\n *   second argument is the identifier of the probe to be disabled.  The third\n *   argument is the probe argument as passed to dtrace_probe_create().\n *   dtps_disable() will be called when a probe transitions from being enabled\n *   to having zero ECBs.  dtrace_probe() should never be called for a probe\n *   identifier that has been explicitly enabled via dtps_disable().\n *\n * 1.5.3  Return value\n *\n *   None.\n *\n * 1.5.4  Caller's context\n *\n *   The DTrace framework is locked in such a way that it may not be called\n *   back into at all.  cpu_lock is held.  mod_lock is not held and may not\n *   be acquired.\n *\n * 1.6  void dtps_suspend(void *arg, dtrace_id_t id, void *parg)\n *\n * 1.6.1  Overview\n *\n *   Called to suspend the specified enabled probe.  This entry point is for\n *   providers that may need to suspend some or all of their probes when CPUs\n *   are being powered on or when the boot monitor is being entered for a\n *   prolonged period of time.\n *\n * 1.6.2  Arguments and notes\n *\n *   The first argument is the cookie as passed to dtrace_register().  The\n *   second argument is the identifier of the probe to be suspended.  The\n *   third argument is the probe argument as passed to dtrace_probe_create().\n *   dtps_suspend will only be called on an enabled probe.  Providers that\n *   provide a dtps_suspend entry point will want to take roughly the action\n *   that it takes for dtps_disable.\n *\n * 1.6.3  Return value\n *\n *   None.\n *\n * 1.6.4  Caller's context\n *\n *   Interrupts are disabled.  The DTrace framework is in a state such that the\n *   specified probe cannot be disabled or destroyed for the duration of\n *   dtps_suspend().  As interrupts are disabled, the provider is afforded\n *   little latitude; the provider is expected to do no more than a store to\n *   memory.\n *\n * 1.7  void dtps_resume(void *arg, dtrace_id_t id, void *parg)\n *\n * 1.7.1  Overview\n *\n *   Called to resume the specified enabled probe.  This entry point is for\n *   providers that may need to resume some or all of their probes after the\n *   completion of an event that induced a call to dtps_suspend().\n *\n * 1.7.2  Arguments and notes\n *\n *   The first argument is the cookie as passed to dtrace_register().  The\n *   second argument is the identifier of the probe to be resumed.  The\n *   third argument is the probe argument as passed to dtrace_probe_create().\n *   dtps_resume will only be called on an enabled probe.  Providers that\n *   provide a dtps_resume entry point will want to take roughly the action\n *   that it takes for dtps_enable.\n *\n * 1.7.3  Return value\n *\n *   None.\n *\n * 1.7.4  Caller's context\n *\n *   Interrupts are disabled.  The DTrace framework is in a state such that the\n *   specified probe cannot be disabled or destroyed for the duration of\n *   dtps_resume().  As interrupts are disabled, the provider is afforded\n *   little latitude; the provider is expected to do no more than a store to\n *   memory.\n *\n * 1.8  void dtps_getargdesc(void *arg, dtrace_id_t id, void *parg,\n *           dtrace_argdesc_t *desc)\n *\n * 1.8.1  Overview\n *\n *   Called to retrieve the argument description for an args[X] variable.\n *\n * 1.8.2  Arguments and notes\n *\n *   The first argument is the cookie as passed to dtrace_register(). The\n *   second argument is the identifier of the current probe. The third\n *   argument is the probe argument as passed to dtrace_probe_create(). The\n *   fourth argument is a pointer to the argument description.  This\n *   description is both an input and output parameter:  it contains the\n *   index of the desired argument in the dtargd_ndx field, and expects\n *   the other fields to be filled in upon return.  If there is no argument\n *   corresponding to the specified index, the dtargd_ndx field should be set\n *   to DTRACE_ARGNONE.\n *\n * 1.8.3  Return value\n *\n *   None.  The dtargd_ndx, dtargd_native, dtargd_xlate and dtargd_mapping\n *   members of the dtrace_argdesc_t structure are all output values.\n *\n * 1.8.4  Caller's context\n *\n *   dtps_getargdesc() is called from ioctl() context. mod_lock is held, and\n *   the DTrace framework is locked in such a way that providers may not\n *   register or unregister.  This means that the provider may not call any\n *   DTrace API that affects its registration with the framework, including\n *   dtrace_register(), dtrace_unregister(), dtrace_invalidate(), and\n *   dtrace_condense().\n *\n * 1.9  uint64_t dtps_getargval(void *arg, dtrace_id_t id, void *parg,\n *               int argno, int aframes)\n *\n * 1.9.1  Overview\n *\n *   Called to retrieve a value for an argX or args[X] variable.\n *\n * 1.9.2  Arguments and notes\n *\n *   The first argument is the cookie as passed to dtrace_register(). The\n *   second argument is the identifier of the current probe. The third\n *   argument is the probe argument as passed to dtrace_probe_create(). The\n *   fourth argument is the number of the argument (the X in the example in\n *   1.9.1). The fifth argument is the number of stack frames that were used\n *   to get from the actual place in the code that fired the probe to\n *   dtrace_probe() itself, the so-called artificial frames. This argument may\n *   be used to descend an appropriate number of frames to find the correct\n *   values. If this entry point is left NULL, the dtrace_getarg() built-in\n *   function is used.\n *\n * 1.9.3  Return value\n *\n *   The value of the argument.\n *\n * 1.9.4  Caller's context\n *\n *   This is called from within dtrace_probe() meaning that interrupts\n *   are disabled. No locks should be taken within this entry point.\n *\n * 1.10  int dtps_usermode(void *arg, dtrace_id_t id, void *parg)\n *\n * 1.10.1  Overview\n *\n *   Called to determine if the probe was fired in a user context.\n *\n * 1.10.2  Arguments and notes\n *\n *   The first argument is the cookie as passed to dtrace_register(). The\n *   second argument is the identifier of the current probe. The third\n *   argument is the probe argument as passed to dtrace_probe_create().  This\n *   entry point must not be left NULL for providers whose probes allow for\n *   mixed mode tracing, that is to say those probes that can fire during\n *   kernel- _or_ user-mode execution\n *\n * 1.10.3  Return value\n *\n *   A boolean value.\n *\n * 1.10.4  Caller's context\n *\n *   This is called from within dtrace_probe() meaning that interrupts\n *   are disabled. No locks should be taken within this entry point.\n *\n * 1.11 void dtps_destroy(void *arg, dtrace_id_t id, void *parg)\n *\n * 1.11.1 Overview\n *\n *   Called to destroy the specified probe.\n *\n * 1.11.2 Arguments and notes\n *\n *   The first argument is the cookie as passed to dtrace_register().  The\n *   second argument is the identifier of the probe to be destroyed.  The third\n *   argument is the probe argument as passed to dtrace_probe_create().  The\n *   provider should free all state associated with the probe.  The framework\n *   guarantees that dtps_destroy() is only called for probes that have either\n *   been disabled via dtps_disable() or were never enabled via dtps_enable().\n *   Once dtps_disable() has been called for a probe, no further call will be\n *   made specifying the probe.\n *\n * 1.11.3 Return value\n *\n *   None.\n *\n * 1.11.4 Caller's context\n *\n *   The DTrace framework is locked in such a way that it may not be called\n *   back into at all.  mod_lock is held.  cpu_lock is not held, and may not be\n *   acquired.\n *\n *\n * 2 Provider-to-Framework API\n *\n * 2.1  Overview\n *\n * The Provider-to-Framework API provides the mechanism for the provider to\n * register itself with the DTrace framework, to create probes, to lookup\n * probes and (most importantly) to fire probes.  The Provider-to-Framework\n * consists of:\n *\n *   dtrace_register()       <-- Register a provider with the DTrace framework\n *   dtrace_unregister()     <-- Remove a provider's DTrace registration\n *   dtrace_invalidate()     <-- Invalidate the specified provider\n *   dtrace_condense()       <-- Remove a provider's unenabled probes\n *   dtrace_attached()       <-- Indicates whether or not DTrace has attached\n *   dtrace_probe_create()   <-- Create a DTrace probe\n *   dtrace_probe_lookup()   <-- Lookup a DTrace probe based on its name\n *   dtrace_probe_arg()      <-- Return the probe argument for a specific probe\n *   dtrace_probe()          <-- Fire the specified probe\n *\n * 2.2  int dtrace_register(const char *name, const dtrace_pattr_t *pap,\n *          uint32_t priv, cred_t *cr, const dtrace_pops_t *pops, void *arg,\n *          dtrace_provider_id_t *idp)\n *\n * 2.2.1  Overview\n *\n *   dtrace_register() registers the calling provider with the DTrace\n *   framework.  It should generally be called by DTrace providers in their\n *   attach(9E) entry point.\n *\n * 2.2.2  Arguments and Notes\n *\n *   The first argument is the name of the provider.  The second argument is a\n *   pointer to the stability attributes for the provider.  The third argument\n *   is the privilege flags for the provider, and must be some combination of:\n *\n *     DTRACE_PRIV_NONE     <= All users may enable probes from this provider\n *\n *     DTRACE_PRIV_PROC     <= Any user with privilege of PRIV_DTRACE_PROC may\n *                             enable probes from this provider\n *\n *     DTRACE_PRIV_USER     <= Any user with privilege of PRIV_DTRACE_USER may\n *                             enable probes from this provider\n *\n *     DTRACE_PRIV_KERNEL   <= Any user with privilege of PRIV_DTRACE_KERNEL\n *                             may enable probes from this provider\n *\n *     DTRACE_PRIV_OWNER    <= This flag places an additional constraint on\n *                             the privilege requirements above. These probes\n *                             require either (a) a user ID matching the user\n *                             ID of the cred passed in the fourth argument\n *                             or (b) the PRIV_PROC_OWNER privilege.\n *\n *     DTRACE_PRIV_ZONEOWNER<= This flag places an additional constraint on\n *                             the privilege requirements above. These probes\n *                             require either (a) a zone ID matching the zone\n *                             ID of the cred passed in the fourth argument\n *                             or (b) the PRIV_PROC_ZONE privilege.\n *\n *   Note that these flags designate the _visibility_ of the probes, not\n *   the conditions under which they may or may not fire.\n *\n *   The fourth argument is the credential that is associated with the\n *   provider.  This argument should be NULL if the privilege flags don't\n *   include DTRACE_PRIV_OWNER or DTRACE_PRIV_ZONEOWNER.  If non-NULL, the\n *   framework stashes the uid and zoneid represented by this credential\n *   for use at probe-time, in implicit predicates.  These limit visibility\n *   of the probes to users and/or zones which have sufficient privilege to\n *   access them.\n *\n *   The fifth argument is a DTrace provider operations vector, which provides\n *   the implementation for the Framework-to-Provider API.  (See Section 1,\n *   above.)  This must be non-NULL, and each member must be non-NULL.  The\n *   exceptions to this are (1) the dtps_provide() and dtps_provide_module()\n *   members (if the provider so desires, _one_ of these members may be left\n *   NULL -- denoting that the provider only implements the other) and (2)\n *   the dtps_suspend() and dtps_resume() members, which must either both be\n *   NULL or both be non-NULL.\n *\n *   The sixth argument is a cookie to be specified as the first argument for\n *   each function in the Framework-to-Provider API.  This argument may have\n *   any value.\n *\n *   The final argument is a pointer to dtrace_provider_id_t.  If\n *   dtrace_register() successfully completes, the provider identifier will be\n *   stored in the memory pointed to be this argument.  This argument must be\n *   non-NULL.\n *\n * 2.2.3  Return value\n *\n *   On success, dtrace_register() returns 0 and stores the new provider's\n *   identifier into the memory pointed to by the idp argument.  On failure,\n *   dtrace_register() returns an errno:\n *\n *     EINVAL   The arguments passed to dtrace_register() were somehow invalid.\n *              This may because a parameter that must be non-NULL was NULL,\n *              because the name was invalid (either empty or an illegal\n *              provider name) or because the attributes were invalid.\n *\n *   No other failure code is returned.\n *\n * 2.2.4  Caller's context\n *\n *   dtrace_register() may induce calls to dtrace_provide(); the provider must\n *   hold no locks across dtrace_register() that may also be acquired by\n *   dtrace_provide().  cpu_lock and mod_lock must not be held.\n *\n * 2.3  int dtrace_unregister(dtrace_provider_t id)\n *\n * 2.3.1  Overview\n *\n *   Unregisters the specified provider from the DTrace framework.  It should\n *   generally be called by DTrace providers in their detach(9E) entry point.\n *\n * 2.3.2  Arguments and Notes\n *\n *   The only argument is the provider identifier, as returned from a\n *   successful call to dtrace_register().  As a result of calling\n *   dtrace_unregister(), the DTrace framework will call back into the provider\n *   via the dtps_destroy() entry point.  Once dtrace_unregister() successfully\n *   completes, however, the DTrace framework will no longer make calls through\n *   the Framework-to-Provider API.\n *\n * 2.3.3  Return value\n *\n *   On success, dtrace_unregister returns 0.  On failure, dtrace_unregister()\n *   returns an errno:\n *\n *     EBUSY    There are currently processes that have the DTrace pseudodevice\n *              open, or there exists an anonymous enabling that hasn't yet\n *              been claimed.\n *\n *   No other failure code is returned.\n *\n * 2.3.4  Caller's context\n *\n *   Because a call to dtrace_unregister() may induce calls through the\n *   Framework-to-Provider API, the caller may not hold any lock across\n *   dtrace_register() that is also acquired in any of the Framework-to-\n *   Provider API functions.  Additionally, mod_lock may not be held.\n *\n * 2.4  void dtrace_invalidate(dtrace_provider_id_t id)\n *\n * 2.4.1  Overview\n *\n *   Invalidates the specified provider.  All subsequent probe lookups for the\n *   specified provider will fail, but its probes will not be removed.\n *\n * 2.4.2  Arguments and note\n *\n *   The only argument is the provider identifier, as returned from a\n *   successful call to dtrace_register().  In general, a provider's probes\n *   always remain valid; dtrace_invalidate() is a mechanism for invalidating\n *   an entire provider, regardless of whether or not probes are enabled or\n *   not.  Note that dtrace_invalidate() will _not_ prevent already enabled\n *   probes from firing -- it will merely prevent any new enablings of the\n *   provider's probes.\n *\n * 2.5 int dtrace_condense(dtrace_provider_id_t id)\n *\n * 2.5.1  Overview\n *\n *   Removes all the unenabled probes for the given provider. This function is\n *   not unlike dtrace_unregister(), except that it doesn't remove the\n *   provider just as many of its associated probes as it can.\n *\n * 2.5.2  Arguments and Notes\n *\n *   As with dtrace_unregister(), the sole argument is the provider identifier\n *   as returned from a successful call to dtrace_register().  As a result of\n *   calling dtrace_condense(), the DTrace framework will call back into the\n *   given provider's dtps_destroy() entry point for each of the provider's\n *   unenabled probes.\n *\n * 2.5.3  Return value\n *\n *   Currently, dtrace_condense() always returns 0.  However, consumers of this\n *   function should check the return value as appropriate; its behavior may\n *   change in the future.\n *\n * 2.5.4  Caller's context\n *\n *   As with dtrace_unregister(), the caller may not hold any lock across\n *   dtrace_condense() that is also acquired in the provider's entry points.\n *   Also, mod_lock may not be held.\n *\n * 2.6 int dtrace_attached()\n *\n * 2.6.1  Overview\n *\n *   Indicates whether or not DTrace has attached.\n *\n * 2.6.2  Arguments and Notes\n *\n *   For most providers, DTrace makes initial contact beyond registration.\n *   That is, once a provider has registered with DTrace, it waits to hear\n *   from DTrace to create probes.  However, some providers may wish to\n *   proactively create probes without first being told by DTrace to do so.\n *   If providers wish to do this, they must first call dtrace_attached() to\n *   determine if DTrace itself has attached.  If dtrace_attached() returns 0,\n *   the provider must not make any other Provider-to-Framework API call.\n *\n * 2.6.3  Return value\n *\n *   dtrace_attached() returns 1 if DTrace has attached, 0 otherwise.\n *\n * 2.7  int dtrace_probe_create(dtrace_provider_t id, const char *mod,\n *          const char *func, const char *name, int aframes, void *arg)\n *\n * 2.7.1  Overview\n *\n *   Creates a probe with specified module name, function name, and name.\n *\n * 2.7.2  Arguments and Notes\n *\n *   The first argument is the provider identifier, as returned from a\n *   successful call to dtrace_register().  The second, third, and fourth\n *   arguments are the module name, function name, and probe name,\n *   respectively.  Of these, module name and function name may both be NULL\n *   (in which case the probe is considered to be unanchored), or they may both\n *   be non-NULL.  The name must be non-NULL, and must point to a non-empty\n *   string.\n *\n *   The fifth argument is the number of artificial stack frames that will be\n *   found on the stack when dtrace_probe() is called for the new probe.  These\n *   artificial frames will be automatically be pruned should the stack() or\n *   stackdepth() functions be called as part of one of the probe's ECBs.  If\n *   the parameter doesn't add an artificial frame, this parameter should be\n *   zero.\n *\n *   The final argument is a probe argument that will be passed back to the\n *   provider when a probe-specific operation is called.  (e.g., via\n *   dtps_enable(), dtps_disable(), etc.)\n *\n *   Note that it is up to the provider to be sure that the probe that it\n *   creates does not already exist -- if the provider is unsure of the probe's\n *   existence, it should assure its absence with dtrace_probe_lookup() before\n *   calling dtrace_probe_create().\n *\n * 2.7.3  Return value\n *\n *   dtrace_probe_create() always succeeds, and always returns the identifier\n *   of the newly-created probe.\n *\n * 2.7.4  Caller's context\n *\n *   While dtrace_probe_create() is generally expected to be called from\n *   dtps_provide() and/or dtps_provide_module(), it may be called from other\n *   non-DTrace contexts.  Neither cpu_lock nor mod_lock may be held.\n *\n * 2.8  dtrace_id_t dtrace_probe_lookup(dtrace_provider_t id, const char *mod,\n *          const char *func, const char *name)\n *\n * 2.8.1  Overview\n *\n *   Looks up a probe based on provdider and one or more of module name,\n *   function name and probe name.\n *\n * 2.8.2  Arguments and Notes\n *\n *   The first argument is the provider identifier, as returned from a\n *   successful call to dtrace_register().  The second, third, and fourth\n *   arguments are the module name, function name, and probe name,\n *   respectively.  Any of these may be NULL; dtrace_probe_lookup() will return\n *   the identifier of the first probe that is provided by the specified\n *   provider and matches all of the non-NULL matching criteria.\n *   dtrace_probe_lookup() is generally used by a provider to be check the\n *   existence of a probe before creating it with dtrace_probe_create().\n *\n * 2.8.3  Return value\n *\n *   If the probe exists, returns its identifier.  If the probe does not exist,\n *   return DTRACE_IDNONE.\n *\n * 2.8.4  Caller's context\n *\n *   While dtrace_probe_lookup() is generally expected to be called from\n *   dtps_provide() and/or dtps_provide_module(), it may also be called from\n *   other non-DTrace contexts.  Neither cpu_lock nor mod_lock may be held.\n *\n * 2.9  void *dtrace_probe_arg(dtrace_provider_t id, dtrace_id_t probe)\n *\n * 2.9.1  Overview\n *\n *   Returns the probe argument associated with the specified probe.\n *\n * 2.9.2  Arguments and Notes\n *\n *   The first argument is the provider identifier, as returned from a\n *   successful call to dtrace_register().  The second argument is a probe\n *   identifier, as returned from dtrace_probe_lookup() or\n *   dtrace_probe_create().  This is useful if a probe has multiple\n *   provider-specific components to it:  the provider can create the probe\n *   once with provider-specific state, and then add to the state by looking\n *   up the probe based on probe identifier.\n *\n * 2.9.3  Return value\n *\n *   Returns the argument associated with the specified probe.  If the\n *   specified probe does not exist, or if the specified probe is not provided\n *   by the specified provider, NULL is returned.\n *\n * 2.9.4  Caller's context\n *\n *   While dtrace_probe_arg() is generally expected to be called from\n *   dtps_provide() and/or dtps_provide_module(), it may also be called from\n *   other non-DTrace contexts.  Neither cpu_lock nor mod_lock may be held.\n *\n * 2.10  void dtrace_probe(dtrace_id_t probe, uintptr_t arg0, uintptr_t arg1,\n *              uintptr_t arg2, uintptr_t arg3, uintptr_t arg4)\n *\n * 2.10.1  Overview\n *\n *   The epicenter of DTrace:  fires the specified probes with the specified\n *   arguments.\n *\n * 2.10.2  Arguments and Notes\n *\n *   The first argument is a probe identifier as returned by\n *   dtrace_probe_create() or dtrace_probe_lookup().  The second through sixth\n *   arguments are the values to which the D variables \"arg0\" through \"arg4\"\n *   will be mapped.\n *\n *   dtrace_probe() should be called whenever the specified probe has fired --\n *   however the provider defines it.\n *\n * 2.10.3  Return value\n *\n *   None.\n *\n * 2.10.4  Caller's context\n *\n *   dtrace_probe() may be called in virtually any context:  kernel, user,\n *   interrupt, high-level interrupt, with arbitrary adaptive locks held, with\n *   dispatcher locks held, with interrupts disabled, etc.  The only latitude\n *   that must be afforded to DTrace is the ability to make calls within\n *   itself (and to its in-kernel subroutines) and the ability to access\n *   arbitrary (but mapped) memory.  On some platforms, this constrains\n *   context.  For example, on UltraSPARC, dtrace_probe() cannot be called\n *   from any context in which TL is greater than zero.  dtrace_probe() may\n *   also not be called from any routine which may be called by dtrace_probe()\n *   -- which includes functions in the DTrace framework and some in-kernel\n *   DTrace subroutines.  All such functions \"dtrace_\"; providers that\n *   instrument the kernel arbitrarily should be sure to not instrument these\n *   routines.\n */\ntypedef struct dtrace_pops {\n        void (*dtps_provide)(void *arg, const dtrace_probedesc_t *spec);\n        void (*dtps_provide_module)(void *arg, struct modctl *mp);\n        int (*dtps_enable)(void *arg, dtrace_id_t id, void *parg);\n        void (*dtps_disable)(void *arg, dtrace_id_t id, void *parg);\n        void (*dtps_suspend)(void *arg, dtrace_id_t id, void *parg);\n        void (*dtps_resume)(void *arg, dtrace_id_t id, void *parg);\n        void (*dtps_getargdesc)(void *arg, dtrace_id_t id, void *parg,\n            dtrace_argdesc_t *desc);\n        uint64_t (*dtps_getargval)(void *arg, dtrace_id_t id, void *parg,\n            int argno, int aframes);\n        int (*dtps_usermode)(void *arg, dtrace_id_t id, void *parg);\n        void (*dtps_destroy)(void *arg, dtrace_id_t id, void *parg);\n} dtrace_pops_t;\n\ntypedef uintptr_t       dtrace_provider_id_t;\n\nextern int dtrace_register(const char *, const dtrace_pattr_t *, uint32_t,\n    cred_t *, const dtrace_pops_t *, void *, dtrace_provider_id_t *);\nextern int dtrace_unregister(dtrace_provider_id_t);\nextern int dtrace_condense(dtrace_provider_id_t);\nextern void dtrace_invalidate(dtrace_provider_id_t);\nextern dtrace_id_t dtrace_probe_lookup(dtrace_provider_id_t, const char *,\n    const char *, const char *);\nextern dtrace_id_t dtrace_probe_create(dtrace_provider_id_t, const char *,\n    const char *, const char *, int, void *);\nextern void *dtrace_probe_arg(dtrace_provider_id_t, dtrace_id_t);\n#if !defined(__APPLE__)\nextern void dtrace_probe(dtrace_id_t, uintptr_t arg0, uintptr_t arg1,\n    uintptr_t arg2, uintptr_t arg3, uintptr_t arg4);\n#else\nextern void dtrace_probe(dtrace_id_t, uint64_t arg0, uint64_t arg1,\n    uint64_t arg2, uint64_t arg3, uint64_t arg4);\n#endif /* __APPLE__ */\n\n/*\n * DTrace Meta Provider API\n *\n * The following functions are implemented by the DTrace framework and are\n * used to implement meta providers. Meta providers plug into the DTrace\n * framework and are used to instantiate new providers on the fly. At\n * present, there is only one type of meta provider and only one meta\n * provider may be registered with the DTrace framework at a time. The\n * sole meta provider type provides user-land static tracing facilities\n * by taking meta probe descriptions and adding a corresponding provider\n * into the DTrace framework.\n *\n * 1 Framework-to-Provider\n *\n * 1.1 Overview\n *\n * The Framework-to-Provider API is represented by the dtrace_mops structure\n * that the meta provider passes to the framework when registering itself as\n * a meta provider. This structure consists of the following members:\n *\n *   dtms_create_probe()        <-- Add a new probe to a created provider\n *   dtms_provide_proc()         <-- Create a new provider for a given process\n *   dtms_remove_proc()          <-- Remove a previously created provider\n *\n * 1.2  void dtms_create_probe(void *arg, void *parg,\n *           dtrace_helper_probedesc_t *probedesc);\n *\n * 1.2.1  Overview\n *\n *   Called by the DTrace framework to create a new probe in a provider\n *   created by this meta provider.\n *\n * 1.2.2  Arguments and notes\n *\n *   The first argument is the cookie as passed to dtrace_meta_register().\n *   The second argument is the provider cookie for the associated provider;\n *   this is obtained from the return value of dtms_provide_proc(). The third\n *   argument is the helper probe description.\n *\n * 1.2.3  Return value\n *\n *   None\n *\n * 1.2.4  Caller's context\n *\n *   dtms_create_probe() is called from either ioctl() or module load context.\n *   The DTrace framework is locked in such a way that meta providers may not\n *   register or unregister. This means that the meta provider cannot call\n *   dtrace_meta_register() or dtrace_meta_unregister(). However, the context is\n *   such that the provider may (and is expected to) call provider-related\n *   DTrace provider APIs including dtrace_probe_create().\n *\n * 1.3  void *dtms_provide_proc(void *arg, dtrace_meta_provider_t *mprov,\n *            proc_t *proc)\n *\n * 1.3.1  Overview\n *\n *   Called by the DTrace framework to instantiate a new provider given the\n *   description of the provider and probes in the mprov argument. The\n *   meta provider should call dtrace_register() to insert the new provider\n *   into the DTrace framework.\n *\n * 1.3.2  Arguments and notes\n *\n *   The first argument is the cookie as passed to dtrace_meta_register().\n *   The second argument is a pointer to a structure describing the new\n *   helper provider. The third argument is the process identifier for\n *   process associated with this new provider. Note that the name of the\n *   provider as passed to dtrace_register() should be the contatenation of\n *   the dtmpb_provname member of the mprov argument and the processs\n *   identifier as a string.\n *\n * 1.3.3  Return value\n *\n *   The cookie for the provider that the meta provider creates. This is\n *   the same value that it passed to dtrace_register().\n *\n * 1.3.4  Caller's context\n *\n *   dtms_provide_proc() is called from either ioctl() or module load context.\n *   The DTrace framework is locked in such a way that meta providers may not\n *   register or unregister. This means that the meta provider cannot call\n *   dtrace_meta_register() or dtrace_meta_unregister(). However, the context\n *   is such that the provider may -- and is expected to --  call\n *   provider-related DTrace provider APIs including dtrace_register().\n *\n * 1.4  void dtms_remove_proc(void *arg, dtrace_meta_provider_t *mprov,\n *           proc_t proc)\n *\n * 1.4.1  Overview\n *\n *   Called by the DTrace framework to remove a provider that had previously\n *   been instantiated via the dtms_provide_pid() entry point. The meta\n *   provider need not remove the provider immediately, but this entry\n *   point indicates that the provider should be removed as soon as possible\n *   using the dtrace_unregister() API.\n *\n * 1.4.2  Arguments and notes\n *\n *   The first argument is the cookie as passed to dtrace_meta_register().\n *   The second argument is a pointer to a structure describing the helper\n *   provider. The third argument is the process identifier for process\n *   associated with this new provider.\n *\n * 1.4.3  Return value\n *\n *   None\n *\n * 1.4.4  Caller's context\n *\n *   dtms_remove_proc() is called from either ioctl() or exit() context.\n *   The DTrace framework is locked in such a way that meta providers may not\n *   register or unregister. This means that the meta provider cannot call\n *   dtrace_meta_register() or dtrace_meta_unregister(). However, the context\n *   is such that the provider may -- and is expected to -- call\n *   provider-related DTrace provider APIs including dtrace_unregister().\n */\ntypedef struct dtrace_helper_probedesc {\n\tchar *dthpb_mod;\t\t\t/* probe module */\n\tchar *dthpb_func; \t\t\t/* probe function */\n\tchar *dthpb_name; \t\t\t/* probe name */\n\tuint64_t dthpb_base;\t\t\t/* base address */\n#if !defined(__APPLE__)\n\tuint32_t *dthpb_offs;\t\t\t/* offsets array */\n\tuint32_t *dthpb_enoffs;\t\t\t/* is-enabled offsets array */\n#else\n\tint32_t *dthpb_offs;\t\t\t/* (signed) offsets array */\n\tint32_t *dthpb_enoffs;\t\t\t/* (signed) is-enabled offsets array */\n#endif\n\tuint32_t dthpb_noffs;\t\t\t/* offsets count */\n\tuint32_t dthpb_nenoffs;\t\t\t/* is-enabled offsets count */\n\tuint8_t *dthpb_args;\t\t\t/* argument mapping array */\n\tuint8_t dthpb_xargc;\t\t\t/* translated argument count */\n\tuint8_t dthpb_nargc;\t\t\t/* native argument count */\n\tchar *dthpb_xtypes;\t\t\t/* translated types strings */\n\tchar *dthpb_ntypes;\t\t\t/* native types strings */\n} dtrace_helper_probedesc_t;\n\ntypedef struct dtrace_helper_provdesc {\n        char *dthpv_provname;                   /* provider name */\n        dtrace_pattr_t dthpv_pattr;             /* stability attributes */\n} dtrace_helper_provdesc_t;\n\n/*\n * APPLE NOTE: dtms_provide_pid and dtms_remove_pid are replaced with\n * dtms_provide_proc on Darwin, and a proc reference need to be held\n * for the duration of the call.\n *\n * This is due to the fact that proc_find is not re-entrant on Darwin.\n */\n\ntypedef struct dtrace_mops {\n        void (*dtms_create_probe)(void *, void *, dtrace_helper_probedesc_t *);\n        void *(*dtms_provide_proc)(void *, dtrace_helper_provdesc_t *, proc_t*);\n        void (*dtms_remove_proc)(void *, dtrace_helper_provdesc_t *, proc_t*);\n        char* (*dtms_provider_name)(void *);\n} dtrace_mops_t;\n\ntypedef uintptr_t       dtrace_meta_provider_id_t;\n\nextern int dtrace_meta_register(const char *, const dtrace_mops_t *, void *,\n    dtrace_meta_provider_id_t *);\nextern int dtrace_meta_unregister(dtrace_meta_provider_id_t);\n\n/*\n * DTrace Kernel Hooks\n *\n * The following functions are implemented by the base kernel and form a set of\n * hooks used by the DTrace framework.  DTrace hooks are implemented in either\n * uts/common/os/dtrace_subr.c, an ISA-specific assembly file, or in a\n * uts/<platform>/os/dtrace_subr.c corresponding to each hardware platform.\n */\n\ntypedef enum dtrace_vtime_state {\n        DTRACE_VTIME_INACTIVE = 0,      /* No DTrace, no TNF */\n        DTRACE_VTIME_ACTIVE,            /* DTrace virtual time, no TNF */\n        DTRACE_VTIME_INACTIVE_TNF,      /* No DTrace, TNF active */\n        DTRACE_VTIME_ACTIVE_TNF         /* DTrace virtual time _and_ TNF */\n} dtrace_vtime_state_t;\n\nextern dtrace_vtime_state_t dtrace_vtime_active;\nextern void dtrace_vtime_switch(kthread_t *next);\nextern void dtrace_vtime_enable_tnf(void);\nextern void dtrace_vtime_disable_tnf(void);\nextern void dtrace_vtime_enable(void);\nextern void dtrace_vtime_disable(void);\n\n#if !defined(__APPLE__)\nstruct regs;\n\nextern int (*dtrace_pid_probe_ptr)(struct regs *);\nextern int (*dtrace_return_probe_ptr)(struct regs *);\n#else\n#if defined (__i386__) || defined(__x86_64__)\nextern int (*dtrace_pid_probe_ptr)(x86_saved_state_t *regs);\nextern int (*dtrace_return_probe_ptr)(x86_saved_state_t* regs);\n#elif defined (__arm__) || defined(__arm64__)\nextern int (*dtrace_pid_probe_ptr)(arm_saved_state_t *regs);\nextern int (*dtrace_return_probe_ptr)(arm_saved_state_t *regs);\n#else\n#error architecture not supported\n#endif\n#endif /* __APPLE__ */\nextern void (*dtrace_fasttrap_fork_ptr)(proc_t *, proc_t *);\nextern void (*dtrace_fasttrap_exec_ptr)(proc_t *);\nextern void (*dtrace_fasttrap_exit_ptr)(proc_t *);\nextern void dtrace_fasttrap_fork(proc_t *, proc_t *);\n\ntypedef uintptr_t dtrace_icookie_t;\ntypedef void (*dtrace_xcall_t)(void *);\n\nextern dtrace_icookie_t dtrace_interrupt_disable(void);\nextern void dtrace_interrupt_enable(dtrace_icookie_t);\n\nextern void dtrace_membar_producer(void);\nextern void dtrace_membar_consumer(void);\n\nextern void (*dtrace_cpu_init)(processorid_t);\n#if !defined(__APPLE__)\nextern void (*dtrace_modload)(struct modctl *);\nextern void (*dtrace_modunload)(struct modctl *);\n#else\nextern int (*dtrace_modload)(struct kmod_info *, uint32_t);\nextern int (*dtrace_modunload)(struct kmod_info *);\n#endif /* __APPLE__ */\nextern void (*dtrace_helpers_cleanup)(proc_t*);\nextern void (*dtrace_helpers_fork)(proc_t *parent, proc_t *child);\nextern void (*dtrace_cpustart_init)(void);\nextern void (*dtrace_cpustart_fini)(void);\n\nextern void (*dtrace_kreloc_init)(void);\nextern void (*dtrace_kreloc_fini)(void);\n\nextern void (*dtrace_debugger_init)(void);\nextern void (*dtrace_debugger_fini)(void);\nextern dtrace_cacheid_t dtrace_predcache_id;\n\nextern hrtime_t dtrace_gethrtime(void);\nextern void dtrace_sync(void);\nextern void dtrace_toxic_ranges(void (*)(uintptr_t, uintptr_t));\nextern void dtrace_xcall(processorid_t, dtrace_xcall_t, void *);\n\n#if defined(__i386__) || defined(__x86_64__)\nextern int dtrace_instr_size(uchar_t *instr);\nextern int dtrace_instr_size_isa(uchar_t *, model_t, int *);\nextern void dtrace_invop_add(int (*)(uintptr_t, uintptr_t *, uintptr_t));\nextern void dtrace_invop_remove(int (*)(uintptr_t, uintptr_t *, uintptr_t));\nextern void *dtrace_invop_callsite_pre;\nextern void *dtrace_invop_callsite_post;\n#endif\n\n#if defined(__arm__)\nextern int dtrace_instr_size(uint32_t instr, int thumb_mode);\n#endif\n#if defined(__arm__) || defined(__arm64__)\nextern void dtrace_invop_add(int (*)(uintptr_t, uintptr_t *, uintptr_t));    \nextern void dtrace_invop_remove(int (*)(uintptr_t, uintptr_t *, uintptr_t));\nextern void *dtrace_invop_callsite_pre;\nextern void *dtrace_invop_callsite_post;\n#endif\n\n#undef proc_t\n\n#define DTRACE_CPUFLAG_ISSET(flag) \\\n        (cpu_core[CPU->cpu_id].cpuc_dtrace_flags & (flag))\n\n#define DTRACE_CPUFLAG_SET(flag) \\\n        (cpu_core[CPU->cpu_id].cpuc_dtrace_flags |= (flag))\n\n#define DTRACE_CPUFLAG_CLEAR(flag) \\\n        (cpu_core[CPU->cpu_id].cpuc_dtrace_flags &= ~(flag))\n\n#endif /* _KERNEL */\n\n#endif  /* _ASM */\n\n#if defined(__i386__) || defined(__x86_64__)\n\n#define DTRACE_INVOP_PUSHL_EBP          1\n#define DTRACE_INVOP_POPL_EBP           2\n#define DTRACE_INVOP_LEAVE              3\n#define DTRACE_INVOP_NOP                4\n#define DTRACE_INVOP_RET                5\n\n#endif\n\n#if defined(__arm__) || defined(__arm64__)\n\n#define DTRACE_INVOP_NOP                4\n#define DTRACE_INVOP_RET                5\n#define DTRACE_INVOP_B\t\t\t6\n\n#endif\n\n#ifdef  __cplusplus\n}\n#endif\n\n#endif  /* _SYS_DTRACE_H */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/dtrace_glue.h",
    "content": "/*\n * Copyright (c) 2005-2006 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n\n#ifndef _DTRACE_GLUE_H\n#define _DTRACE_GLUE_H\n\n#ifdef KERNEL_BUILD\n\n#include <libkern/libkern.h>\n#include <kern/cpu_number.h>\n#include <kern/locks.h>\n#include <kern/debug.h>\n#include <kern/thread_call.h>\n#include <kern/thread.h>\n#include <machine/atomic.h>\n#include <machine/machine_routines.h>\n#include <sys/syslog.h>\n#include <sys/ucred.h>\n#include <stdarg.h>\n#include <mach/kmod.h>\n\n#if defined(__i386__) || defined(__x86_64__)\n#include <i386/mp.h>\n#endif\n\n/*\n * cmn_err\n */\n#define CE_NOTE         1       /* notice\t\t*/\n#define CE_WARN         2       /* warning\t\t*/\n\nextern void cmn_err( int, const char *, ... );\n\n/*\n * pid/proc\n */\n\n/* Solaris proc_t is the struct. Darwin's proc_t is a pointer to it. */\n#define proc_t struct proc /* Steer clear of the Darwin typedef for proc_t */\n#define curproc ((struct proc *)current_proc()) /* Called from probe context, must blacklist */\n\nproc_t* sprlock(pid_t pid);\nvoid sprunlock(proc_t *p);\n\nvoid dtrace_sprlock(proc_t *p);\nvoid dtrace_sprunlock(proc_t *p);\n\n/*\n * uread/uwrite\n */\n\nint uread(proc_t *p, void *buf, user_size_t len, user_addr_t a);\nint uwrite(proc_t *p, void *buf, user_size_t len, user_addr_t a);\n\n/*\n * fuword / suword\n */\n\nint fuword8(user_addr_t, uint8_t *);\nint fuword16(user_addr_t, uint16_t *);\nint fuword32(user_addr_t, uint32_t *);\nint fuword64(user_addr_t, uint64_t *);\n\nvoid fuword32_noerr(user_addr_t, uint32_t *);\nvoid fuword64_noerr(user_addr_t, uint64_t *);\n\nint suword64(user_addr_t, uint64_t value);\nint suword32(user_addr_t, uint32_t value);\n\n/*\n * cpuvar\n */\nextern lck_mtx_t cpu_lock;\nextern lck_mtx_t cyc_lock;\nextern lck_mtx_t mod_lock;\n\n/*\n * wrap_timer_call: wrapper of timer_call for cyclic timers.\n */\nstruct wrap_timer_call;\n\n/*\n * Per-CPU data.\n */\ntypedef struct dtrace_cpu {\n\tprocessorid_t   cpu_id;                    /* CPU number */\n\tstruct dtrace_cpu *cpu_next;                 /* next existing CPU */\n\tlck_rw_t        cpu_ft_lock;               /* DTrace: fasttrap lock */\n\tuintptr_t       cpu_dtrace_caller;         /* DTrace: caller, if any */\n\thrtime_t        cpu_dtrace_chillmark;      /* DTrace: chill mark time */\n\thrtime_t        cpu_dtrace_chilled;        /* DTrace: total chill time */\n\tboolean_t       cpu_dtrace_invop_underway; /* DTrace gaurds against invalid op re-entrancy */\n\n\t/* Local cyclic timers on this CPU */\n\tLIST_HEAD(cyc_list_head, wrap_timer_call) cpu_cyc_list;\n} dtrace_cpu_t;\n\nextern dtrace_cpu_t *cpu_list;\n\n/*\n * The cpu_core structure consists of per-CPU state available in any context.\n * On some architectures, this may mean that the page(s) containing the\n * NCPU-sized array of cpu_core structures must be locked in the TLB -- it\n * is up to the platform to assure that this is performed properly.  Note that\n * the structure is sized to avoid false sharing.\n */\n#define CPU_CACHE_COHERENCE_SIZE        64\n\ntypedef struct cpu_core {\n\tuint64_t        cpuc_dtrace_illval;     /* DTrace illegal value */\n\tlck_mtx_t       cpuc_pid_lock;          /* DTrace pid provider lock */\n\tuint16_t        cpuc_dtrace_flags;      /* DTrace flags */\n\tuint64_t        cpuc_missing_tos;       /* Addr. of top most stack frame if missing */\n\tuint8_t         cpuc_pad[CPU_CACHE_COHERENCE_SIZE - sizeof(uint64_t) - sizeof(lck_mtx_t) - sizeof(uint16_t) - sizeof(uint64_t)];        /* padding */\n} cpu_core_t;\n\nextern cpu_core_t *cpu_core;\n\nextern unsigned int dtrace_max_cpus;            /* max number of enabled cpus */\n#define NCPU        dtrace_max_cpus\n\n#define CPU             (&(cpu_list[cpu_number()]))     /* Pointer to current CPU */\n#define CPU_ON_INTR(cpup) ml_at_interrupt_context() /* always invoked on current cpu */\n\n/*\n * Routines used to register interest in cpu's being added to or removed\n * from the system.\n */\ntypedef enum {\n\tCPU_INIT,\n\tCPU_CONFIG,\n\tCPU_UNCONFIG,\n\tCPU_ON,\n\tCPU_OFF,\n\tCPU_CPUPART_IN,\n\tCPU_CPUPART_OUT\n} cpu_setup_t;\n\ntypedef int cpu_setup_func_t(cpu_setup_t, int, void *);\n\nextern void register_cpu_setup_func(cpu_setup_func_t *, void *);\nextern void unregister_cpu_setup_func(cpu_setup_func_t *, void *);\n\n/*\n * CPU_DTRACE\n */\n\n/*\n * DTrace flags.\n */\n#define CPU_DTRACE_NOFAULT      0x0001  /* Don't fault */\n#define CPU_DTRACE_DROP         0x0002  /* Drop this ECB */\n#define CPU_DTRACE_BADADDR      0x0004  /* DTrace fault: bad address */\n#define CPU_DTRACE_BADALIGN     0x0008  /* DTrace fault: bad alignment */\n#define CPU_DTRACE_DIVZERO      0x0010  /* DTrace fault: divide by zero */\n#define CPU_DTRACE_ILLOP        0x0020  /* DTrace fault: illegal operation */\n#define CPU_DTRACE_NOSCRATCH    0x0040  /* DTrace fault: out of scratch */\n#define CPU_DTRACE_KPRIV        0x0080  /* DTrace fault: bad kernel access */\n#define CPU_DTRACE_UPRIV        0x0100  /* DTrace fault: bad user access */\n#define CPU_DTRACE_TUPOFLOW     0x0200  /* DTrace fault: tuple stack overflow */\n#define CPU_DTRACE_USTACK_FP    0x0400  /* pid provider hint to ustack() */\n#define CPU_DTRACE_ENTRY        0x0800  /* pid provider hint to ustack() */\n#define CPU_DTRACE_BADSTACK 0x1000  /* DTrace fault: bad stack */\n\n#define CPU_DTRACE_FAULT        (CPU_DTRACE_BADADDR | CPU_DTRACE_BADALIGN | \\\n\t                        CPU_DTRACE_DIVZERO | CPU_DTRACE_ILLOP | \\\n\t                        CPU_DTRACE_NOSCRATCH | CPU_DTRACE_KPRIV | \\\n\t                        CPU_DTRACE_UPRIV | CPU_DTRACE_TUPOFLOW | \\\n\t                        CPU_DTRACE_BADSTACK)\n#define CPU_DTRACE_ERROR        (CPU_DTRACE_FAULT | CPU_DTRACE_DROP)\n\n/*\n * Loadable Modules\n */\n\n/* Keep the compiler happy */\nstruct dtrace_module_symbols;\n\n/* Solaris' modctl structure, greatly simplified, shadowing parts of xnu kmod structure. */\ntypedef struct modctl {\n\tstruct modctl   *mod_next;\n\tstruct modctl   *mod_stale;     // stale module chain\n\tuint32_t        mod_id;         // the kext unique identifier\n\tchar            mod_modname[KMOD_MAX_NAME];\n\tint             mod_loadcnt;\n\tchar            mod_loaded;\n\tuint16_t        mod_flags;      // See flags below\n\tint             mod_nenabled;   // # of enabled DTrace probes in module\n\tvm_address_t    mod_address;    // starting address (of Mach-o header blob)\n\tvm_size_t       mod_size;       // total size (of blob)\n\tUUID            mod_uuid;\n\tstruct dtrace_module_symbols* mod_user_symbols;\n\t/*\n\t * SDT probe data are directly stored in modctl. That's fine for XNU as modctl serves\n\t * different purpose than on Solaris and is allocated/freed as required.\n\t */\n\tint             mod_sdtprobecnt;  // Amount of provided SDT probes\n\tvoid            *mod_sdtdesc;    // Pointer to sdt_probedesc_t\n} modctl_t;\n\n/* Definitions for mod_flags */\n#define MODCTL_IS_MACH_KERNEL                   0x01  // This module represents /mach_kernel\n#define MODCTL_HAS_KERNEL_SYMBOLS               0x02  // Kernel symbols (nlist) are available\n#define MODCTL_FBT_PROBES_PROVIDED              0x04  // fbt probes have been provided\n#define MODCTL_FBT_INVALID                      0x08  // Module is invalid for fbt probes\n#define MODCTL_SDT_PROBES_PROVIDED              0x10  // sdt probes have been provided\n#define MODCTL_SDT_INVALID                      0x20  // Module is invalid for sdt probes\n#define MODCTL_HAS_UUID                         0x40  // Module has UUID\n#define MODCTL_FBT_PROVIDE_BLACKLISTED_PROBES   0x200 // fbt provider must provide blacklisted probes\n#define MODCTL_FBT_BLACKLISTED_PROBES_PROVIDED  0x400 // fbt blacklisted probes have been provided\n#define MODCTL_IS_STATIC_KEXT                   0x800 // module is a static kext\n\n/* Simple/singular mod_flags accessors */\n#define MOD_IS_MACH_KERNEL(mod)                 (mod->mod_flags & MODCTL_IS_MACH_KERNEL)\n#define MOD_HAS_KERNEL_SYMBOLS(mod)             (mod->mod_flags & MODCTL_HAS_KERNEL_SYMBOLS)\n#define MOD_HAS_USERSPACE_SYMBOLS(mod)          (mod->mod_user_symbols) /* No point in duplicating state in the flags bits */\n#define MOD_FBT_PROBES_PROVIDED(mod)            (mod->mod_flags & MODCTL_FBT_PROBES_PROVIDED)\n#define MOD_FBT_INVALID(mod)                    (mod->mod_flags & MODCTL_FBT_INVALID)\n#define MOD_SDT_PROBES_PROVIDED(mod)            (mod->mod_flags & MODCTL_SDT_PROBES_PROVIDED)\n#define MOD_SDT_INVALID(mod)                    (mod->mod_flags & MODCTL_SDT_INVALID)\n#define MOD_HAS_UUID(mod)                       (mod->mod_flags & MODCTL_HAS_UUID)\n#define MOD_FBT_BLACKLISTED_PROBES_PROVIDED(mod) (mod->mod_flags & MODCTL_FBT_BLACKLISTED_PROBES_PROVIDED)\n#define MOD_FBT_PROVIDE_BLACKLISTED_PROBES(mod) (mod->mod_flags & MODCTL_FBT_PROVIDE_BLACKLISTED_PROBES)\n#define MOD_IS_STATIC_KEXT(mod)                 (mod->mod_flags & MODCTL_IS_STATIC_KEXT)\n\n/* Compound accessors */\n#define MOD_FBT_BLACKLISTED_PROBES_DONE(mod)    (MOD_FBT_BLACKLISTED_PROBES_PROVIDED(mod) || !MOD_FBT_PROVIDE_BLACKLISTED_PROBES(mod))\n#define MOD_FBT_DONE(mod)                       ((MOD_FBT_PROBES_PROVIDED(mod) && MOD_FBT_BLACKLISTED_PROBES_DONE(mod)) || MOD_FBT_INVALID(mod))\n#define MOD_SDT_DONE(mod)                       (MOD_SDT_PROBES_PROVIDED(mod) || MOD_SDT_INVALID(mod))\n#define MOD_SYMBOLS_DONE(mod)                   (MOD_FBT_DONE(mod) && MOD_SDT_DONE(mod))\n\nextern modctl_t *dtrace_modctl_list;\n\nextern int dtrace_addr_in_module(void*, struct modctl*);\n\n/*\n * cred_t\n */\n/* Privileges */\n#define PRIV_DTRACE_KERNEL        3\n#define PRIV_DTRACE_PROC          4\n#define PRIV_DTRACE_USER          5\n#define PRIV_PROC_OWNER          30\n#define PRIV_PROC_ZONE           35\n#define PRIV_ALL                        (-1)    /* All privileges required */\n\n/* Privilege sets */\n#define PRIV_EFFECTIVE            0\n\ntypedef struct ucred cred_t;\n#define cr_suid cr_svuid\n#define cr_sgid cr_svgid\n\nextern cred_t *dtrace_CRED(void); /* Safe to call from probe context. */\n#define CRED() kauth_cred_get() /* Can't be called from probe context! */\nextern int PRIV_POLICY_CHOICE(void *, int, int);\nextern int PRIV_POLICY_ONLY(void *, int, int);\nextern uid_t crgetuid(const cred_t *);\n#define crgetzoneid(x) ((zoneid_t)0)\n\n/*\n * \"cyclic\"\n */\n#define CY_LOW_LEVEL            0\n#define CY_HIGH_LEVEL           2\n#define CY_LEVELS                       3\n\ntypedef uintptr_t cyclic_id_t;\ntypedef cyclic_id_t *cyclic_id_list_t;\ntypedef uint16_t cyc_level_t;\ntypedef void (*cyc_func_t)(void *);\n\n#define CYCLIC_NONE             ((cyclic_id_t)0)\n\ntypedef struct cyc_time {\n\thrtime_t cyt_when;\n\thrtime_t cyt_interval;\n} cyc_time_t;\n\ntypedef struct cyc_handler {\n\tcyc_func_t cyh_func;\n\tvoid *cyh_arg;\n\tcyc_level_t cyh_level;\n} cyc_handler_t;\n\ntypedef struct cyc_omni_handler {\n\tvoid (*cyo_online)(void *, dtrace_cpu_t *, cyc_handler_t *, cyc_time_t *);\n\tvoid (*cyo_offline)(void *, dtrace_cpu_t *, void *);\n\tvoid *cyo_arg;\n} cyc_omni_handler_t;\n\nextern void dtrace_install_cpu_hooks(void);\n\nextern cyclic_id_t cyclic_add(cyc_handler_t *, cyc_time_t *);\nextern void cyclic_remove(cyclic_id_t);\n\nextern cyclic_id_list_t cyclic_add_omni(cyc_omni_handler_t *);\nextern void cyclic_remove_omni(cyclic_id_list_t);\n\nextern cyclic_id_t cyclic_timer_add(cyc_handler_t *, cyc_time_t *);\nextern void cyclic_timer_remove(cyclic_id_t);\n\n/*\n * ddi\n */\n\n#define DDI_SUCCESS                     0\n#define DDI_FAILURE                     -1\n\n#define DDI_PSEUDO \"ddi_pseudo\"\n\ntypedef enum {\n\tDDI_DETACH = 0,\n\tDDI_SUSPEND = 1,\n\tDDI_PM_SUSPEND = 2,\n\tDDI_HOTPLUG_DETACH = 3          /* detach, don't try to auto-unconfig */\n} ddi_detach_cmd_t;\n\n#define DDI_PROP_SUCCESS        0\n\n#define DDI_PROP_DONTPASS   1\ntypedef uint_t major_t;\ntypedef uint_t minor_t;\n\ntypedef struct __dev_info *dev_info_t;\n\nextern int ddi_driver_major(dev_info_t *);\n\nextern int ddi_create_minor_node(dev_info_t *, const char *, int, minor_t, const char *, int);\nextern void ddi_remove_minor_node(dev_info_t *, char *);\n\nextern major_t getemajor(dev_t);\nextern minor_t getminor(dev_t);\n\n/*\n * Kernel Debug Interface\n */\nextern void debug_enter(char *);\n\n/*\n * DTrace specific zone allocation\n */\n\n/*\n * kmem\n */\n\n#define KM_SLEEP        0x00000000\n#define KM_NOSLEEP      0x00000001\n\ntypedef struct vmem vmem_t;\ntypedef struct kmem_cache kmem_cache_t;\n\n#define kmem_free dt_kmem_free /* Avoid clash with Darwin's kmem_free */\n#define kmem_free_aligned dt_kmem_free_aligned\n\n#define kmem_alloc(size, kmflag) \\\n\t({ VM_ALLOC_SITE_STATIC(0, 0); \\\n\tdt_kmem_alloc_site(size, kmflag, &site); })\n\nextern void *dt_kmem_alloc_site(size_t, int, vm_allocation_site_t*);\nextern void dt_kmem_free(void *, size_t);\n\n#define kmem_zalloc(size, kmflag) \\\n\t({ VM_ALLOC_SITE_STATIC(0, 0); \\\n\tdt_kmem_zalloc_site(size, kmflag, &site); })\n\nextern void *dt_kmem_zalloc_site(size_t, int, vm_allocation_site_t*);\n\n#define kmem_alloc_aligned(size, align, kmflag) \\\n\t({ VM_ALLOC_SITE_STATIC(0, 0); \\\n\tdt_kmem_alloc_aligned_site(size, align, kmflag, &site); })\nextern void *dt_kmem_alloc_aligned_site(size_t, size_t, int, vm_allocation_site_t*);\n\n#define kmem_zalloc_aligned(size, align, kmflag) \\\n\t({ VM_ALLOC_SITE_STATIC(0, 0); \\\n\tdt_kmem_zalloc_aligned_site(size, align, kmflag, &site); })\nextern void *dt_kmem_zalloc_aligned_site(size_t, size_t, int, vm_allocation_site_t*);\n\nextern void dt_kmem_free_aligned(void*, size_t);\n\nextern kmem_cache_t *\n    kmem_cache_create(const char *, size_t, size_t, int (*)(void *, void *, int),\n    void (*)(void *, void *), void (*)(void *), void *, vmem_t *, int);\nextern void *kmem_cache_alloc(kmem_cache_t *, int);\nextern void kmem_cache_free(kmem_cache_t *, void *);\nextern void kmem_cache_destroy(kmem_cache_t *);\n\n/*\n * kthread\n */\n\ntypedef struct _kthread kthread_t; /* For dtrace_vtime_switch(), dtrace_panicked and dtrace_errthread */\n\n/*\n * proc\n */\n\n\n#define DATAMODEL_ILP32 0x00100000\n#define DATAMODEL_LP64  0x00200000\n\n#define DATAMODEL_NONE  0\n\n#if     defined(__LP64__)\n#define DATAMODEL_NATIVE        DATAMODEL_LP64\n#else\n#define DATAMODEL_NATIVE        DATAMODEL_ILP32\n#endif  /* __LP64__ */\n\ntypedef unsigned int model_t; /* For dtrace_instr_size_isa() prototype in <sys/dtrace.h> */\n\n/*\n * vmem\n */\n\n#define VMC_IDENTIFIER  0x00040000      /* not backed by memory */\n#define VM_SLEEP        0x00000000      /* same as KM_SLEEP */\n#define VM_BESTFIT      0x00000100\n\nextern void *vmem_alloc(vmem_t *, size_t, int);\nextern vmem_t *vmem_create(const char *, void *, size_t, size_t, void *,\n    void *, vmem_t *, size_t, int);\nextern void vmem_destroy(vmem_t *);\nextern void vmem_free(vmem_t *vmp, void *vaddr, size_t size);\n\n/*\n * Miscellaneous\n */\n\ntypedef uintptr_t pc_t;\ntypedef uintptr_t greg_t; /* For dtrace_impl.h prototype of dtrace_getfp() */\n#if defined(__arm__) || defined(__arm64__)\n#define regs arm_saved_state\n#endif\nextern struct regs *find_user_regs( thread_t thread);\nextern vm_offset_t dtrace_get_cpu_int_stack_top(void);\n\n#define panic_quiesce (panic_active())\n\n#define IS_P2ALIGNED(v, a) ((((uintptr_t)(v)) & ((uintptr_t)(a) - 1)) == 0)\n\nextern int vuprintf(const char *, va_list);\n\nextern hrtime_t dtrace_abs_to_nano(uint64_t);\n\nconst void* bsearch(const void*, const void*, size_t, size_t, int (*compar)(const void *, const void *));\n\nint dtrace_copy_maxsize(void);\nint dtrace_buffer_copyout(const void*, user_addr_t, vm_size_t);\n\n\n#define DTRACE_NCLIENTS 32\n\n#undef proc_t\n\n/*\n * Safe counted string compare against a literal string. The sizeof() intentionally\n * counts the trailing NUL, and so ensures that all the characters in the literal\n * can participate in the comparison.\n */\n#define LIT_STRNEQL(s1, lit_s2) (0 == strncmp( (s1), (lit_s2), sizeof((lit_s2)) ))\n\n#define KERNELBASE VM_MIN_KERNEL_ADDRESS\n#endif /* KERNEL_BUILD */\n#endif /* _DTRACE_GLUE_H */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/dtrace_impl.h",
    "content": "/*\n * CDDL HEADER START\n *\n * The contents of this file are subject to the terms of the\n * Common Development and Distribution License (the \"License\").\n * You may not use this file except in compliance with the License.\n *\n * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE\n * or http://www.opensolaris.org/os/licensing.\n * See the License for the specific language governing permissions\n * and limitations under the License.\n *\n * When distributing Covered Code, include this CDDL HEADER in each\n * file and include the License file at usr/src/OPENSOLARIS.LICENSE.\n * If applicable, add the following below this CDDL HEADER, with the\n * fields enclosed by brackets \"[]\" replaced with your own identifying\n * information: Portions Copyright [yyyy] [name of copyright owner]\n *\n * CDDL HEADER END\n */\n\n/*\n * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.\n * Use is subject to license terms.\n *\n * Portions Copyright (c) 2012 by Delphix. All rights reserved.\n * Portions Copyright (c) 2016 by Joyent, Inc.\n */\n\n#ifndef _SYS_DTRACE_IMPL_H\n#define\t_SYS_DTRACE_IMPL_H\n\n#ifdef\t__cplusplus\nextern \"C\" {\n#endif\n\n/*\n * DTrace Dynamic Tracing Software: Kernel Implementation Interfaces\n *\n * Note: The contents of this file are private to the implementation of the\n * Solaris system and DTrace subsystem and are subject to change at any time\n * without notice.  Applications and drivers using these interfaces will fail\n * to run on future releases.  These interfaces should not be used for any\n * purpose except those expressly outlined in dtrace(7D) and libdtrace(3LIB).\n * Please refer to the \"Solaris Dynamic Tracing Guide\" for more information.\n */\n\n#include <sys/dtrace.h>\n\n/*\n * DTrace Implementation Locks\n */\nextern lck_attr_t dtrace_lck_attr;\nextern lck_grp_t dtrace_lck_grp;\nextern lck_mtx_t dtrace_procwaitfor_lock;\n\n/*\n * DTrace Implementation Constants and Typedefs\n */\n#define\tDTRACE_MAXPROPLEN\t\t128\n#define\tDTRACE_DYNVAR_CHUNKSIZE\t\t256\n\nstruct dtrace_probe;\nstruct dtrace_ecb;\nstruct dtrace_predicate;\nstruct dtrace_action;\nstruct dtrace_provider;\nstruct dtrace_state;\n\ntypedef struct dtrace_probe dtrace_probe_t;\ntypedef struct dtrace_ecb dtrace_ecb_t;\ntypedef struct dtrace_predicate dtrace_predicate_t;\ntypedef struct dtrace_action dtrace_action_t;\ntypedef struct dtrace_provider dtrace_provider_t;\ntypedef struct dtrace_meta dtrace_meta_t;\ntypedef struct dtrace_state dtrace_state_t;\ntypedef uint32_t dtrace_optid_t;\ntypedef uint32_t dtrace_specid_t;\ntypedef uint64_t dtrace_genid_t;\n\n/*\n * DTrace Probes\n *\n * The probe is the fundamental unit of the DTrace architecture.  Probes are\n * created by DTrace providers, and managed by the DTrace framework.  A probe\n * is identified by a unique <provider, module, function, name> tuple, and has\n * a unique probe identifier assigned to it.  (Some probes are not associated\n * with a specific point in text; these are called _unanchored probes_ and have\n * no module or function associated with them.)  Probes are represented as a\n * dtrace_probe structure.  To allow quick lookups based on each element of the\n * probe tuple, probes are hashed by each of provider, module, function and\n * name.  (If a lookup is performed based on a regular expression, a\n * dtrace_probekey is prepared, and a linear search is performed.) Each probe\n * is additionally pointed to by a linear array indexed by its identifier.  The\n * identifier is the provider's mechanism for indicating to the DTrace\n * framework that a probe has fired:  the identifier is passed as the first\n * argument to dtrace_probe(), where it is then mapped into the corresponding\n * dtrace_probe structure.  From the dtrace_probe structure, dtrace_probe() can\n * iterate over the probe's list of enabling control blocks; see \"DTrace\n * Enabling Control Blocks\", below.)\n */\nstruct dtrace_probe {\n\tdtrace_id_t dtpr_id;\t\t\t/* probe identifier */\n\tdtrace_ecb_t *dtpr_ecb;\t\t\t/* ECB list; see below */\n\tdtrace_ecb_t *dtpr_ecb_last;\t\t/* last ECB in list */\n\tvoid *dtpr_arg;\t\t\t\t/* provider argument */\n\tdtrace_cacheid_t dtpr_predcache;\t/* predicate cache ID */\n\tint dtpr_aframes;\t\t\t/* artificial frames */\n\tdtrace_provider_t *dtpr_provider;\t/* pointer to provider */\n\tchar *dtpr_mod;\t\t\t\t/* probe's module name */\n\tchar *dtpr_func;\t\t\t/* probe's function name */\n\tchar *dtpr_name;\t\t\t/* probe's name */\n\tdtrace_probe_t *dtpr_nextprov;\t\t/* next in provider hash */\n\tdtrace_probe_t *dtpr_prevprov;\t\t/* previous in provider hash */\n\tdtrace_probe_t *dtpr_nextmod;\t\t/* next in module hash */\n\tdtrace_probe_t *dtpr_prevmod;\t\t/* previous in module hash */\n\tdtrace_probe_t *dtpr_nextfunc;\t\t/* next in function hash */\n\tdtrace_probe_t *dtpr_prevfunc;\t\t/* previous in function hash */\n\tdtrace_probe_t *dtpr_nextname;\t\t/* next in name hash */\n\tdtrace_probe_t *dtpr_prevname;\t\t/* previous in name hash */\n\tdtrace_genid_t dtpr_gen;\t\t/* probe generation ID */\n};\n\ntypedef int dtrace_probekey_f(const char *, const char *, int);\n\ntypedef struct dtrace_probekey {\n\tconst char *dtpk_prov;\t\t\t/* provider name to match */\n\tdtrace_probekey_f *dtpk_pmatch;\t\t/* provider matching function */\n\tconst char *dtpk_mod;\t\t\t/* module name to match */\n\tdtrace_probekey_f *dtpk_mmatch;\t\t/* module matching function */\n\tconst char *dtpk_func;\t\t\t/* func name to match */\n\tdtrace_probekey_f *dtpk_fmatch;\t\t/* func matching function */\n\tconst char *dtpk_name;\t\t\t/* name to match */\n\tdtrace_probekey_f *dtpk_nmatch;\t\t/* name matching function */\n\tdtrace_id_t dtpk_id;\t\t\t/* identifier to match */\n} dtrace_probekey_t;\n\ntypedef struct dtrace_hashbucket {\n\tstruct dtrace_hashbucket *dthb_next;\t/* next on hash chain */\n\tvoid *dthb_chain;\t\t\t/* chain of elements */\n\tint dthb_len;\t\t\t\t/* number of probes here */\n} dtrace_hashbucket_t;\n\ntypedef const char* dtrace_strkey_f(void*, uintptr_t);\n\ntypedef struct dtrace_hash {\n\tdtrace_hashbucket_t **dth_tab;\t/* hash table */\n\tint dth_size;\t\t\t/* size of hash table */\n\tint dth_mask;\t\t\t/* mask to index into table */\n\tint dth_nbuckets;\t\t/* total number of buckets */\n\tuintptr_t dth_nextoffs;\t\t/* offset of next in element */\n\tuintptr_t dth_prevoffs;\t\t/* offset of prev in element */\n\tdtrace_strkey_f *dth_getstr;\t/* func to retrieve str in element */\n\tuintptr_t dth_stroffs;\t\t/* offset of str in element */\n} dtrace_hash_t;\n\n/*\n * DTrace Enabling Control Blocks\n *\n * When a provider wishes to fire a probe, it calls into dtrace_probe(),\n * passing the probe identifier as the first argument.  As described above,\n * dtrace_probe() maps the identifier into a pointer to a dtrace_probe_t\n * structure.  This structure contains information about the probe, and a\n * pointer to the list of Enabling Control Blocks (ECBs).  Each ECB points to\n * DTrace consumer state, and contains an optional predicate, and a list of\n * actions.  (Shown schematically below.)  The ECB abstraction allows a single\n * probe to be multiplexed across disjoint consumers, or across disjoint\n * enablings of a single probe within one consumer.\n *\n *   Enabling Control Block\n *        dtrace_ecb_t\n * +------------------------+\n * | dtrace_epid_t ---------+--------------> Enabled Probe ID (EPID)\n * | dtrace_state_t * ------+--------------> State associated with this ECB\n * | dtrace_predicate_t * --+---------+\n * | dtrace_action_t * -----+----+    |\n * | dtrace_ecb_t * ---+    |    |    |       Predicate (if any)\n * +-------------------+----+    |    |       dtrace_predicate_t\n *                     |         |    +---> +--------------------+\n *                     |         |          | dtrace_difo_t * ---+----> DIFO\n *                     |         |          +--------------------+\n *                     |         |\n *            Next ECB |         |           Action\n *            (if any) |         |       dtrace_action_t\n *                     :         +--> +-------------------+\n *                     :              | dtrace_actkind_t -+------> kind\n *                     v              | dtrace_difo_t * --+------> DIFO (if any)\n *                                    | dtrace_recdesc_t -+------> record descr.\n *                                    | dtrace_action_t * +------+\n *                                    +-------------------+      |\n *                                                               | Next action\n *                               +-------------------------------+  (if any)\n *                               |\n *                               |           Action\n *                               |       dtrace_action_t\n *                               +--> +-------------------+\n *                                    | dtrace_actkind_t -+------> kind\n *                                    | dtrace_difo_t * --+------> DIFO (if any)\n *                                    | dtrace_action_t * +------+\n *                                    +-------------------+      |\n *                                                               | Next action\n *                               +-------------------------------+  (if any)\n *                               |\n *                               :\n *                               v\n *\n *\n * dtrace_probe() iterates over the ECB list.  If the ECB needs less space\n * than is available in the principal buffer, the ECB is processed:  if the\n * predicate is non-NULL, the DIF object is executed.  If the result is\n * non-zero, the action list is processed, with each action being executed\n * accordingly.  When the action list has been completely executed, processing\n * advances to the next ECB. The ECB abstraction allows disjoint consumers\n * to multiplex on single probes.\n *\n * Execution of the ECB results in consuming dte_size bytes in the buffer\n * to record data.  During execution, dte_needed bytes must be available in\n * the buffer.  This space is used for both recorded data and tuple data.\n */\nstruct dtrace_ecb {\n\tdtrace_epid_t dte_epid;\t\t\t/* enabled probe ID */\n\tuint32_t dte_alignment;\t\t\t/* required alignment */\n\tsize_t dte_needed;\t\t\t/* space needed for execution */\n\tsize_t dte_size;\t\t\t/* size of recorded payload */\n\tdtrace_predicate_t *dte_predicate;\t/* predicate, if any */\n\tdtrace_action_t *dte_action;\t\t/* actions, if any */\n\tdtrace_ecb_t *dte_next;\t\t\t/* next ECB on probe */\n\tdtrace_state_t *dte_state;\t\t/* pointer to state */\n\tuint32_t dte_cond;\t\t\t/* security condition */\n\tdtrace_probe_t *dte_probe;\t\t/* pointer to probe */\n\tdtrace_action_t *dte_action_last;\t/* last action on ECB */\n\tuint64_t dte_uarg;\t\t\t/* library argument */\n};\n\nstruct dtrace_predicate {\n\tdtrace_difo_t *dtp_difo;\t\t/* DIF object */\n\tdtrace_cacheid_t dtp_cacheid;\t\t/* cache identifier */\n\tint dtp_refcnt;\t\t\t\t/* reference count */\n};\n\nstruct dtrace_action {\n\tdtrace_actkind_t dta_kind;\t\t/* kind of action */\n\tuint16_t dta_intuple;\t\t\t/* boolean:  in aggregation */\n\tuint32_t dta_refcnt;\t\t\t/* reference count */\n\tdtrace_difo_t *dta_difo;\t\t/* pointer to DIFO */\n\tdtrace_recdesc_t dta_rec;\t\t/* record description */\n\tdtrace_action_t *dta_prev;\t\t/* previous action */\n\tdtrace_action_t *dta_next;\t\t/* next action */\n};\n\ntypedef struct dtrace_aggregation {\n\tdtrace_action_t dtag_action;\t\t/* action; must be first */\n\tdtrace_aggid_t dtag_id;\t\t\t/* identifier */\n\tdtrace_ecb_t *dtag_ecb;\t\t\t/* corresponding ECB */\n\tdtrace_action_t *dtag_first;\t\t/* first action in tuple */\n\tuint32_t dtag_base;\t\t\t/* base of aggregation */\n\tuint8_t dtag_hasarg;\t\t\t/* boolean:  has argument */\n\tuint64_t dtag_initial;\t\t\t/* initial value */\n\tvoid (*dtag_aggregate)(uint64_t *, uint64_t, uint64_t);\n} dtrace_aggregation_t;\n\n/*\n * DTrace Buffers\n *\n * Principal buffers, aggregation buffers, and speculative buffers are all\n * managed with the dtrace_buffer structure.  By default, this structure\n * includes twin data buffers -- dtb_tomax and dtb_xamot -- that serve as the\n * active and passive buffers, respectively.  For speculative buffers,\n * dtb_xamot will be NULL; for \"ring\" and \"fill\" buffers, dtb_xamot will point\n * to a scratch buffer.  For all buffer types, the dtrace_buffer structure is\n * always allocated on a per-CPU basis; a single dtrace_buffer structure is\n * never shared among CPUs.  (That is, there is never true sharing of the\n * dtrace_buffer structure; to prevent false sharing of the structure, it must\n * always be aligned to the coherence granularity -- generally 64 bytes.)\n *\n * One of the critical design decisions of DTrace is that a given ECB always\n * stores the same quantity and type of data.  This is done to assure that the\n * only metadata required for an ECB's traced data is the EPID.  That is, from\n * the EPID, the consumer can determine the data layout.  (The data buffer\n * layout is shown schematically below.)  By assuring that one can determine\n * data layout from the EPID, the metadata stream can be separated from the\n * data stream -- simplifying the data stream enormously.  The ECB always\n * proceeds the recorded data as part of the dtrace_rechdr_t structure that\n * includes the EPID and a high-resolution timestamp used for output ordering\n * consistency.\n *\n *      base of data buffer --->  +--------+--------------------+--------+\n *                                | rechdr | data               | rechdr |\n *                                +--------+------+--------+----+--------+\n *                                | data          | rechdr | data        |\n *                                +---------------+--------+-------------+\n *                                | data, cont.                          |\n *                                +--------+--------------------+--------+\n *                                | rechdr | data               |        |\n *                                +--------+--------------------+        |\n *                                |                ||                    |\n *                                |                ||                    |\n *                                |                \\/                    |\n *                                :                                      :\n *                                .                                      .\n *                                .                                      .\n *                                .                                      .\n *                                :                                      :\n *                                |                                      |\n *     limit of data buffer --->  +--------------------------------------+\n *\n * When evaluating an ECB, dtrace_probe() determines if the ECB's needs of the\n * principal buffer (both scratch and payload) exceed the available space.  If\n * the ECB's needs exceed available space (and if the principal buffer policy\n * is the default \"switch\" policy), the ECB is dropped, the buffer's drop count\n * is incremented, and processing advances to the next ECB.  If the ECB's needs\n * can be met with the available space, the ECB is processed, but the offset in\n * the principal buffer is only advanced if the ECB completes processing\n * without error.\n *\n * When a buffer is to be switched (either because the buffer is the principal\n * buffer with a \"switch\" policy or because it is an aggregation buffer), a\n * cross call is issued to the CPU associated with the buffer.  In the cross\n * call context, interrupts are disabled, and the active and the inactive\n * buffers are atomically switched.  This involves switching the data pointers,\n * copying the various state fields (offset, drops, errors, etc.) into their\n * inactive equivalents, and clearing the state fields.  Because interrupts are\n * disabled during this procedure, the switch is guaranteed to appear atomic to\n * dtrace_probe().\n *\n * DTrace Ring Buffering\n *\n * To process a ring buffer correctly, one must know the oldest valid record.\n * Processing starts at the oldest record in the buffer and continues until\n * the end of the buffer is reached.  Processing then resumes starting with\n * the record stored at offset 0 in the buffer, and continues until the\n * youngest record is processed.  If trace records are of a fixed-length,\n * determining the oldest record is trivial:\n *\n *   - If the ring buffer has not wrapped, the oldest record is the record\n *     stored at offset 0.\n *\n *   - If the ring buffer has wrapped, the oldest record is the record stored\n *     at the current offset.\n *\n * With variable length records, however, just knowing the current offset\n * doesn't suffice for determining the oldest valid record:  assuming that one\n * allows for arbitrary data, one has no way of searching forward from the\n * current offset to find the oldest valid record.  (That is, one has no way\n * of separating data from metadata.) It would be possible to simply refuse to\n * process any data in the ring buffer between the current offset and the\n * limit, but this leaves (potentially) an enormous amount of otherwise valid\n * data unprocessed.\n *\n * To effect ring buffering, we track two offsets in the buffer:  the current\n * offset and the _wrapped_ offset.  If a request is made to reserve some\n * amount of data, and the buffer has wrapped, the wrapped offset is\n * incremented until the wrapped offset minus the current offset is greater\n * than or equal to the reserve request.  This is done by repeatedly looking\n * up the ECB corresponding to the EPID at the current wrapped offset, and\n * incrementing the wrapped offset by the size of the data payload\n * corresponding to that ECB.  If this offset is greater than or equal to the\n * limit of the data buffer, the wrapped offset is set to 0.  Thus, the\n * current offset effectively \"chases\" the wrapped offset around the buffer.\n * Schematically:\n *\n *      base of data buffer --->  +------+--------------------+------+\n *                                | EPID | data               | EPID |\n *                                +------+--------+------+----+------+\n *                                | data          | EPID | data      |\n *                                +---------------+------+-----------+\n *                                | data, cont.                      |\n *                                +------+---------------------------+\n *                                | EPID | data                      |\n *           current offset --->  +------+---------------------------+\n *                                | invalid data                     |\n *           wrapped offset --->  +------+--------------------+------+\n *                                | EPID | data               | EPID |\n *                                +------+--------+------+----+------+\n *                                | data          | EPID | data      |\n *                                +---------------+------+-----------+\n *                                :                                  :\n *                                .                                  .\n *                                .        ... valid data ...        .\n *                                .                                  .\n *                                :                                  :\n *                                +------+-------------+------+------+\n *                                | EPID | data        | EPID | data |\n *                                +------+------------++------+------+\n *                                | data, cont.       | leftover     |\n *     limit of data buffer --->  +-------------------+--------------+\n *\n * If the amount of requested buffer space exceeds the amount of space\n * available between the current offset and the end of the buffer:\n *\n *  (1)  all words in the data buffer between the current offset and the limit\n *       of the data buffer (marked \"leftover\", above) are set to\n *       DTRACE_EPIDNONE\n *\n *  (2)  the wrapped offset is set to zero\n *\n *  (3)  the iteration process described above occurs until the wrapped offset\n *       is greater than the amount of desired space.\n *\n * The wrapped offset is implemented by (re-)using the inactive offset.\n * In a \"switch\" buffer policy, the inactive offset stores the offset in\n * the inactive buffer; in a \"ring\" buffer policy, it stores the wrapped\n * offset.\n *\n * DTrace Scratch Buffering\n *\n * Some ECBs may wish to allocate dynamically-sized temporary scratch memory.\n * To accommodate such requests easily, scratch memory may be allocated in\n * the buffer beyond the current offset plus the needed memory of the current\n * ECB.  If there isn't sufficient room in the buffer for the requested amount\n * of scratch space, the allocation fails and an error is generated.  Scratch\n * memory is tracked in the dtrace_mstate_t and is automatically freed when\n * the ECB ceases processing.  Note that ring buffers cannot allocate their\n * scratch from the principal buffer -- lest they needlessly overwrite older,\n * valid data.  Ring buffers therefore have their own dedicated scratch buffer\n * from which scratch is allocated.\n */\n#define\tDTRACEBUF_RING\t\t0x0001\t\t/* bufpolicy set to \"ring\" */\n#define\tDTRACEBUF_FILL\t\t0x0002\t\t/* bufpolicy set to \"fill\" */\n#define\tDTRACEBUF_NOSWITCH\t0x0004\t\t/* do not switch buffer */\n#define\tDTRACEBUF_WRAPPED\t0x0008\t\t/* ring buffer has wrapped */\n#define\tDTRACEBUF_DROPPED\t0x0010\t\t/* drops occurred */\n#define\tDTRACEBUF_ERROR\t\t0x0020\t\t/* errors occurred */\n#define\tDTRACEBUF_FULL\t\t0x0040\t\t/* \"fill\" buffer is full */\n#define\tDTRACEBUF_CONSUMED\t0x0080\t\t/* buffer has been consumed */\n#define\tDTRACEBUF_INACTIVE\t0x0100\t\t/* buffer is not yet active */\n\ntypedef struct dtrace_buffer {\n\tuint64_t dtb_offset;\t\t\t/* current offset in buffer */\n\tuint64_t dtb_cur_limit;\t\t\t/* current limit before signaling/dropping */\n\tuint64_t dtb_limit;\t\t\t/* limit before signaling */\n\tuint64_t dtb_size;\t\t\t/* size of buffer */\n\tuint32_t dtb_flags;\t\t\t/* flags */\n\tuint32_t dtb_drops;\t\t\t/* number of drops */\n\tcaddr_t dtb_tomax;\t\t\t/* active buffer */\n\tcaddr_t dtb_xamot;\t\t\t/* inactive buffer */\n\tuint32_t dtb_xamot_flags;\t\t/* inactive flags */\n\tuint32_t dtb_xamot_drops;\t\t/* drops in inactive buffer */\n\tuint64_t dtb_xamot_offset;\t\t/* offset in inactive buffer */\n\tuint32_t dtb_errors;\t\t\t/* number of errors */\n\tuint32_t dtb_xamot_errors;\t\t/* errors in inactive buffer */\n#ifndef _LP64\n\tuint64_t dtb_pad1;\n#endif\n\tuint64_t dtb_switched;\t\t\t/* time of last switch */\n\tuint64_t dtb_interval;\t\t\t/* observed switch interval */\n\tuint64_t dtb_pad2[4];\t\t\t/* pad to avoid false sharing */\n} dtrace_buffer_t;\n\n/*\n * DTrace Aggregation Buffers\n *\n * Aggregation buffers use much of the same mechanism as described above\n * (\"DTrace Buffers\").  However, because an aggregation is fundamentally a\n * hash, there exists dynamic metadata associated with an aggregation buffer\n * that is not associated with other kinds of buffers.  This aggregation\n * metadata is _only_ relevant for the in-kernel implementation of\n * aggregations; it is not actually relevant to user-level consumers.  To do\n * this, we allocate dynamic aggregation data (hash keys and hash buckets)\n * starting below the _limit_ of the buffer, and we allocate data from the\n * _base_ of the buffer.  When the aggregation buffer is copied out, _only_ the\n * data is copied out; the metadata is simply discarded.  Schematically,\n * aggregation buffers look like:\n *\n *      base of data buffer --->  +-------+------+-----------+-------+\n *                                | aggid | key  | value     | aggid |\n *                                +-------+------+-----------+-------+\n *                                | key                              |\n *                                +-------+-------+-----+------------+\n *                                | value | aggid | key | value      |\n *                                +-------+------++-----+------+-----+\n *                                | aggid | key  | value       |     |\n *                                +-------+------+-------------+     |\n *                                |                ||                |\n *                                |                ||                |\n *                                |                \\/                |\n *                                :                                  :\n *                                .                                  .\n *                                .                                  .\n *                                .                                  .\n *                                :                                  :\n *                                |                /\\                |\n *                                |                ||   +------------+\n *                                |                ||   |            |\n *                                +---------------------+            |\n *                                | hash keys                        |\n *                                | (dtrace_aggkey structures)       |\n *                                |                                  |\n *                                +----------------------------------+\n *                                | hash buckets                     |\n *                                | (dtrace_aggbuffer structure)     |\n *                                |                                  |\n *     limit of data buffer --->  +----------------------------------+\n *\n *\n * As implied above, just as we assure that ECBs always store a constant\n * amount of data, we assure that a given aggregation -- identified by its\n * aggregation ID -- always stores data of a constant quantity and type.\n * As with EPIDs, this allows the aggregation ID to serve as the metadata for a\n * given record.\n *\n * Note that the size of the dtrace_aggkey structure must be sizeof (uintptr_t)\n * aligned.  (If this the structure changes such that this becomes false, an\n * assertion will fail in dtrace_aggregate().)\n */\ntypedef struct dtrace_aggkey {\n\tuint32_t dtak_hashval;\t\t\t/* hash value */\n\tuint32_t dtak_action:4;\t\t\t/* action -- 4 bits */\n\tuint32_t dtak_size:28;\t\t\t/* size -- 28 bits */\n\tcaddr_t dtak_data;\t\t\t/* data pointer */\n\tstruct dtrace_aggkey *dtak_next;\t/* next in hash chain */\n} dtrace_aggkey_t;\n\ntypedef struct dtrace_aggbuffer {\n\tuintptr_t dtagb_hashsize;\t\t/* number of buckets */\n\tuintptr_t dtagb_free;\t\t\t/* free list of keys */\n\tdtrace_aggkey_t **dtagb_hash;\t\t/* hash table */\n} dtrace_aggbuffer_t;\n\n/*\n * DTrace Speculations\n *\n * Speculations have a per-CPU buffer and a global state.  Once a speculation\n * buffer has been comitted or discarded, it cannot be reused until all CPUs\n * have taken the same action (commit or discard) on their respective\n * speculative buffer.  However, because DTrace probes may execute in arbitrary\n * context, other CPUs cannot simply be cross-called at probe firing time to\n * perform the necessary commit or discard.  The speculation states thus\n * optimize for the case that a speculative buffer is only active on one CPU at\n * the time of a commit() or discard() -- for if this is the case, other CPUs\n * need not take action, and the speculation is immediately available for\n * reuse.  If the speculation is active on multiple CPUs, it must be\n * asynchronously cleaned -- potentially leading to a higher rate of dirty\n * speculative drops.  The speculation states are as follows:\n *\n *  DTRACESPEC_INACTIVE       <= Initial state; inactive speculation\n *  DTRACESPEC_ACTIVE         <= Allocated, but not yet speculatively traced to\n *  DTRACESPEC_ACTIVEONE      <= Speculatively traced to on one CPU\n *  DTRACESPEC_ACTIVEMANY     <= Speculatively traced to on more than one CPU\n *  DTRACESPEC_COMMITTING     <= Currently being commited on one CPU\n *  DTRACESPEC_COMMITTINGMANY <= Currently being commited on many CPUs\n *  DTRACESPEC_DISCARDING     <= Currently being discarded on many CPUs\n *\n * The state transition diagram is as follows:\n *\n *     +----------------------------------------------------------+\n *     |                                                          |\n *     |                      +------------+                      |\n *     |  +-------------------| COMMITTING |<-----------------+   |\n *     |  |                   +------------+                  |   |\n *     |  | copied spec.            ^             commit() on |   | discard() on\n *     |  | into principal          |              active CPU |   | active CPU\n *     |  |                         | commit()                |   |\n *     V  V                         |                         |   |\n * +----------+                 +--------+                +-----------+\n * | INACTIVE |---------------->| ACTIVE |--------------->| ACTIVEONE |\n * +----------+  speculation()  +--------+  speculate()   +-----------+\n *     ^  ^                         |                         |   |\n *     |  |                         | discard()               |   |\n *     |  | asynchronously          |            discard() on |   | speculate()\n *     |  | cleaned                 V            inactive CPU |   | on inactive\n *     |  |                   +------------+                  |   | CPU\n *     |  +-------------------| DISCARDING |<-----------------+   |\n *     |                      +------------+                      |\n *     | asynchronously             ^                             |\n *     | copied spec.               |       discard()             |\n *     | into principal             +------------------------+    |\n *     |                                                     |    V\n *  +----------------+             commit()              +------------+\n *  | COMMITTINGMANY |<----------------------------------| ACTIVEMANY |\n *  +----------------+                                   +------------+\n */\ntypedef enum dtrace_speculation_state {\n\tDTRACESPEC_INACTIVE = 0,\n\tDTRACESPEC_ACTIVE,\n\tDTRACESPEC_ACTIVEONE,\n\tDTRACESPEC_ACTIVEMANY,\n\tDTRACESPEC_COMMITTING,\n\tDTRACESPEC_COMMITTINGMANY,\n\tDTRACESPEC_DISCARDING\n} dtrace_speculation_state_t;\n\ntypedef struct dtrace_speculation {\n\tdtrace_speculation_state_t dtsp_state;\t/* current speculation state */\n\tint dtsp_cleaning;\t\t\t/* non-zero if being cleaned */\n\tdtrace_buffer_t *dtsp_buffer;\t\t/* speculative buffer */\n} dtrace_speculation_t;\n\n/*\n * DTrace Dynamic Variables\n *\n * The dynamic variable problem is obviously decomposed into two subproblems:\n * allocating new dynamic storage, and freeing old dynamic storage.  The\n * presence of the second problem makes the first much more complicated -- or\n * rather, the absence of the second renders the first trivial.  This is the\n * case with aggregations, for which there is effectively no deallocation of\n * dynamic storage.  (Or more accurately, all dynamic storage is deallocated\n * when a snapshot is taken of the aggregation.)  As DTrace dynamic variables\n * allow for both dynamic allocation and dynamic deallocation, the\n * implementation of dynamic variables is quite a bit more complicated than\n * that of their aggregation kin.\n *\n * We observe that allocating new dynamic storage is tricky only because the\n * size can vary -- the allocation problem is much easier if allocation sizes\n * are uniform.  We further observe that in D, the size of dynamic variables is\n * actually _not_ dynamic -- dynamic variable sizes may be determined by static\n * analysis of DIF text.  (This is true even of putatively dynamically-sized\n * objects like strings and stacks, the sizes of which are dictated by the\n * \"stringsize\" and \"stackframes\" variables, respectively.)  We exploit this by\n * performing this analysis on all DIF before enabling any probes.  For each\n * dynamic load or store, we calculate the dynamically-allocated size plus the\n * size of the dtrace_dynvar structure plus the storage required to key the\n * data.  For all DIF, we take the largest value and dub it the _chunksize_.\n * We then divide dynamic memory into two parts:  a hash table that is wide\n * enough to have every chunk in its own bucket, and a larger region of equal\n * chunksize units.  Whenever we wish to dynamically allocate a variable, we\n * always allocate a single chunk of memory.  Depending on the uniformity of\n * allocation, this will waste some amount of memory -- but it eliminates the\n * non-determinism inherent in traditional heap fragmentation.\n *\n * Dynamic objects are allocated by storing a non-zero value to them; they are\n * deallocated by storing a zero value to them.  Dynamic variables are\n * complicated enormously by being shared between CPUs.  In particular,\n * consider the following scenario:\n *\n *                 CPU A                                 CPU B\n *  +---------------------------------+   +---------------------------------+\n *  |                                 |   |                                 |\n *  | allocates dynamic object a[123] |   |                                 |\n *  | by storing the value 345 to it  |   |                                 |\n *  |                               --------->                              |\n *  |                                 |   | wishing to load from object     |\n *  |                                 |   | a[123], performs lookup in      |\n *  |                                 |   | dynamic variable space          |\n *  |                               <---------                              |\n *  | deallocates object a[123] by    |   |                                 |\n *  | storing 0 to it                 |   |                                 |\n *  |                                 |   |                                 |\n *  | allocates dynamic object b[567] |   | performs load from a[123]       |\n *  | by storing the value 789 to it  |   |                                 |\n *  :                                 :   :                                 :\n *  .                                 .   .                                 .\n *\n * This is obviously a race in the D program, but there are nonetheless only\n * two valid values for CPU B's load from a[123]:  345 or 0.  Most importantly,\n * CPU B may _not_ see the value 789 for a[123].\n *\n * There are essentially two ways to deal with this:\n *\n *  (1)  Explicitly spin-lock variables.  That is, if CPU B wishes to load\n *       from a[123], it needs to lock a[123] and hold the lock for the\n *       duration that it wishes to manipulate it.\n *\n *  (2)  Avoid reusing freed chunks until it is known that no CPU is referring\n *       to them.\n *\n * The implementation of (1) is rife with complexity, because it requires the\n * user of a dynamic variable to explicitly decree when they are done using it.\n * Were all variables by value, this perhaps wouldn't be debilitating -- but\n * dynamic variables of non-scalar types are tracked by reference.  That is, if\n * a dynamic variable is, say, a string, and that variable is to be traced to,\n * say, the principal buffer, the DIF emulation code returns to the main\n * dtrace_probe() loop a pointer to the underlying storage, not the contents of\n * the storage.  Further, code calling on DIF emulation would have to be aware\n * that the DIF emulation has returned a reference to a dynamic variable that\n * has been potentially locked.  The variable would have to be unlocked after\n * the main dtrace_probe() loop is finished with the variable, and the main\n * dtrace_probe() loop would have to be careful to not call any further DIF\n * emulation while the variable is locked to avoid deadlock.  More generally,\n * if one were to implement (1), DIF emulation code dealing with dynamic\n * variables could only deal with one dynamic variable at a time (lest deadlock\n * result).  To sum, (1) exports too much subtlety to the users of dynamic\n * variables -- increasing maintenance burden and imposing serious constraints\n * on future DTrace development.\n *\n * The implementation of (2) is also complex, but the complexity is more\n * manageable.  We need to be sure that when a variable is deallocated, it is\n * not placed on a traditional free list, but rather on a _dirty_ list.  Once a\n * variable is on a dirty list, it cannot be found by CPUs performing a\n * subsequent lookup of the variable -- but it may still be in use by other\n * CPUs.  To assure that all CPUs that may be seeing the old variable have\n * cleared out of probe context, a dtrace_sync() can be issued.  Once the\n * dtrace_sync() has completed, it can be known that all CPUs are done\n * manipulating the dynamic variable -- the dirty list can be atomically\n * appended to the free list.  Unfortunately, there's a slight hiccup in this\n * mechanism:  dtrace_sync() may not be issued from probe context.  The\n * dtrace_sync() must be therefore issued asynchronously from non-probe\n * context.  For this we rely on the DTrace cleaner, a cyclic that runs at the\n * \"cleanrate\" frequency.  To ease this implementation, we define several chunk\n * lists:\n *\n *   - Dirty.  Deallocated chunks, not yet cleaned.  Not available.\n *\n *   - Rinsing.  Formerly dirty chunks that are currently being asynchronously\n *     cleaned.  Not available, but will be shortly.  Dynamic variable\n *     allocation may not spin or block for availability, however.\n *\n *   - Clean.  Clean chunks, ready for allocation -- but not on the free list.\n *\n *   - Free.  Available for allocation.\n *\n * Moreover, to avoid absurd contention, _each_ of these lists is implemented\n * on a per-CPU basis.  This is only for performance, not correctness; chunks\n * may be allocated from another CPU's free list.  The algorithm for allocation\n * then is this:\n *\n *   (1)  Attempt to atomically allocate from current CPU's free list.  If list\n *        is non-empty and allocation is successful, allocation is complete.\n *\n *   (2)  If the clean list is non-empty, atomically move it to the free list,\n *        and reattempt (1).\n *\n *   (3)  If the dynamic variable space is in the CLEAN state, look for free\n *        and clean lists on other CPUs by setting the current CPU to the next\n *        CPU, and reattempting (1).  If the next CPU is the current CPU (that\n *        is, if all CPUs have been checked), atomically switch the state of\n *        the dynamic variable space based on the following:\n *\n *        - If no free chunks were found and no dirty chunks were found,\n *          atomically set the state to EMPTY.\n *\n *        - If dirty chunks were found, atomically set the state to DIRTY.\n *\n *        - If rinsing chunks were found, atomically set the state to RINSING.\n *\n *   (4)  Based on state of dynamic variable space state, increment appropriate\n *        counter to indicate dynamic drops (if in EMPTY state) vs. dynamic\n *        dirty drops (if in DIRTY state) vs. dynamic rinsing drops (if in\n *        RINSING state).  Fail the allocation.\n *\n * The cleaning cyclic operates with the following algorithm:  for all CPUs\n * with a non-empty dirty list, atomically move the dirty list to the rinsing\n * list.  Perform a dtrace_sync().  For all CPUs with a non-empty rinsing list,\n * atomically move the rinsing list to the clean list.  Perform another\n * dtrace_sync().  By this point, all CPUs have seen the new clean list; the\n * state of the dynamic variable space can be restored to CLEAN.\n *\n * There exist two final races that merit explanation.  The first is a simple\n * allocation race:\n *\n *                 CPU A                                 CPU B\n *  +---------------------------------+   +---------------------------------+\n *  |                                 |   |                                 |\n *  | allocates dynamic object a[123] |   | allocates dynamic object a[123] |\n *  | by storing the value 345 to it  |   | by storing the value 567 to it  |\n *  |                                 |   |                                 |\n *  :                                 :   :                                 :\n *  .                                 .   .                                 .\n *\n * Again, this is a race in the D program.  It can be resolved by having a[123]\n * hold the value 345 or a[123] hold the value 567 -- but it must be true that\n * a[123] have only _one_ of these values.  (That is, the racing CPUs may not\n * put the same element twice on the same hash chain.)  This is resolved\n * simply:  before the allocation is undertaken, the start of the new chunk's\n * hash chain is noted.  Later, after the allocation is complete, the hash\n * chain is atomically switched to point to the new element.  If this fails\n * (because of either concurrent allocations or an allocation concurrent with a\n * deletion), the newly allocated chunk is deallocated to the dirty list, and\n * the whole process of looking up (and potentially allocating) the dynamic\n * variable is reattempted.\n *\n * The final race is a simple deallocation race:\n *\n *                 CPU A                                 CPU B\n *  +---------------------------------+   +---------------------------------+\n *  |                                 |   |                                 |\n *  | deallocates dynamic object      |   | deallocates dynamic object      |\n *  | a[123] by storing the value 0   |   | a[123] by storing the value 0   |\n *  | to it                           |   | to it                           |\n *  |                                 |   |                                 |\n *  :                                 :   :                                 :\n *  .                                 .   .                                 .\n *\n * Once again, this is a race in the D program, but it is one that we must\n * handle without corrupting the underlying data structures.  Because\n * deallocations require the deletion of a chunk from the middle of a hash\n * chain, we cannot use a single-word atomic operation to remove it.  For this,\n * we add a spin lock to the hash buckets that is _only_ used for deallocations\n * (allocation races are handled as above).  Further, this spin lock is _only_\n * held for the duration of the delete; before control is returned to the DIF\n * emulation code, the hash bucket is unlocked.\n */\ntypedef struct dtrace_key {\n\tuint64_t dttk_value;\t\t\t/* data value or data pointer */\n\tuint64_t dttk_size;\t\t\t/* 0 if by-val, >0 if by-ref */\n} dtrace_key_t;\n\ntypedef struct dtrace_tuple {\n\tuint32_t dtt_nkeys;\t\t\t/* number of keys in tuple */\n\tuint32_t dtt_pad;\t\t\t/* padding */\n\tdtrace_key_t dtt_key[1];\t\t/* array of tuple keys */\n} dtrace_tuple_t;\n\ntypedef struct dtrace_dynvar {\n\tuint64_t dtdv_hashval;\t\t\t/* hash value -- 0 if free */\n\tstruct dtrace_dynvar *dtdv_next;\t/* next on list or hash chain */\n\tvoid *dtdv_data;\t\t\t/* pointer to data */\n\tdtrace_tuple_t dtdv_tuple;\t\t/* tuple key */\n} dtrace_dynvar_t;\n\ntypedef enum dtrace_dynvar_op {\n\tDTRACE_DYNVAR_ALLOC,\n\tDTRACE_DYNVAR_NOALLOC,\n\tDTRACE_DYNVAR_DEALLOC\n} dtrace_dynvar_op_t;\n\ntypedef struct dtrace_dynhash {\n\tdtrace_dynvar_t *dtdh_chain;\t\t/* hash chain for this bucket */\n\tuintptr_t dtdh_lock;\t\t\t/* deallocation lock */\n#ifdef _LP64\n\tuintptr_t dtdh_pad[6];\t\t\t/* pad to avoid false sharing */\n#else\n\tuintptr_t dtdh_pad[14];\t\t\t/* pad to avoid false sharing */\n#endif\n} dtrace_dynhash_t;\n\ntypedef struct dtrace_dstate_percpu {\n\tdtrace_dynvar_t *dtdsc_free;\t\t/* free list for this CPU */\n\tdtrace_dynvar_t *dtdsc_dirty;\t\t/* dirty list for this CPU */\n\tdtrace_dynvar_t *dtdsc_rinsing;\t\t/* rinsing list for this CPU */\n\tdtrace_dynvar_t *dtdsc_clean;\t\t/* clean list for this CPU */\n\tuint64_t dtdsc_drops;\t\t\t/* number of capacity drops */\n\tuint64_t dtdsc_dirty_drops;\t\t/* number of dirty drops */\n\tuint64_t dtdsc_rinsing_drops;\t\t/* number of rinsing drops */\n#ifdef _LP64\n\tuint64_t dtdsc_pad;\t\t\t/* pad to avoid false sharing */\n#else\n\tuint64_t dtdsc_pad[2];\t\t\t/* pad to avoid false sharing */\n#endif\n} dtrace_dstate_percpu_t;\n\ntypedef enum dtrace_dstate_state {\n\tDTRACE_DSTATE_CLEAN = 0,\n\tDTRACE_DSTATE_EMPTY,\n\tDTRACE_DSTATE_DIRTY,\n\tDTRACE_DSTATE_RINSING\n} dtrace_dstate_state_t;\n\ntypedef struct dtrace_dstate {\n\tvoid *dtds_base;\t\t\t/* base of dynamic var. space */\n\tsize_t dtds_size;\t\t\t/* size of dynamic var. space */\n\tsize_t dtds_hashsize;\t\t\t/* number of buckets in hash */\n\tsize_t dtds_chunksize;\t\t\t/* size of each chunk */\n\tdtrace_dynhash_t *dtds_hash;\t\t/* pointer to hash table */\n\tdtrace_dstate_state_t dtds_state;\t/* current dynamic var. state */\n\tdtrace_dstate_percpu_t *dtds_percpu;\t/* per-CPU dyn. var. state */\n} dtrace_dstate_t;\n\n/*\n * DTrace Variable State\n *\n * The DTrace variable state tracks user-defined variables in its dtrace_vstate\n * structure.  Each DTrace consumer has exactly one dtrace_vstate structure,\n * but some dtrace_vstate structures may exist without a corresponding DTrace\n * consumer (see \"DTrace Helpers\", below).  As described in <sys/dtrace.h>,\n * user-defined variables can have one of three scopes:\n *\n *  DIFV_SCOPE_GLOBAL  =>  global scope\n *  DIFV_SCOPE_THREAD  =>  thread-local scope (i.e. \"self->\" variables)\n *  DIFV_SCOPE_LOCAL   =>  clause-local scope (i.e. \"this->\" variables)\n *\n * The variable state tracks variables by both their scope and their allocation\n * type:\n *\n *  - The dtvs_globals and dtvs_locals members each point to an array of\n *    dtrace_statvar structures.  These structures contain both the variable\n *    metadata (dtrace_difv structures) and the underlying storage for all\n *    statically allocated variables, including statically allocated\n *    DIFV_SCOPE_GLOBAL variables and all DIFV_SCOPE_LOCAL variables.\n *\n *  - The dtvs_tlocals member points to an array of dtrace_difv structures for\n *    DIFV_SCOPE_THREAD variables.  As such, this array tracks _only_ the\n *    variable metadata for DIFV_SCOPE_THREAD variables; the underlying storage\n *    is allocated out of the dynamic variable space.\n *\n *  - The dtvs_dynvars member is the dynamic variable state associated with the\n *    variable state.  The dynamic variable state (described in \"DTrace Dynamic\n *    Variables\", above) tracks all DIFV_SCOPE_THREAD variables and all\n *    dynamically-allocated DIFV_SCOPE_GLOBAL variables.\n */\ntypedef struct dtrace_statvar {\n\tuint64_t dtsv_data;\t\t\t/* data or pointer to it */\n\tsize_t dtsv_size;\t\t\t/* size of pointed-to data */\n\tint dtsv_refcnt;\t\t\t/* reference count */\n\tdtrace_difv_t dtsv_var;\t\t\t/* variable metadata */\n} dtrace_statvar_t;\n\ntypedef struct dtrace_vstate {\n\tdtrace_state_t *dtvs_state;\t\t/* back pointer to state */\n\tdtrace_statvar_t **dtvs_globals;\t/* statically-allocated glbls */\n\tint dtvs_nglobals;\t\t\t/* number of globals */\n\tdtrace_difv_t *dtvs_tlocals;\t\t/* thread-local metadata */\n\tint dtvs_ntlocals;\t\t\t/* number of thread-locals */\n\tdtrace_statvar_t **dtvs_locals;\t\t/* clause-local data */\n\tint dtvs_nlocals;\t\t\t/* number of clause-locals */\n\tdtrace_dstate_t dtvs_dynvars;\t\t/* dynamic variable state */\n} dtrace_vstate_t;\n\n/*\n * DTrace Machine State\n *\n * In the process of processing a fired probe, DTrace needs to track and/or\n * cache some per-CPU state associated with that particular firing.  This is\n * state that is always discarded after the probe firing has completed, and\n * much of it is not specific to any DTrace consumer, remaining valid across\n * all ECBs.  This state is tracked in the dtrace_mstate structure.\n */\n#define\tDTRACE_MSTATE_ARGS\t\t0x00000001\n#define\tDTRACE_MSTATE_PROBE\t\t0x00000002\n#define\tDTRACE_MSTATE_EPID\t\t0x00000004\n#define\tDTRACE_MSTATE_TIMESTAMP\t\t0x00000008\n#define\tDTRACE_MSTATE_STACKDEPTH\t0x00000010\n#define\tDTRACE_MSTATE_CALLER\t\t0x00000020\n#define\tDTRACE_MSTATE_IPL\t\t0x00000040\n#define\tDTRACE_MSTATE_FLTOFFS\t\t0x00000080\n#define\tDTRACE_MSTATE_WALLTIMESTAMP\t0x00000100\n#define\tDTRACE_MSTATE_USTACKDEPTH\t0x00000200\n#define\tDTRACE_MSTATE_UCALLER\t\t0x00000400\n#define\tDTRACE_MSTATE_MACHTIMESTAMP\t0x00000800\n#define\tDTRACE_MSTATE_MACHCTIMESTAMP\t0x00001000\n\ntypedef struct dtrace_mstate {\n\tuintptr_t dtms_scratch_base;\t\t/* base of scratch space */\n\tuintptr_t dtms_scratch_ptr;\t\t/* current scratch pointer */\n\tsize_t dtms_scratch_size;\t\t/* scratch size */\n\tuint32_t dtms_present;\t\t\t/* variables that are present */\n\tuint64_t dtms_arg[5];\t\t\t/* cached arguments */\n\tdtrace_epid_t dtms_epid;\t\t/* current EPID */\n\tuint64_t dtms_timestamp;\t\t/* cached timestamp */\n\thrtime_t dtms_walltimestamp;\t\t/* cached wall timestamp */\n\tuint64_t dtms_machtimestamp;\t\t/* cached mach absolute timestamp */\n\tuint64_t dtms_machctimestamp;\t\t/* cached mach continuous timestamp */\n\tint dtms_stackdepth;\t\t\t/* cached stackdepth */\n\tint dtms_ustackdepth;\t\t\t/* cached ustackdepth */\n\tstruct dtrace_probe *dtms_probe;\t/* current probe */\n\tuintptr_t dtms_caller;\t\t\t/* cached caller */\n\tuint64_t dtms_ucaller;\t\t\t/* cached user-level caller */\n\tint dtms_ipl;\t\t\t\t/* cached interrupt pri lev */\n\tint dtms_fltoffs;\t\t\t/* faulting DIFO offset */\n\tuintptr_t dtms_strtok;\t\t\t/* saved strtok() pointer */\n\tuintptr_t dtms_strtok_limit;\t\t/* upper bound of strtok ptr */\n\tuint32_t dtms_access;\t\t\t/* memory access rights */\n\tdtrace_difo_t *dtms_difo;\t\t/* current dif object */\n} dtrace_mstate_t;\n\n#define\tDTRACE_COND_OWNER\t0x1\n#define\tDTRACE_COND_USERMODE\t0x2\n#define\tDTRACE_COND_ZONEOWNER\t0x4\n\n#define\tDTRACE_PROBEKEY_MAXDEPTH\t8\t/* max glob recursion depth */\n\n/*\n * Access flag used by dtrace_mstate.dtms_access.\n */\n#define\tDTRACE_ACCESS_KERNEL\t0x1\t\t/* the priv to read kmem */\n\n\n/*\n * DTrace Activity\n *\n * Each DTrace consumer is in one of several states, which (for purposes of\n * avoiding yet-another overloading of the noun \"state\") we call the current\n * _activity_.  The activity transitions on dtrace_go() (from DTRACIOCGO), on\n * dtrace_stop() (from DTRACIOCSTOP) and on the exit() action.  Activities may\n * only transition in one direction; the activity transition diagram is a\n * directed acyclic graph.  The activity transition diagram is as follows:\n *\n *\n *\n * +----------+                   +--------+                   +--------+\n * | INACTIVE |------------------>| WARMUP |------------------>| ACTIVE |\n * +----------+   dtrace_go(),    +--------+   dtrace_go(),    +--------+\n *                before BEGIN        |        after BEGIN       |  |  |\n *                                    |                          |  |  |\n *                      exit() action |                          |  |  |\n *                     from BEGIN ECB |                          |  |  |\n *                                    |                          |  |  |\n *                                    v                          |  |  |\n *                               +----------+     exit() action  |  |  |\n * +-----------------------------| DRAINING |<-------------------+  |  |\n * |                             +----------+                       |  |\n * |                                  |                             |  |\n * |                   dtrace_stop(), |                             |  |\n * |                     before END   |                             |  |\n * |                                  |                             |  |\n * |                                  v                             |  |\n * | +---------+                 +----------+                       |  |\n * | | STOPPED |<----------------| COOLDOWN |<----------------------+  |\n * | +---------+  dtrace_stop(), +----------+     dtrace_stop(),       |\n * |                after END                       before END         |\n * |                                                                   |\n * |                              +--------+                           |\n * +----------------------------->| KILLED |<--------------------------+\n *       deadman timeout or       +--------+     deadman timeout or\n *        killed consumer                         killed consumer\n *\n * Note that once a DTrace consumer has stopped tracing, there is no way to\n * restart it; if a DTrace consumer wishes to restart tracing, it must reopen\n * the DTrace pseudodevice.\n */\ntypedef enum dtrace_activity {\n\tDTRACE_ACTIVITY_INACTIVE = 0,\t\t/* not yet running */\n\tDTRACE_ACTIVITY_WARMUP,\t\t\t/* while starting */\n\tDTRACE_ACTIVITY_ACTIVE,\t\t\t/* running */\n\tDTRACE_ACTIVITY_DRAINING,\t\t/* before stopping */\n\tDTRACE_ACTIVITY_COOLDOWN,\t\t/* while stopping */\n\tDTRACE_ACTIVITY_STOPPED,\t\t/* after stopping */\n\tDTRACE_ACTIVITY_KILLED\t\t\t/* killed */\n} dtrace_activity_t;\n\n\n/*\n * APPLE NOTE:  DTrace dof modes implementation\n *\n * DTrace has four \"dof modes\". They are:\n *\n * DTRACE_DOF_MODE_NEVER\tNever load any dof, period.\n * DTRACE_DOF_MODE_LAZY_ON\tDefer loading dof until later\n * DTRACE_DOF_MODE_LAZY_OFF\tLoad all deferred dof now, and any new dof \n * DTRACE_DOF_MODE_NON_LAZY\tLoad all dof immediately.\n *\n * It is legal to transition between the two lazy modes. The NEVER and\n * NON_LAZY modes are permanent, and must not change once set.\n *\n * The current dof mode is kept in dtrace_dof_mode, which is protected by the\n * dtrace_dof_mode_lock. This is a RW lock, reads require shared access, writes\n * require exclusive access. Because NEVER and NON_LAZY are permanent states,\n * it is legal to test for those modes without holding the dof mode lock.\n *\n * Lock ordering is dof mode lock before any dtrace lock, and before the\n * process p_dtrace_sprlock. In general, other locks should not be held when\n * taking the dof mode lock. Acquiring the dof mode lock in exclusive mode\n * will block process fork, exec, and exit, so it should be held exclusive\n * for as short a time as possible.\n */\n\n#define DTRACE_DOF_MODE_NEVER \t\t0\n#define DTRACE_DOF_MODE_LAZY_ON\t\t1\n#define DTRACE_DOF_MODE_LAZY_OFF\t2\n#define DTRACE_DOF_MODE_NON_LAZY\t3\n\n/*\n * dtrace kernel symbol modes are used to control when the kernel may dispose of\n * symbol information used by the fbt/sdt provider. The kernel itself, as well as\n * every kext, has symbol table/nlist info that has historically been preserved\n * for dtrace's use. This allowed dtrace to be lazy about allocating fbt/sdt probes,\n * at the expense of keeping the symbol info in the kernel permanently.\n *\n * Starting in 10.7+, fbt probes may be created from userspace, in the same\n * fashion as pid probes. The kernel allows dtrace \"first right of refusal\"\n * whenever symbol data becomes available (such as a kext load). If dtrace is\n * active, it will immediately read/copy the needed data, and then the kernel\n * may free it. If dtrace is not active, it returns immediately, having done\n * no work or allocations, and the symbol data is freed. Should dtrace need\n * this data later, it is expected that the userspace client will push the\n * data into the kernel via ioctl calls.\n *\n * The kernel symbol modes are used to control what dtrace does with symbol data:\n *\n * DTRACE_KERNEL_SYMBOLS_NEVER\t\t\tEffectively disables fbt/sdt\n * DTRACE_KERNEL_SYMBOLS_FROM_KERNEL\t\tImmediately read/copy symbol data\n * DTRACE_KERNEL_SYMBOLS_FROM_USERSPACE\t\tWait for symbols from userspace\n * DTRACE_KERNEL_SYMBOLS_ALWAYS_FROM_KERNEL\tImmediately read/copy symbol data\n *\n * It is legal to transition between DTRACE_KERNEL_SYMBOLS_FROM_KERNEL and \n * DTRACE_KERNEL_SYMBOLS_FROM_USERSPACE. The DTRACE_KERNEL_SYMBOLS_NEVER and\n * DTRACE_KERNEL_SYMBOLS_ALWAYS_FROM_KERNEL are permanent modes, intended to\n * disable fbt probes entirely, or prevent any symbols being loaded from\n * userspace.\n*\n * The kernel symbol mode is kept in dtrace_kernel_symbol_mode, which is protected\n * by the dtrace_lock.\n */\n\n#define DTRACE_KERNEL_SYMBOLS_NEVER \t\t\t0\n#define DTRACE_KERNEL_SYMBOLS_FROM_KERNEL\t\t1\n#define DTRACE_KERNEL_SYMBOLS_FROM_USERSPACE\t\t2\n#define DTRACE_KERNEL_SYMBOLS_ALWAYS_FROM_KERNEL\t3\n\t\n\n/*\n * DTrace Helper Implementation\n *\n * A description of the helper architecture may be found in <sys/dtrace.h>.\n * Each process contains a pointer to its helpers in its p_dtrace_helpers\n * member.  This is a pointer to a dtrace_helpers structure, which contains an\n * array of pointers to dtrace_helper structures, helper variable state (shared\n * among a process's helpers) and a generation count.  (The generation count is\n * used to provide an identifier when a helper is added so that it may be\n * subsequently removed.)  The dtrace_helper structure is self-explanatory,\n * containing pointers to the objects needed to execute the helper.  Note that\n * helpers are _duplicated_ across fork(2), and destroyed on exec(2).  No more\n * than dtrace_helpers_max are allowed per-process.\n */\n#define\tDTRACE_HELPER_ACTION_USTACK\t0\n#define\tDTRACE_NHELPER_ACTIONS\t\t1\n\ntypedef struct dtrace_helper_action {\n\tint dtha_generation;\t\t\t/* helper action generation */\n\tint dtha_nactions;\t\t\t/* number of actions */\n\tdtrace_difo_t *dtha_predicate;\t\t/* helper action predicate */\n\tdtrace_difo_t **dtha_actions;\t\t/* array of actions */\n\tstruct dtrace_helper_action *dtha_next;\t/* next helper action */\n} dtrace_helper_action_t;\n\ntypedef struct dtrace_helper_provider {\n\tint dthp_generation;\t\t\t/* helper provider generation */\n\tuint32_t dthp_ref;\t\t\t/* reference count */\n\tdof_helper_t dthp_prov;\t\t\t/* DOF w/ provider and probes */\n} dtrace_helper_provider_t;\n\ntypedef struct dtrace_helpers {\n\tdtrace_helper_action_t **dthps_actions;\t/* array of helper actions */\n\tdtrace_vstate_t dthps_vstate;\t\t/* helper action var. state */\n\tdtrace_helper_provider_t **dthps_provs;\t/* array of providers */\n\tuint_t dthps_nprovs;\t\t\t/* count of providers */\n\tuint_t dthps_maxprovs;\t\t\t/* provider array size */\n\tint dthps_generation;\t\t\t/* current generation */\n\tpid_t dthps_pid;\t\t\t/* pid of associated proc */\n\tint dthps_deferred;\t\t\t/* helper in deferred list */\n\tstruct dtrace_helpers *dthps_next;\t/* next pointer */\n\tstruct dtrace_helpers *dthps_prev;\t/* prev pointer */\n} dtrace_helpers_t;\n\n/*\n * DTrace Helper Action Tracing\n *\n * Debugging helper actions can be arduous.  To ease the development and\n * debugging of helpers, DTrace contains a tracing-framework-within-a-tracing-\n * framework: helper tracing.  If dtrace_helptrace_enabled is non-zero (which\n * it is by default on DEBUG kernels), all helper activity will be traced to a\n * global, in-kernel ring buffer.  Each entry includes a pointer to the specific\n * helper, the location within the helper, and a trace of all local variables.\n * The ring buffer may be displayed in a human-readable format with the\n * ::dtrace_helptrace mdb(1) dcmd.\n */\n#define\tDTRACE_HELPTRACE_NEXT\t(-1)\n#define\tDTRACE_HELPTRACE_DONE\t(-2)\n#define\tDTRACE_HELPTRACE_ERR\t(-3)\n\n\ntypedef struct dtrace_helptrace {\n\tdtrace_helper_action_t\t*dtht_helper;\t/* helper action */\n\tint dtht_where;\t\t\t\t/* where in helper action */\n\tint dtht_nlocals;\t\t\t/* number of locals */\n\tint dtht_fault;\t\t\t\t/* type of fault (if any) */\n\tint dtht_fltoffs;\t\t\t/* DIF offset */\n\tuint64_t dtht_illval;\t\t\t/* faulting value */\n\tuint64_t dtht_locals[1];\t\t/* local variables */\n} dtrace_helptrace_t;\n\n/*\n * DTrace Credentials\n *\n * In probe context, we have limited flexibility to examine the credentials\n * of the DTrace consumer that created a particular enabling.  We use\n * the Least Privilege interfaces to cache the consumer's cred pointer and\n * some facts about that credential in a dtrace_cred_t structure. These\n * can limit the consumer's breadth of visibility and what actions the\n * consumer may take.\n */\n#define\tDTRACE_CRV_ALLPROC\t\t0x01\n#define\tDTRACE_CRV_KERNEL\t\t0x02\n#define\tDTRACE_CRV_ALLZONE\t\t0x04\n\n#define\tDTRACE_CRV_ALL\t\t(DTRACE_CRV_ALLPROC | DTRACE_CRV_KERNEL | \\\n\tDTRACE_CRV_ALLZONE)\n\n#define\tDTRACE_CRA_PROC\t\t\t\t0x0001\n#define\tDTRACE_CRA_PROC_CONTROL\t\t\t0x0002\n#define\tDTRACE_CRA_PROC_DESTRUCTIVE_ALLUSER\t0x0004\n#define\tDTRACE_CRA_PROC_DESTRUCTIVE_ALLZONE\t0x0008\n#define\tDTRACE_CRA_PROC_DESTRUCTIVE_CREDCHG\t0x0010\n#define\tDTRACE_CRA_KERNEL\t\t\t0x0020\n#define\tDTRACE_CRA_KERNEL_DESTRUCTIVE\t\t0x0040\n\n#define\tDTRACE_CRA_ALL\t\t(DTRACE_CRA_PROC | \\\n\tDTRACE_CRA_PROC_CONTROL | \\\n\tDTRACE_CRA_PROC_DESTRUCTIVE_ALLUSER | \\\n\tDTRACE_CRA_PROC_DESTRUCTIVE_ALLZONE | \\\n\tDTRACE_CRA_PROC_DESTRUCTIVE_CREDCHG | \\\n\tDTRACE_CRA_KERNEL | \\\n\tDTRACE_CRA_KERNEL_DESTRUCTIVE)\n\ntypedef struct dtrace_cred {\n\tcred_t\t\t\t*dcr_cred;\n\tuint8_t\t\t\tdcr_destructive;\n\tuint8_t\t\t\tdcr_visible;\n\tuint16_t\t\tdcr_action;\n} dtrace_cred_t;\n\ntypedef struct dtrace_format {\n\tuint64_t dtf_refcount;\n\tchar dtf_str[];\n} dtrace_format_t;\n\n#define DTRACE_FORMAT_SIZE(fmt) (strlen(fmt->dtf_str) + 1 + sizeof(dtrace_format_t))\n\n/*\n * DTrace Consumer State\n *\n * Each DTrace consumer has an associated dtrace_state structure that contains\n * its in-kernel DTrace state -- including options, credentials, statistics and\n * pointers to ECBs, buffers, speculations and formats.  A dtrace_state\n * structure is also allocated for anonymous enablings.  When anonymous state\n * is grabbed, the grabbing consumers dts_anon pointer is set to the grabbed\n * dtrace_state structure.\n */\nstruct dtrace_state {\n\tdev_t dts_dev;\t\t\t\t/* device */\n\tint dts_necbs;\t\t\t\t/* total number of ECBs */\n\tdtrace_ecb_t **dts_ecbs;\t\t/* array of ECBs */\n\tdtrace_epid_t dts_epid;\t\t\t/* next EPID to allocate */\n\tsize_t dts_needed;\t\t\t/* greatest needed space */\n\tstruct dtrace_state *dts_anon;\t\t/* anon. state, if grabbed */\n\tdtrace_activity_t dts_activity;\t\t/* current activity */\n\tdtrace_vstate_t dts_vstate;\t\t/* variable state */\n\tdtrace_buffer_t *dts_buffer;\t\t/* principal buffer */\n\tdtrace_buffer_t *dts_aggbuffer;\t\t/* aggregation buffer */\n\tdtrace_speculation_t *dts_speculations;\t/* speculation array */\n\tint dts_nspeculations;\t\t\t/* number of speculations */\n\tint dts_naggregations;\t\t\t/* number of aggregations */\n\tdtrace_aggregation_t **dts_aggregations; /* aggregation array */\n\tvmem_t *dts_aggid_arena;\t\t/* arena for aggregation IDs */\n\tuint64_t dts_errors;\t\t\t/* total number of errors */\n\tuint32_t dts_speculations_busy;\t\t/* number of spec. busy */\n\tuint32_t dts_speculations_unavail;\t/* number of spec unavail */\n\tuint32_t dts_stkstroverflows;\t\t/* stack string tab overflows */\n\tuint32_t dts_dblerrors;\t\t\t/* errors in ERROR probes */\n\tuint32_t dts_reserve;\t\t\t/* space reserved for END */\n\thrtime_t dts_laststatus;\t\t/* time of last status */\n\tcyclic_id_t dts_cleaner;\t\t/* cleaning cyclic */\n\tcyclic_id_t dts_deadman;\t\t/* deadman cyclic */\n\thrtime_t dts_alive;\t\t\t/* time last alive */\n\tchar dts_speculates;\t\t\t/* boolean: has speculations */\n\tchar dts_destructive;\t\t\t/* boolean: has dest. actions */\n\tint dts_nformats;\t\t\t/* number of formats */\n\tdtrace_format_t **dts_formats;\t\t/* format string array */\n\tdtrace_optval_t dts_options[DTRACEOPT_MAX]; /* options */\n\tdtrace_cred_t dts_cred;\t\t\t/* credentials */\n\tsize_t dts_nretained;\t\t\t/* number of retained enabs */\n\tuint64_t dts_arg_error_illval;\n\tuint32_t dts_buf_over_limit;\t\t/* number of bufs over dtb_limit */\n\tuint64_t **dts_rstate;\t\t\t/* per-CPU random state */\n};\n\nstruct dtrace_provider {\n\tdtrace_pattr_t dtpv_attr;\t\t/* provider attributes */\n\tdtrace_ppriv_t dtpv_priv;\t\t/* provider privileges */\n\tdtrace_pops_t dtpv_pops;\t\t/* provider operations */\n\tchar *dtpv_name;\t\t\t/* provider name */\n\tvoid *dtpv_arg;\t\t\t\t/* provider argument */\n\tuint_t dtpv_defunct;\t\t\t/* boolean: defunct provider */\n\tstruct dtrace_provider *dtpv_next;\t/* next provider */\n\tuint64_t dtpv_probe_count;\t\t/* number of associated probes */\n\tuint64_t dtpv_ecb_count;\t\t/* number of associated enabled ECBs */\n};\n\nstruct dtrace_meta {\n\tdtrace_mops_t dtm_mops;\t\t\t/* meta provider operations */\n\tchar *dtm_name;\t\t\t\t/* meta provider name */\n\tvoid *dtm_arg;\t\t\t\t/* meta provider user arg */\n\tuint64_t dtm_count;\t\t\t/* number of associated providers */\n};\n\n/*\n * DTrace Enablings\n *\n * A dtrace_enabling structure is used to track a collection of ECB\n * descriptions -- before they have been turned into actual ECBs.  This is\n * created as a result of DOF processing, and is generally used to generate\n * ECBs immediately thereafter.  However, enablings are also generally\n * retained should the probes they describe be created at a later time; as\n * each new module or provider registers with the framework, the retained\n * enablings are reevaluated, with any new match resulting in new ECBs.  To\n * prevent probes from being matched more than once, the enabling tracks the\n * last probe generation matched, and only matches probes from subsequent\n * generations.\n */\ntypedef struct dtrace_enabling {\n\tdtrace_ecbdesc_t **dten_desc;\t\t/* all ECB descriptions */\n\tint dten_ndesc;\t\t\t\t/* number of ECB descriptions */\n\tint dten_maxdesc;\t\t\t/* size of ECB array */\n\tdtrace_vstate_t *dten_vstate;\t\t/* associated variable state */\n\tdtrace_genid_t dten_probegen;\t\t/* matched probe generation */\n\tdtrace_ecbdesc_t *dten_current;\t\t/* current ECB description */\n\tint dten_error;\t\t\t\t/* current error value */\n\tint dten_primed;\t\t\t/* boolean: set if primed */\n\tstruct dtrace_enabling *dten_prev;\t/* previous enabling */\n\tstruct dtrace_enabling *dten_next;\t/* next enabling */\n} dtrace_enabling_t;\n\n/*\n * DTrace Anonymous Enablings\n *\n * Anonymous enablings are DTrace enablings that are not associated with a\n * controlling process, but rather derive their enabling from DOF stored as\n * properties in the dtrace.conf file.  If there is an anonymous enabling, a\n * DTrace consumer state and enabling are created on attach.  The state may be\n * subsequently grabbed by the first consumer specifying the \"grabanon\"\n * option.  As long as an anonymous DTrace enabling exists, dtrace(7D) will\n * refuse to unload.\n */\ntypedef struct dtrace_anon {\n\tdtrace_state_t *dta_state;\t\t/* DTrace consumer state */\n\tdtrace_enabling_t *dta_enabling;\t/* pointer to enabling */\n\tprocessorid_t dta_beganon;\t\t/* which CPU BEGIN ran on */\n} dtrace_anon_t;\n\n/*\n * DTrace Error Debugging\n */\n#if DEBUG\n#define\tDTRACE_ERRDEBUG\n#endif\n\n#ifdef DTRACE_ERRDEBUG\n\ntypedef struct dtrace_errhash {\n\tconst char\t*dter_msg;\t/* error message */\n\tint\t\tdter_count;\t/* number of times seen */\n} dtrace_errhash_t;\n\n#define\tDTRACE_ERRHASHSZ\t256\t/* must be > number of err msgs */\n\n#endif\t/* DTRACE_ERRDEBUG */\n\ntypedef struct dtrace_string dtrace_string_t;\n\ntypedef struct dtrace_string {\n\tdtrace_string_t *dtst_next;\n\tdtrace_string_t *dtst_prev;\n\tuint32_t dtst_refcount;\n\tchar dtst_str[];\n} dtrace_string_t;\n\n/**\n * DTrace Matching pre-conditions\n *\n * Used when matching new probes to discard matching of enablings that\n * doesn't match the condition tested by dmc_func\n */\ntypedef struct dtrace_match_cond {\n\tint (*dmc_func)(dtrace_probedesc_t*, void*);\n\tvoid *dmc_data;\n} dtrace_match_cond_t;\n\n\n/*\n * DTrace Toxic Ranges\n *\n * DTrace supports safe loads from probe context; if the address turns out to\n * be invalid, a bit will be set by the kernel indicating that DTrace\n * encountered a memory error, and DTrace will propagate the error to the user\n * accordingly.  However, there may exist some regions of memory in which an\n * arbitrary load can change system state, and from which it is impossible to\n * recover from such a load after it has been attempted.  Examples of this may\n * include memory in which programmable I/O registers are mapped (for which a\n * read may have some implications for the device) or (in the specific case of\n * UltraSPARC-I and -II) the virtual address hole.  The platform is required\n * to make DTrace aware of these toxic ranges; DTrace will then check that\n * target addresses are not in a toxic range before attempting to issue a\n * safe load.\n */\ntypedef struct dtrace_toxrange {\n\tuintptr_t\tdtt_base;\t\t/* base of toxic range */\n\tuintptr_t\tdtt_limit;\t\t/* limit of toxic range */\n} dtrace_toxrange_t;\n\nextern uint64_t dtrace_getarg(int, int, dtrace_mstate_t*, dtrace_vstate_t*);\nextern int dtrace_getipl(void);\nextern uintptr_t dtrace_caller(int);\nextern uint32_t dtrace_cas32(uint32_t *, uint32_t, uint32_t);\nextern void *dtrace_casptr(void *, void *, void *);\nextern void dtrace_copyin(user_addr_t, uintptr_t, size_t, volatile uint16_t *);\nextern void dtrace_copyinstr(user_addr_t, uintptr_t, size_t, volatile uint16_t *);\nextern void dtrace_copyout(uintptr_t, user_addr_t, size_t, volatile uint16_t *);\nextern void dtrace_copyoutstr(uintptr_t, user_addr_t, size_t, volatile uint16_t *);\nextern void dtrace_getpcstack(pc_t *, int, int, uint32_t *);\nextern uint64_t dtrace_load64(uintptr_t);\nextern int dtrace_canload(uint64_t, size_t, dtrace_mstate_t*, dtrace_vstate_t*);\n\nextern uint64_t dtrace_getreg(struct regs *, uint_t);\nextern uint64_t dtrace_getvmreg(uint_t);\nextern int dtrace_getstackdepth(int);\nextern void dtrace_getupcstack(uint64_t *, int);\nextern void dtrace_getufpstack(uint64_t *, uint64_t *, int);\nextern int dtrace_getustackdepth(void);\nextern uintptr_t dtrace_fulword(void *);\nextern uint8_t dtrace_fuword8(user_addr_t);\nextern uint16_t dtrace_fuword16(user_addr_t);\nextern uint32_t dtrace_fuword32(user_addr_t);\nextern uint64_t dtrace_fuword64(user_addr_t);\nextern int dtrace_proc_waitfor(dtrace_procdesc_t*);\nextern void dtrace_probe_error(dtrace_state_t *, dtrace_epid_t, int, int,\n    int, uint64_t);\nextern int dtrace_assfail(const char *, const char *, int);\nextern int dtrace_attached(void);\nextern hrtime_t dtrace_gethrestime(void);\n\nextern void dtrace_flush_caches(void);\n\nextern void dtrace_copy(uintptr_t, uintptr_t, size_t);\nextern void dtrace_copystr(uintptr_t, uintptr_t, size_t, volatile uint16_t *);\n\nextern void* dtrace_ptrauth_strip(void*, uint64_t);\nextern int dtrace_is_valid_ptrauth_key(uint64_t);\n\nextern uint64_t dtrace_physmem_read(uint64_t, size_t);\nextern void dtrace_physmem_write(uint64_t, uint64_t, size_t);\n\nextern void dtrace_livedump(char *, size_t);\n\n/*\n * DTrace state handling\n */\nextern minor_t dtrace_state_reserve(void);\nextern dtrace_state_t* dtrace_state_allocate(minor_t minor);\nextern dtrace_state_t* dtrace_state_get(minor_t minor);\nextern void dtrace_state_free(minor_t minor);\n\n/*\n * DTrace restriction checks\n */\nextern void dtrace_restriction_policy_load(void);\nextern boolean_t dtrace_is_restricted(void);\nextern boolean_t dtrace_are_restrictions_relaxed(void);\nextern boolean_t dtrace_fbt_probes_restricted(void);\nextern boolean_t dtrace_sdt_probes_restricted(void);\nextern boolean_t dtrace_can_attach_to_proc(proc_t);\n\n/*\n * DTrace Assertions\n *\n * DTrace calls ASSERT and VERIFY from probe context.  To assure that a failed\n * ASSERT or VERIFYdoes not induce a markedly more catastrophic failure (e.g.,\n * one from which a dump cannot be gleaned), DTrace must define its own ASSERT\n * and VERIFY macros to be ones that may safely be called from probe context.\n * This header file must thus be included by any DTrace component that calls\n * ASSERT and/or VERIFY from probe context, and _only_ by those components.\n * (The only exception to this is kernel debugging infrastructure at user-level\n * that doesn't depend on calling ASSERT.)\n */\n#undef ASSERT\n#undef VERIFY\n\n#define\tVERIFY(EX)\t((void)((EX) || \\\n\t\t\tdtrace_assfail(#EX, __FILE__, __LINE__)))\n\n#if DEBUG\n#define\tASSERT(EX)\t((void)((EX) || \\\n\t\t\tdtrace_assfail(#EX, __FILE__, __LINE__)))\n#else\n#define\tASSERT(X)\t((void)0)\n#endif\n\n#ifdef\t__cplusplus\n}\n#endif\n\n#endif /* _SYS_DTRACE_IMPL_H */\n\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/errno.h",
    "content": "/*\n * Copyright (c) 2000-2012 Apple, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */\n/*\n * Copyright (c) 1982, 1986, 1989, 1993\n *\tThe Regents of the University of California.  All rights reserved.\n * (c) UNIX System Laboratories, Inc.\n * All or some portions of this file are derived from material licensed\n * to the University of California by American Telephone and Telegraph\n * Co. or Unix System Laboratories, Inc. and are reproduced herein with\n * the permission of UNIX System Laboratories, Inc.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *\tThis product includes software developed by the University of\n *\tCalifornia, Berkeley and its contributors.\n * 4. Neither the name of the University nor the names of its contributors\n *    may be used to endorse or promote products derived from this software\n *    without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n *\t@(#)errno.h\t8.5 (Berkeley) 1/21/94\n */\n\n#ifndef _SYS_ERRNO_H_\n#define _SYS_ERRNO_H_\n\n#include <sys/cdefs.h>\n\n\n#if defined(__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__ >= 1\n#include <sys/_types/_errno_t.h>\n#endif\n\n__BEGIN_DECLS\nextern int * __error(void);\n#define errno (*__error())\n__END_DECLS\n\n/*\n * Error codes\n */\n\n#define EPERM           1               /* Operation not permitted */\n#define ENOENT          2               /* No such file or directory */\n#define ESRCH           3               /* No such process */\n#define EINTR           4               /* Interrupted system call */\n#define EIO             5               /* Input/output error */\n#define ENXIO           6               /* Device not configured */\n#define E2BIG           7               /* Argument list too long */\n#define ENOEXEC         8               /* Exec format error */\n#define EBADF           9               /* Bad file descriptor */\n#define ECHILD          10              /* No child processes */\n#define EDEADLK         11              /* Resource deadlock avoided */\n                                        /* 11 was EAGAIN */\n#define ENOMEM          12              /* Cannot allocate memory */\n#define EACCES          13              /* Permission denied */\n#define EFAULT          14              /* Bad address */\n#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL\n#define ENOTBLK         15              /* Block device required */\n#endif\n#define EBUSY           16              /* Device / Resource busy */\n#define EEXIST          17              /* File exists */\n#define EXDEV           18              /* Cross-device link */\n#define ENODEV          19              /* Operation not supported by device */\n#define ENOTDIR         20              /* Not a directory */\n#define EISDIR          21              /* Is a directory */\n#define EINVAL          22              /* Invalid argument */\n#define ENFILE          23              /* Too many open files in system */\n#define EMFILE          24              /* Too many open files */\n#define ENOTTY          25              /* Inappropriate ioctl for device */\n#define ETXTBSY         26              /* Text file busy */\n#define EFBIG           27              /* File too large */\n#define ENOSPC          28              /* No space left on device */\n#define ESPIPE          29              /* Illegal seek */\n#define EROFS           30              /* Read-only file system */\n#define EMLINK          31              /* Too many links */\n#define EPIPE           32              /* Broken pipe */\n\n/* math software */\n#define EDOM            33              /* Numerical argument out of domain */\n#define ERANGE          34              /* Result too large */\n\n/* non-blocking and interrupt i/o */\n#define EAGAIN          35              /* Resource temporarily unavailable */\n#define EWOULDBLOCK     EAGAIN          /* Operation would block */\n#define EINPROGRESS     36              /* Operation now in progress */\n#define EALREADY        37              /* Operation already in progress */\n\n/* ipc/network software -- argument errors */\n#define ENOTSOCK        38              /* Socket operation on non-socket */\n#define EDESTADDRREQ    39              /* Destination address required */\n#define EMSGSIZE        40              /* Message too long */\n#define EPROTOTYPE      41              /* Protocol wrong type for socket */\n#define ENOPROTOOPT     42              /* Protocol not available */\n#define EPROTONOSUPPORT 43              /* Protocol not supported */\n#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL\n#define ESOCKTNOSUPPORT 44              /* Socket type not supported */\n#endif\n#define ENOTSUP         45              /* Operation not supported */\n#if !__DARWIN_UNIX03 && !defined(KERNEL)\n/*\n * This is the same for binary and source copmpatability, unless compiling\n * the kernel itself, or compiling __DARWIN_UNIX03; if compiling for the\n * kernel, the correct value will be returned.  If compiling non-POSIX\n * source, the kernel return value will be converted by a stub in libc, and\n * if compiling source with __DARWIN_UNIX03, the conversion in libc is not\n * done, and the caller gets the expected (discrete) value.\n */\n#define EOPNOTSUPP       ENOTSUP        /* Operation not supported on socket */\n#endif /* !__DARWIN_UNIX03 && !KERNEL */\n\n#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL\n#define EPFNOSUPPORT    46              /* Protocol family not supported */\n#endif\n#define EAFNOSUPPORT    47              /* Address family not supported by protocol family */\n#define EADDRINUSE      48              /* Address already in use */\n#define EADDRNOTAVAIL   49              /* Can't assign requested address */\n\n/* ipc/network software -- operational errors */\n#define ENETDOWN        50              /* Network is down */\n#define ENETUNREACH     51              /* Network is unreachable */\n#define ENETRESET       52              /* Network dropped connection on reset */\n#define ECONNABORTED    53              /* Software caused connection abort */\n#define ECONNRESET      54              /* Connection reset by peer */\n#define ENOBUFS         55              /* No buffer space available */\n#define EISCONN         56              /* Socket is already connected */\n#define ENOTCONN        57              /* Socket is not connected */\n#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL\n#define ESHUTDOWN       58              /* Can't send after socket shutdown */\n#define ETOOMANYREFS    59              /* Too many references: can't splice */\n#endif\n#define ETIMEDOUT       60              /* Operation timed out */\n#define ECONNREFUSED    61              /* Connection refused */\n\n#define ELOOP           62              /* Too many levels of symbolic links */\n#define ENAMETOOLONG    63              /* File name too long */\n\n/* should be rearranged */\n#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL\n#define EHOSTDOWN       64              /* Host is down */\n#endif\n#define EHOSTUNREACH    65              /* No route to host */\n#define ENOTEMPTY       66              /* Directory not empty */\n\n/* quotas & mush */\n#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL\n#define EPROCLIM        67              /* Too many processes */\n#define EUSERS          68              /* Too many users */\n#endif\n#define EDQUOT          69              /* Disc quota exceeded */\n\n/* Network File System */\n#define ESTALE          70              /* Stale NFS file handle */\n#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL\n#define EREMOTE         71              /* Too many levels of remote in path */\n#define EBADRPC         72              /* RPC struct is bad */\n#define ERPCMISMATCH    73              /* RPC version wrong */\n#define EPROGUNAVAIL    74              /* RPC prog. not avail */\n#define EPROGMISMATCH   75              /* Program version wrong */\n#define EPROCUNAVAIL    76              /* Bad procedure for program */\n#endif\n\n#define ENOLCK          77              /* No locks available */\n#define ENOSYS          78              /* Function not implemented */\n\n#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL\n#define EFTYPE          79              /* Inappropriate file type or format */\n#define EAUTH           80              /* Authentication error */\n#define ENEEDAUTH       81              /* Need authenticator */\n\n/* Intelligent device errors */\n#define EPWROFF         82      /* Device power is off */\n#define EDEVERR         83      /* Device error, e.g. paper out */\n#endif\n\n#define EOVERFLOW       84              /* Value too large to be stored in data type */\n\n/* Program loading errors */\n#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL\n#define EBADEXEC        85      /* Bad executable */\n#define EBADARCH        86      /* Bad CPU type in executable */\n#define ESHLIBVERS      87      /* Shared library version mismatch */\n#define EBADMACHO       88      /* Malformed Macho file */\n#endif\n\n#define ECANCELED       89              /* Operation canceled */\n\n#define EIDRM           90              /* Identifier removed */\n#define ENOMSG          91              /* No message of desired type */\n#define EILSEQ          92              /* Illegal byte sequence */\n#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL\n#define ENOATTR         93              /* Attribute not found */\n#endif\n\n#define EBADMSG         94              /* Bad message */\n#define EMULTIHOP       95              /* Reserved */\n#define ENODATA         96              /* No message available on STREAM */\n#define ENOLINK         97              /* Reserved */\n#define ENOSR           98              /* No STREAM resources */\n#define ENOSTR          99              /* Not a STREAM */\n#define EPROTO          100             /* Protocol error */\n#define ETIME           101             /* STREAM ioctl timeout */\n\n#if __DARWIN_UNIX03 || defined(KERNEL)\n/* This value is only discrete when compiling __DARWIN_UNIX03, or KERNEL */\n#define EOPNOTSUPP      102             /* Operation not supported on socket */\n#endif /* __DARWIN_UNIX03 || KERNEL */\n\n#define ENOPOLICY       103             /* No such policy registered */\n\n#if __DARWIN_C_LEVEL >= 200809L\n#define ENOTRECOVERABLE 104             /* State not recoverable */\n#define EOWNERDEAD      105             /* Previous owner died */\n#endif\n\n#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL\n#define EQFULL          106             /* Interface output queue is full */\n#define ELAST           106             /* Must be equal largest errno */\n#endif\n\n#endif /* _SYS_ERRNO_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/ev.h",
    "content": "/*\n * Copyright (c) 2000-2007 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/* Copyright (c) 1998 Apple Computer, Inc. All rights reserved */\n\n#ifndef _SYS_EV_H_\n#define _SYS_EV_H_\n\n#include <sys/appleapiopts.h>\n\n#include <sys/queue.h>\n#include <sys/cdefs.h>\n\nstruct eventreq {\n\tint      er_type;\n#define EV_FD 1    // file descriptor\n\tint      er_handle;\n\tvoid    *er_data;\n\tint      er_rcnt;\n\tint      er_wcnt;\n\tint      er_ecnt;\n\tint      er_eventbits;\n#define EV_RE  1\n#define EV_WR  2\n#define EV_EX  4\n#define EV_RM  8\n#define EV_MASK 0xf\n};\n\ntypedef struct eventreq *er_t;\n\n#define EV_RBYTES 0x100\n#define EV_WBYTES 0x200\n#define EV_RWBYTES (EV_RBYTES|EV_WBYTES)\n#define EV_RCLOSED 0x400\n#define EV_RCONN   0x800\n#define EV_WCLOSED 0x1000\n#define EV_WCONN   0x2000\n#define EV_OOB     0x4000\n#define EV_FIN     0x8000\n#define EV_RESET   0x10000\n#define EV_TIMEOUT 0x20000\n#define EV_DMASK   0xffffff00\n\n\n\n__BEGIN_DECLS\nint     modwatch(er_t, int);\nint     watchevent(er_t, int);\nint     waitevent(er_t, struct timeval *);\n__END_DECLS\n\n\n#endif /* _SYS_EV_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/event.h",
    "content": "/*\n * Copyright (c) 2003-2019 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/*-\n * Copyright (c) 1999,2000,2001 Jonathan Lemon <jlemon@FreeBSD.org>\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n *\t$FreeBSD: src/sys/sys/event.h,v 1.5.2.5 2001/12/14 19:21:22 jlemon Exp $\n */\n\n#ifndef _SYS_EVENT_H_\n#define _SYS_EVENT_H_\n\n#include <machine/types.h>\n#include <sys/cdefs.h>\n#include <sys/queue.h>\n#include <stdint.h>\n#include <sys/types.h>\n\n/*\n * Filter types\n */\n#define EVFILT_READ             (-1)\n#define EVFILT_WRITE            (-2)\n#define EVFILT_AIO              (-3)    /* attached to aio requests */\n#define EVFILT_VNODE            (-4)    /* attached to vnodes */\n#define EVFILT_PROC             (-5)    /* attached to struct proc */\n#define EVFILT_SIGNAL           (-6)    /* attached to struct proc */\n#define EVFILT_TIMER            (-7)    /* timers */\n#define EVFILT_MACHPORT         (-8)    /* Mach portsets */\n#define EVFILT_FS               (-9)    /* Filesystem events */\n#define EVFILT_USER             (-10)   /* User events */\n#define EVFILT_VM               (-12)   /* Virtual memory events */\n#define EVFILT_EXCEPT           (-15)   /* Exception events */\n\n#define EVFILT_SYSCOUNT         17\n#define EVFILT_THREADMARKER     EVFILT_SYSCOUNT /* Internal use only */\n\n#pragma pack(4)\n\nstruct kevent {\n\tuintptr_t       ident;  /* identifier for this event */\n\tint16_t         filter; /* filter for event */\n\tuint16_t        flags;  /* general flags */\n\tuint32_t        fflags; /* filter-specific flags */\n\tintptr_t        data;   /* filter-specific data */\n\tvoid            *udata; /* opaque user data identifier */\n};\n\n\n#pragma pack()\n\nstruct kevent64_s {\n\tuint64_t        ident;          /* identifier for this event */\n\tint16_t         filter;         /* filter for event */\n\tuint16_t        flags;          /* general flags */\n\tuint32_t        fflags;         /* filter-specific flags */\n\tint64_t         data;           /* filter-specific data */\n\tuint64_t        udata;          /* opaque user data identifier */\n\tuint64_t        ext[2];         /* filter-specific extensions */\n};\n\n\n#define EV_SET(kevp, a, b, c, d, e, f) do {     \\\n\tstruct kevent *__kevp__ = (kevp);       \\\n\t__kevp__->ident = (a);                  \\\n\t__kevp__->filter = (b);                 \\\n\t__kevp__->flags = (c);                  \\\n\t__kevp__->fflags = (d);                 \\\n\t__kevp__->data = (e);                   \\\n\t__kevp__->udata = (f);                  \\\n} while(0)\n\n#define EV_SET64(kevp, a, b, c, d, e, f, g, h) do {     \\\n\tstruct kevent64_s *__kevp__ = (kevp);           \\\n\t__kevp__->ident = (a);                          \\\n\t__kevp__->filter = (b);                         \\\n\t__kevp__->flags = (c);                          \\\n\t__kevp__->fflags = (d);                         \\\n\t__kevp__->data = (e);                           \\\n\t__kevp__->udata = (f);                          \\\n\t__kevp__->ext[0] = (g);                         \\\n\t__kevp__->ext[1] = (h);                         \\\n} while(0)\n\n\n/* kevent system call flags */\n#define KEVENT_FLAG_NONE                         0x000000       /* no flag value */\n#define KEVENT_FLAG_IMMEDIATE                    0x000001       /* immediate timeout */\n#define KEVENT_FLAG_ERROR_EVENTS                 0x000002       /* output events only include change errors */\n\n\n/* actions */\n#define EV_ADD              0x0001      /* add event to kq (implies enable) */\n#define EV_DELETE           0x0002      /* delete event from kq */\n#define EV_ENABLE           0x0004      /* enable event */\n#define EV_DISABLE          0x0008      /* disable event (not reported) */\n\n/* flags */\n#define EV_ONESHOT          0x0010      /* only report one occurrence */\n#define EV_CLEAR            0x0020      /* clear event state after reporting */\n#define EV_RECEIPT          0x0040      /* force immediate event output */\n                                        /* ... with or without EV_ERROR */\n                                        /* ... use KEVENT_FLAG_ERROR_EVENTS */\n                                        /*     on syscalls supporting flags */\n\n#define EV_DISPATCH         0x0080      /* disable event after reporting */\n#define EV_UDATA_SPECIFIC   0x0100      /* unique kevent per udata value */\n\n#define EV_DISPATCH2        (EV_DISPATCH | EV_UDATA_SPECIFIC)\n/* ... in combination with EV_DELETE */\n/* will defer delete until udata-specific */\n/* event enabled. EINPROGRESS will be */\n/* returned to indicate the deferral */\n\n#define EV_VANISHED         0x0200      /* report that source has vanished  */\n                                        /* ... only valid with EV_DISPATCH2 */\n\n#define EV_SYSFLAGS         0xF000      /* reserved by system */\n#define EV_FLAG0            0x1000      /* filter-specific flag */\n#define EV_FLAG1            0x2000      /* filter-specific flag */\n\n/* returned values */\n#define EV_EOF              0x8000      /* EOF detected */\n#define EV_ERROR            0x4000      /* error, data contains errno */\n\n/*\n * Filter specific flags for EVFILT_READ\n *\n * The default behavior for EVFILT_READ is to make the \"read\" determination\n * relative to the current file descriptor read pointer.\n *\n * The EV_POLL flag indicates the determination should be made via poll(2)\n * semantics. These semantics dictate always returning true for regular files,\n * regardless of the amount of unread data in the file.\n *\n * On input, EV_OOBAND specifies that filter should actively return in the\n * presence of OOB on the descriptor. It implies that filter will return\n * if there is OOB data available to read OR when any other condition\n * for the read are met (for example number of bytes regular data becomes >=\n * low-watermark).\n * If EV_OOBAND is not set on input, it implies that the filter should not actively\n * return for out of band data on the descriptor. The filter will then only return\n * when some other condition for read is met (ex: when number of regular data bytes\n * >=low-watermark OR when socket can't receive more data (SS_CANTRCVMORE)).\n *\n * On output, EV_OOBAND indicates the presence of OOB data on the descriptor.\n * If it was not specified as an input parameter, then the data count is the\n * number of bytes before the current OOB marker, else data count is the number\n * of bytes beyond OOB marker.\n */\n#define EV_POLL         EV_FLAG0\n#define EV_OOBAND       EV_FLAG1\n\n/*\n * data/hint fflags for EVFILT_USER, shared with userspace\n */\n\n/*\n * On input, NOTE_TRIGGER causes the event to be triggered for output.\n */\n#define NOTE_TRIGGER    0x01000000\n\n/*\n * On input, the top two bits of fflags specifies how the lower twenty four\n * bits should be applied to the stored value of fflags.\n *\n * On output, the top two bits will always be set to NOTE_FFNOP and the\n * remaining twenty four bits will contain the stored fflags value.\n */\n#define NOTE_FFNOP      0x00000000              /* ignore input fflags */\n#define NOTE_FFAND      0x40000000              /* and fflags */\n#define NOTE_FFOR       0x80000000              /* or fflags */\n#define NOTE_FFCOPY     0xc0000000              /* copy fflags */\n#define NOTE_FFCTRLMASK 0xc0000000              /* mask for operations */\n#define NOTE_FFLAGSMASK 0x00ffffff\n\n\n/*\n * data/hint fflags for EVFILT_{READ|WRITE}, shared with userspace\n *\n * The default behavior for EVFILT_READ is to make the determination\n * realtive to the current file descriptor read pointer.\n */\n#define NOTE_LOWAT      0x00000001              /* low water mark */\n\n/* data/hint flags for EVFILT_EXCEPT, shared with userspace */\n#define NOTE_OOB        0x00000002              /* OOB data */\n\n/*\n * data/hint fflags for EVFILT_VNODE, shared with userspace\n */\n#define NOTE_DELETE     0x00000001              /* vnode was removed */\n#define NOTE_WRITE      0x00000002              /* data contents changed */\n#define NOTE_EXTEND     0x00000004              /* size increased */\n#define NOTE_ATTRIB     0x00000008              /* attributes changed */\n#define NOTE_LINK       0x00000010              /* link count changed */\n#define NOTE_RENAME     0x00000020              /* vnode was renamed */\n#define NOTE_REVOKE     0x00000040              /* vnode access was revoked */\n#define NOTE_NONE       0x00000080              /* No specific vnode event: to test for EVFILT_READ activation*/\n#define NOTE_FUNLOCK    0x00000100              /* vnode was unlocked by flock(2) */\n\n/*\n * data/hint fflags for EVFILT_PROC, shared with userspace\n *\n * Please note that EVFILT_PROC and EVFILT_SIGNAL share the same knote list\n * that hangs off the proc structure. They also both play games with the hint\n * passed to KNOTE(). If NOTE_SIGNAL is passed as a hint, then the lower bits\n * of the hint contain the signal. IF NOTE_FORK is passed, then the lower bits\n * contain the PID of the child (but the pid does not get passed through in\n * the actual kevent).\n */\nenum {\n\teNoteReapDeprecated __deprecated_enum_msg(\"This kqueue(2) EVFILT_PROC flag is deprecated\") = 0x10000000\n};\n\n#define NOTE_EXIT               0x80000000      /* process exited */\n#define NOTE_FORK               0x40000000      /* process forked */\n#define NOTE_EXEC               0x20000000      /* process exec'd */\n#define NOTE_REAP               ((unsigned int)eNoteReapDeprecated /* 0x10000000 */ )   /* process reaped */\n#define NOTE_SIGNAL             0x08000000      /* shared with EVFILT_SIGNAL */\n#define NOTE_EXITSTATUS         0x04000000      /* exit status to be returned, valid for child process or when allowed to signal target pid */\n#define NOTE_EXIT_DETAIL        0x02000000      /* provide details on reasons for exit */\n\n#define NOTE_PDATAMASK  0x000fffff              /* mask for signal & exit status */\n#define NOTE_PCTRLMASK  (~NOTE_PDATAMASK)\n\n/*\n * If NOTE_EXITSTATUS is present, provide additional info about exiting process.\n */\nenum {\n\teNoteExitReparentedDeprecated __deprecated_enum_msg(\"This kqueue(2) EVFILT_PROC flag is no longer sent\") = 0x00080000\n};\n#define NOTE_EXIT_REPARENTED    ((unsigned int)eNoteExitReparentedDeprecated)   /* exited while reparented */\n\n/*\n * If NOTE_EXIT_DETAIL is present, these bits indicate specific reasons for exiting.\n */\n#define NOTE_EXIT_DETAIL_MASK           0x00070000\n#define NOTE_EXIT_DECRYPTFAIL           0x00010000\n#define NOTE_EXIT_MEMORY                0x00020000\n#define NOTE_EXIT_CSERROR               0x00040000\n\n\n/*\n * data/hint fflags for EVFILT_VM, shared with userspace.\n */\n#define NOTE_VM_PRESSURE                        0x80000000              /* will react on memory pressure */\n#define NOTE_VM_PRESSURE_TERMINATE              0x40000000              /* will quit on memory pressure, possibly after cleaning up dirty state */\n#define NOTE_VM_PRESSURE_SUDDEN_TERMINATE       0x20000000              /* will quit immediately on memory pressure */\n#define NOTE_VM_ERROR                           0x10000000              /* there was an error */\n\n\n/*\n * data/hint fflags for EVFILT_TIMER, shared with userspace.\n * The default is a (repeating) interval timer with the data\n * specifying the timeout interval in milliseconds.\n *\n * All timeouts are implicitly EV_CLEAR events.\n */\n#define NOTE_SECONDS    0x00000001              /* data is seconds         */\n#define NOTE_USECONDS   0x00000002              /* data is microseconds    */\n#define NOTE_NSECONDS   0x00000004              /* data is nanoseconds     */\n#define NOTE_ABSOLUTE   0x00000008              /* absolute timeout        */\n/* ... implicit EV_ONESHOT, timeout uses the gettimeofday epoch */\n#define NOTE_LEEWAY             0x00000010              /* ext[1] holds leeway for power aware timers */\n#define NOTE_CRITICAL   0x00000020              /* system does minimal timer coalescing */\n#define NOTE_BACKGROUND 0x00000040              /* system does maximum timer coalescing */\n#define NOTE_MACH_CONTINUOUS_TIME       0x00000080\n/*\n * NOTE_MACH_CONTINUOUS_TIME:\n * with NOTE_ABSOLUTE: causes the timer to continue to tick across sleep,\n *      still uses gettimeofday epoch\n * with NOTE_MACHTIME and NOTE_ABSOLUTE: uses mach continuous time epoch\n * without NOTE_ABSOLUTE (interval timer mode): continues to tick across sleep\n */\n#define NOTE_MACHTIME   0x00000100              /* data is mach absolute time units */\n/* timeout uses the mach absolute time epoch */\n\n\n/*\n * data/hint fflags for EVFILT_MACHPORT, shared with userspace.\n *\n * Only portsets are supported at this time.\n *\n * The fflags field can optionally contain the MACH_RCV_MSG, MACH_RCV_LARGE,\n * and related trailer receive options as defined in <mach/message.h>.\n * The presence of these flags directs the kevent64() call to attempt to receive\n * the message during kevent delivery, rather than just indicate that a message exists.\n * On setup, The ext[0] field contains the receive buffer pointer and ext[1] contains\n * the receive buffer length.  Upon event delivery, the actual received message size\n * is returned in ext[1].  As with mach_msg(), the buffer must be large enough to\n * receive the message and the requested (or default) message trailers.  In addition,\n * the fflags field contains the return code normally returned by mach_msg().\n *\n * If MACH_RCV_MSG is specified, and the ext[1] field specifies a zero length, the\n * system call argument specifying an ouput area (kevent_qos) will be consulted. If\n * the system call specified an output data area, the user-space address\n * of the received message is carved from that provided output data area (if enough\n * space remains there). The address and length of each received message is\n * returned in the ext[0] and ext[1] fields (respectively) of the corresponding kevent.\n *\n * IF_MACH_RCV_VOUCHER_CONTENT is specified, the contents of the message voucher is\n * extracted (as specified in the xflags field) and stored in ext[2] up to ext[3]\n * length.  If the input length is zero, and the system call provided a data area,\n * the space for the voucher content is carved from the provided space and its\n * address and length is returned in ext[2] and ext[3] respectively.\n *\n * If no message receipt options were provided in the fflags field on setup, no\n * message is received by this call. Instead, on output, the data field simply\n * contains the name of the actual port detected with a message waiting.\n */\n\n/*\n * DEPRECATED!!!!!!!!!\n * NOTE_TRACK, NOTE_TRACKERR, and NOTE_CHILD are no longer supported as of 10.5\n */\n/* additional flags for EVFILT_PROC */\n#define NOTE_TRACK      0x00000001              /* follow across forks */\n#define NOTE_TRACKERR   0x00000002              /* could not track child */\n#define NOTE_CHILD      0x00000004              /* am a child process */\n\n\n\n/* Temporay solution for BootX to use inode.h till kqueue moves to vfs layer */\nstruct knote;\nSLIST_HEAD(klist, knote);\n\n\nstruct timespec;\n\n__BEGIN_DECLS\nint     kqueue(void);\nint     kevent(int kq,\n    const struct kevent *changelist, int nchanges,\n    struct kevent *eventlist, int nevents,\n    const struct timespec *timeout);\nint     kevent64(int kq,\n    const struct kevent64_s *changelist, int nchanges,\n    struct kevent64_s *eventlist, int nevents,\n    unsigned int flags,\n    const struct timespec *timeout);\n\n\n__END_DECLS\n\n\n\n\n#endif /* !_SYS_EVENT_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/fasttrap.h",
    "content": "/*\n * CDDL HEADER START\n *\n * The contents of this file are subject to the terms of the\n * Common Development and Distribution License (the \"License\").\n * You may not use this file except in compliance with the License.\n *\n * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE\n * or http://www.opensolaris.org/os/licensing.\n * See the License for the specific language governing permissions\n * and limitations under the License.\n *\n * When distributing Covered Code, include this CDDL HEADER in each\n * file and include the License file at usr/src/OPENSOLARIS.LICENSE.\n * If applicable, add the following below this CDDL HEADER, with the\n * fields enclosed by brackets \"[]\" replaced with your own identifying\n * information: Portions Copyright [yyyy] [name of copyright owner]\n *\n * CDDL HEADER END\n */\n\n/*\n * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.\n * Use is subject to license terms.\n */\n\n#ifndef\t_SYS_FASTTRAP_H\n#define\t_SYS_FASTTRAP_H\n\n#include <sys/fasttrap_isa.h>\n#include <sys/dtrace.h>\n#include <sys/types.h>\n\n#ifdef\t__cplusplus\nextern \"C\" {\n#endif\n\n#if !defined(__APPLE__)\n#define\tFASTTRAPIOC\t\t(('m' << 24) | ('r' << 16) | ('f' << 8))\n#else\n#define\tFASTTRAPIOC\t\t_IO('d', 0)\n#endif /* __APPLE__ */\n#define\tFASTTRAPIOC_MAKEPROBE\t(FASTTRAPIOC | 1)\n#define\tFASTTRAPIOC_GETINSTR\t(FASTTRAPIOC | 2)\n\ntypedef enum fasttrap_probe_type {\n\tDTFTP_NONE = 0,\n\tDTFTP_ENTRY,\n\tDTFTP_RETURN,\n\tDTFTP_OFFSETS,\n\tDTFTP_POST_OFFSETS,\n\tDTFTP_IS_ENABLED\n} fasttrap_probe_type_t;\n\n#if defined(__APPLE__)\ntypedef enum fasttrap_provider_type {\n\tDTFTP_PROVIDER_NONE = 0,\n\tDTFTP_PROVIDER_USDT, \n\tDTFTP_PROVIDER_PID,\n\tDTFTP_PROVIDER_OBJC,\n\tDTFTP_PROVIDER_ONESHOT\n} fasttrap_provider_type_t;\n\n/* Moved from fasttrap.c */\n#define\tFASTTRAP_PID_NAME\t\t\"pid\"\n#define\tFASTTRAP_OBJC_NAME\t\t\"objc\"\n#define\tFASTTRAP_ONESHOT_NAME\t\t\"oneshot\"\n\n#endif\n\ntypedef struct fasttrap_probe_spec {\n\tpid_t\t\t\t\tftps_pid;\n#if defined(__APPLE__)\n\tfasttrap_provider_type_t\tftps_provider_type;\n\tfasttrap_probe_type_t\t\tftps_probe_type;\n#if defined(__arm__) || defined(__arm64__)\n\tuint32_t\t\t\tftps_arch_subinfo;\t// For any additional per probe architecture specific data\n#endif\n#endif\n\tchar\t\t\t\tftps_func[DTRACE_FUNCNAMELEN];\n\tchar\t\t\t\tftps_mod[DTRACE_MODNAMELEN];\n\n#if defined(__APPLE__)\n#if defined(__arm__) || defined(__arm64__)\n\t// We already have 'padding' from the ftps_arch_subinfo above\n#else\n#if !defined(__LP64__)\n\tuint32_t\t\t\tpad; /* Explicit pad to keep ILP32 and LP64 lined up. */\n#endif\n#endif\n#endif\n\tuint64_t\t\t\tftps_pc;\n\tuint64_t\t\t\tftps_size;\n\tuint64_t\t\t\tftps_noffs;\n\tuint64_t\t\t\tftps_offs[1];\n} fasttrap_probe_spec_t;\n\ntypedef struct fasttrap_instr_query {\n\tuint64_t\t\tftiq_pc;\n\tpid_t\t\t\tftiq_pid;\n\tfasttrap_instr_t\tftiq_instr;\n} fasttrap_instr_query_t;\n\n/*\n * To support the fasttrap provider from very early in a process's life,\n * the run-time linker, ld.so.1, has a program header of type PT_SUNWDTRACE\n * which points to a data object which must be PT_SUNWDTRACE_SIZE bytes.\n * This structure mimics the fasttrap provider section of the ulwp_t structure.\n * When the fasttrap provider is changed to require new or different\n * instructions, the data object in ld.so.1 and the thread initializers in libc\n * (libc_init() and _thrp_create()) need to be updated to include the new\n * instructions, and PT_SUNWDTRACE needs to be changed to a new unique number\n * (while the old value gets assigned something like PT_SUNWDTRACE_1). Since the\n * linker must be backward compatible with old Solaris releases, it must have\n * program headers for each of the PT_SUNWDTRACE versions. The kernel's\n * elfexec() function only has to look for the latest version of the\n * PT_SUNWDTRACE program header.\n */\n#define\tPT_SUNWDTRACE_SIZE\tFASTTRAP_SUNWDTRACE_SIZE\n\n#ifdef\t__cplusplus\n}\n#endif\n\n#endif\t/* _SYS_FASTTRAP_H */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/fasttrap_isa.h",
    "content": "/*\n * Copyright (c) 2006 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n * \n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n * \n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n * \n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n * \n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/* \n * Mach Operating System\n * Copyright (c) 1989 Carnegie-Mellon University\n * Copyright (c) 1988 Carnegie-Mellon University\n * All rights reserved.  The CMU software License Agreement specifies\n * the terms and conditions for use and redistribution.\n */\n/*\n * HISTORY\n */\n\n#ifndef\t_SYS_FASTTRAP_ISA_H_\n#define _SYS_FASTTRAP_ISA_H_\n\n/*\n * Machine dependent constants\n */\n\n#include <machine/fasttrap_isa.h>\n\n#endif\t/* _SYS_FASTTRAP_ISA_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/fcntl.h",
    "content": "/*\n * Copyright (c) 2000-2013 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */\n/*-\n * Copyright (c) 1983, 1990, 1993\n *\tThe Regents of the University of California.  All rights reserved.\n * (c) UNIX System Laboratories, Inc.\n * All or some portions of this file are derived from material licensed\n * to the University of California by American Telephone and Telegraph\n * Co. or Unix System Laboratories, Inc. and are reproduced herein with\n * the permission of UNIX System Laboratories, Inc.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *\tThis product includes software developed by the University of\n *\tCalifornia, Berkeley and its contributors.\n * 4. Neither the name of the University nor the names of its contributors\n *    may be used to endorse or promote products derived from this software\n *    without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n *\t@(#)fcntl.h\t8.3 (Berkeley) 1/21/94\n */\n\n\n#ifndef _SYS_FCNTL_H_\n#define _SYS_FCNTL_H_\n\n/*\n * This file includes the definitions for open and fcntl\n * described by POSIX for <fcntl.h>; it also includes\n * related kernel definitions.\n */\n#include <sys/_types.h>\n#include <sys/cdefs.h>\n#include <Availability.h>\n\n/* We should not be exporting size_t here.  Temporary for gcc bootstrapping. */\n#include <sys/_types/_size_t.h>\n#include <sys/_types/_mode_t.h>\n#include <sys/_types/_off_t.h>\n#include <sys/_types/_pid_t.h>\n\n/*\n * File status flags: these are used by open(2), fcntl(2).\n * They are also used (indirectly) in the kernel file structure f_flags,\n * which is a superset of the open/fcntl flags.  Open flags and f_flags\n * are inter-convertible using OFLAGS(fflags) and FFLAGS(oflags).\n * Open/fcntl flags begin with O_; kernel-internal flags begin with F.\n */\n/* open-only flags */\n#define O_RDONLY        0x0000          /* open for reading only */\n#define O_WRONLY        0x0001          /* open for writing only */\n#define O_RDWR          0x0002          /* open for reading and writing */\n#define O_ACCMODE       0x0003          /* mask for above modes */\n\n/*\n * Kernel encoding of open mode; separate read and write bits that are\n * independently testable: 1 greater than the above.\n *\n * XXX\n * FREAD and FWRITE are excluded from the #ifdef KERNEL so that TIOCFLUSH,\n * which was documented to use FREAD/FWRITE, continues to work.\n */\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n#define FREAD           0x00000001\n#define FWRITE          0x00000002\n#endif\n#define O_NONBLOCK      0x00000004      /* no delay */\n#define O_APPEND        0x00000008      /* set append mode */\n\n#include <sys/_types/_o_sync.h>\n\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n#define O_SHLOCK        0x00000010      /* open with shared file lock */\n#define O_EXLOCK        0x00000020      /* open with exclusive file lock */\n#define O_ASYNC         0x00000040      /* signal pgrp when data ready */\n#define O_FSYNC         O_SYNC          /* source compatibility: do not use */\n#define O_NOFOLLOW      0x00000100      /* don't follow symlinks */\n#endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */\n#define O_CREAT         0x00000200      /* create if nonexistant */\n#define O_TRUNC         0x00000400      /* truncate to zero length */\n#define O_EXCL          0x00000800      /* error if already exists */\n\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n#define O_EVTONLY       0x00008000      /* descriptor requested for event notifications only */\n#endif\n\n\n#define O_NOCTTY        0x00020000      /* don't assign controlling terminal */\n\n\n#if __DARWIN_C_LEVEL >= 200809L\n#define O_DIRECTORY     0x00100000\n#endif\n\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n#define O_SYMLINK       0x00200000      /* allow open of a symlink */\n#endif\n\n//      O_DSYNC         0x00400000      /* synch I/O data integrity */\n#include <sys/_types/_o_dsync.h>\n\n\n#if __DARWIN_C_LEVEL >= 200809L\n#define O_CLOEXEC       0x01000000      /* implicitly set FD_CLOEXEC */\n#endif\n\n\n#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL\n#define O_NOFOLLOW_ANY  0x20000000      /* no symlinks allowed in path */\n#endif\n\n\n#if __DARWIN_C_LEVEL >= 200809L\n/*\n * Descriptor value for the current working directory\n */\n#define AT_FDCWD        -2\n\n/*\n * Flags for the at functions\n */\n#define AT_EACCESS              0x0010  /* Use effective ids in access check */\n#define AT_SYMLINK_NOFOLLOW     0x0020  /* Act on the symlink itself not the target */\n#define AT_SYMLINK_FOLLOW       0x0040  /* Act on target of symlink */\n#define AT_REMOVEDIR            0x0080  /* Path refers to directory */\n#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL\n#define AT_REALDEV              0x0200  /* Return real device inodes resides on for fstatat(2) */\n#define AT_FDONLY               0x0400  /* Use only the fd and Ignore the path for fstatat(2) */\n#endif\n#endif\n\n/* Data Protection Flags */\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n#define O_DP_GETRAWENCRYPTED    0x0001\n#define O_DP_GETRAWUNENCRYPTED  0x0002\n#endif\n\n\n\n/*\n * The O_* flags used to have only F* names, which were used in the kernel\n * and by fcntl.  We retain the F* names for the kernel f_flags field\n * and for backward compatibility for fcntl.\n */\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n#define FAPPEND         O_APPEND        /* kernel/compat */\n#define FASYNC          O_ASYNC         /* kernel/compat */\n#define FFSYNC          O_FSYNC         /* kernel */\n#define FFDSYNC         O_DSYNC         /* kernel */\n#define FNONBLOCK       O_NONBLOCK      /* kernel */\n#define FNDELAY         O_NONBLOCK      /* compat */\n#define O_NDELAY        O_NONBLOCK      /* compat */\n#endif\n\n/*\n * Flags used for copyfile(2)\n */\n\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n#define CPF_OVERWRITE    0x0001\n#define CPF_IGNORE_MODE  0x0002\n#define CPF_MASK (CPF_OVERWRITE|CPF_IGNORE_MODE)\n#endif\n\n/*\n * Constants used for fcntl(2)\n */\n\n/* command values */\n#define F_DUPFD         0               /* duplicate file descriptor */\n#define F_GETFD         1               /* get file descriptor flags */\n#define F_SETFD         2               /* set file descriptor flags */\n#define F_GETFL         3               /* get file status flags */\n#define F_SETFL         4               /* set file status flags */\n#define F_GETOWN        5               /* get SIGIO/SIGURG proc/pgrp */\n#define F_SETOWN        6               /* set SIGIO/SIGURG proc/pgrp */\n#define F_GETLK         7               /* get record locking information */\n#define F_SETLK         8               /* set record locking information */\n#define F_SETLKW        9               /* F_SETLK; wait if blocked */\n#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL\n#define F_SETLKWTIMEOUT 10              /* F_SETLK; wait if blocked, return on timeout */\n#endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n#define F_FLUSH_DATA    40\n#define F_CHKCLEAN      41              /* Used for regression test */\n#define F_PREALLOCATE   42              /* Preallocate storage */\n#define F_SETSIZE       43              /* Truncate a file. Equivalent to calling truncate(2) */\n#define F_RDADVISE      44              /* Issue an advisory read async with no copy to user */\n#define F_RDAHEAD       45              /* turn read ahead off/on for this fd */\n/*\n * 46,47 used to be F_READBOOTSTRAP and F_WRITEBOOTSTRAP\n */\n#define F_NOCACHE       48              /* turn data caching off/on for this fd */\n#define F_LOG2PHYS      49              /* file offset to device offset */\n#define F_GETPATH       50              /* return the full path of the fd */\n#define F_FULLFSYNC     51              /* fsync + ask the drive to flush to the media */\n#define F_PATHPKG_CHECK 52              /* find which component (if any) is a package */\n#define F_FREEZE_FS     53              /* \"freeze\" all fs operations */\n#define F_THAW_FS       54              /* \"thaw\" all fs operations */\n#define F_GLOBAL_NOCACHE 55             /* turn data caching off/on (globally) for this file */\n\n\n#define F_ADDSIGS       59              /* add detached signatures */\n\n\n#define F_ADDFILESIGS   61              /* add signature from same file (used by dyld for shared libs) */\n\n#define F_NODIRECT      62              /* used in conjunction with F_NOCACHE to indicate that DIRECT, synchonous writes */\n                                        /* should not be used (i.e. its ok to temporaily create cached pages) */\n\n#define F_GETPROTECTIONCLASS    63              /* Get the protection class of a file from the EA, returns int */\n#define F_SETPROTECTIONCLASS    64              /* Set the protection class of a file for the EA, requires int */\n\n#define F_LOG2PHYS_EXT  65              /* file offset to device offset, extended */\n\n#define F_GETLKPID              66      /* See man fcntl(2) F_GETLK\n\t                                 * Similar to F_GETLK but in addition l_pid is treated as an input parameter\n\t                                 * which is used as a matching value when searching locks on the file\n\t                                 * so that only locks owned by the process with pid l_pid are returned.\n\t                                 * However, any flock(2) type lock will also be found with the returned value\n\t                                 * of l_pid set to -1 (as with F_GETLK).\n\t                                 */\n\n/* See F_DUPFD_CLOEXEC below for 67 */\n\n\n#define F_SETBACKINGSTORE       70      /* Mark the file as being the backing store for another filesystem */\n#define F_GETPATH_MTMINFO       71      /* return the full path of the FD, but error in specific mtmd circumstances */\n\n#define F_GETCODEDIR            72      /* Returns the code directory, with associated hashes, to the caller */\n\n#define F_SETNOSIGPIPE          73      /* No SIGPIPE generated on EPIPE */\n#define F_GETNOSIGPIPE          74      /* Status of SIGPIPE for this fd */\n\n#define F_TRANSCODEKEY          75      /* For some cases, we need to rewrap the key for AKS/MKB */\n\n#define F_SINGLE_WRITER         76      /* file being written to a by single writer... if throttling enabled, writes */\n                                        /* may be broken into smaller chunks with throttling in between */\n\n#define F_GETPROTECTIONLEVEL    77      /* Get the protection version number for this filesystem */\n\n#define F_FINDSIGS              78      /* Add detached code signatures (used by dyld for shared libs) */\n\n\n#define F_ADDFILESIGS_FOR_DYLD_SIM 83   /* Add signature from same file, only if it is signed by Apple (used by dyld for simulator) */\n\n\n#define F_BARRIERFSYNC          85      /* fsync + issue barrier to drive */\n\n\n#define F_ADDFILESIGS_RETURN    97      /* Add signature from same file, return end offset in structure on success */\n#define F_CHECK_LV              98      /* Check if Library Validation allows this Mach-O file to be mapped into the calling process */\n\n#define F_PUNCHHOLE     99              /* Deallocate a range of the file */\n\n#define F_TRIM_ACTIVE_FILE      100     /* Trim an active file */\n\n#define F_SPECULATIVE_READ     101      /* Synchronous advisory read fcntl for regular and compressed file */\n\n#define F_GETPATH_NOFIRMLINK       102              /* return the full path without firmlinks of the fd */\n\n#define F_ADDFILESIGS_INFO      103     /* Add signature from same file, return information */\n#define F_ADDFILESUPPL          104     /* Add supplemental signature from same file with fd reference to original */\n#define F_GETSIGSINFO           105     /* Look up code signature information attached to a file or slice */\n\n// FS-specific fcntl()'s numbers begin at 0x00010000 and go up\n#define FCNTL_FS_SPECIFIC_BASE  0x00010000\n\n#endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */\n\n#if __DARWIN_C_LEVEL >= 200809L\n#define F_DUPFD_CLOEXEC         67      /* mark the dup with FD_CLOEXEC */\n#endif\n\n/* file descriptor flags (F_GETFD, F_SETFD) */\n#define FD_CLOEXEC      1               /* close-on-exec flag */\n\n/* record locking flags (F_GETLK, F_SETLK, F_SETLKW) */\n#define F_RDLCK         1               /* shared or read lock */\n#define F_UNLCK         2               /* unlock */\n#define F_WRLCK         3               /* exclusive or write lock */\n\n\n/*\n * [XSI] The values used for l_whence shall be defined as described\n * in <unistd.h>\n */\n#include <sys/_types/_seek_set.h>\n\n/*\n * [XSI] The symbolic names for file modes for use as values of mode_t\n * shall be defined as described in <sys/stat.h>\n */\n#include <sys/_types/_s_ifmt.h>\n\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n/* allocate flags (F_PREALLOCATE) */\n\n#define F_ALLOCATECONTIG  0x00000002    /* allocate contigious space */\n#define F_ALLOCATEALL     0x00000004    /* allocate all requested space or no space at all */\n\n/* Position Modes (fst_posmode) for F_PREALLOCATE */\n\n#define F_PEOFPOSMODE 3                 /* Make it past all of the SEEK pos modes so that */\n                                        /* we can keep them in sync should we desire */\n#define F_VOLPOSMODE    4               /* specify volume starting postion */\n#endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */\n\n/*\n * Advisory file segment locking data type -\n * information passed to system by user\n */\nstruct flock {\n\toff_t   l_start;        /* starting offset */\n\toff_t   l_len;          /* len = 0 means until end of file */\n\tpid_t   l_pid;          /* lock owner */\n\tshort   l_type;         /* lock type: read/write, etc. */\n\tshort   l_whence;       /* type of l_start */\n};\n\n#include <sys/_types/_timespec.h>\n\n#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL\n/*\n * Advisory file segment locking with time out -\n * Information passed to system by user for F_SETLKWTIMEOUT\n */\nstruct flocktimeout {\n\tstruct flock    fl;             /* flock passed for file locking */\n\tstruct timespec timeout;        /* timespec struct for timeout */\n};\n#endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */\n\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n/*\n * advisory file read data type -\n * information passed by user to system\n */\n\n\nstruct radvisory {\n\toff_t   ra_offset;\n\tint     ra_count;\n};\n\n\n/*\n * detached code signatures data type -\n * information passed by user to system used by F_ADDSIGS and F_ADDFILESIGS.\n * F_ADDFILESIGS is a shortcut for files that contain their own signature and\n * doesn't require mapping of the file in order to load the signature.\n */\n#define USER_FSIGNATURES_CDHASH_LEN 20\ntypedef struct fsignatures {\n\toff_t           fs_file_start;\n\tvoid            *fs_blob_start;\n\tsize_t          fs_blob_size;\n\n\t/* The following fields are only applicable to F_ADDFILESIGS_INFO (64bit only). */\n\t/* Prior to F_ADDFILESIGS_INFO, this struct ended after fs_blob_size. */\n\tsize_t          fs_fsignatures_size;// input: size of this struct (for compatibility)\n\tchar            fs_cdhash[USER_FSIGNATURES_CDHASH_LEN];     // output: cdhash\n\tint             fs_hash_type;// output: hash algorithm type for cdhash\n} fsignatures_t;\n\ntypedef struct fsupplement {\n\toff_t           fs_file_start;   /* offset of Mach-O image in FAT file  */\n\toff_t           fs_blob_start;   /* offset of signature in Mach-O image */\n\tsize_t          fs_blob_size;    /* signature blob size                 */\n\tint             fs_orig_fd;      /* address of original image           */\n} fsupplement_t;\n\n\n\n/*\n * DYLD needs to check if the object is allowed to be combined\n * into the main binary. This is done between the code signature\n * is loaded and dyld is doing all the work to process the LOAD commands.\n *\n * While this could be done in F_ADDFILESIGS.* family the hook into\n * the MAC module doesn't say no when LV isn't enabled and then that\n * is cached on the vnode, and the MAC module never gets change once\n * a process that library validation enabled.\n */\ntypedef struct fchecklv {\n\toff_t           lv_file_start;\n\tsize_t          lv_error_message_size;\n\tvoid            *lv_error_message;\n} fchecklv_t;\n\n\n/* At this time F_GETSIGSINFO can only indicate platformness.\n *  As additional requestable information is defined, new keys will be added and the\n *  fgetsigsinfo_t structure will be lengthened to add space for the additional information\n */\n#define GETSIGSINFO_PLATFORM_BINARY 1\n\n/* fgetsigsinfo_t used by F_GETSIGSINFO command */\ntypedef struct fgetsigsinfo {\n\toff_t fg_file_start; /* IN: Offset in the file to look for a signature, -1 for any signature */\n\tint   fg_info_request; /* IN: Key indicating the info requested */\n\tint   fg_sig_is_platform; /* OUT: 1 if the signature is a plat form binary, 0 if not */\n} fgetsigsinfo_t;\n\n\n/* lock operations for flock(2) */\n#define LOCK_SH         0x01            /* shared file lock */\n#define LOCK_EX         0x02            /* exclusive file lock */\n#define LOCK_NB         0x04            /* don't block when locking */\n#define LOCK_UN         0x08            /* unlock file */\n\n/* fstore_t type used by F_PREALLOCATE command */\n\ntypedef struct fstore {\n\tunsigned int fst_flags; /* IN: flags word */\n\tint     fst_posmode;    /* IN: indicates use of offset field */\n\toff_t   fst_offset;     /* IN: start of the region */\n\toff_t   fst_length;     /* IN: size of the region */\n\toff_t   fst_bytesalloc; /* OUT: number of bytes allocated */\n} fstore_t;\n\n/* fpunchhole_t used by F_PUNCHHOLE */\ntypedef struct fpunchhole {\n\tunsigned int fp_flags; /* unused */\n\tunsigned int reserved; /* (to maintain 8-byte alignment) */\n\toff_t fp_offset; /* IN: start of the region */\n\toff_t fp_length; /* IN: size of the region */\n} fpunchhole_t;\n\n/* factive_file_trim_t used by F_TRIM_ACTIVE_FILE */\ntypedef struct ftrimactivefile {\n\toff_t fta_offset;  /* IN: start of the region */\n\toff_t fta_length; /* IN: size of the region */\n} ftrimactivefile_t;\n\n/* fspecread_t used by F_SPECULATIVE_READ */\ntypedef struct fspecread {\n\tunsigned int fsr_flags;  /* IN: flags word */\n\tunsigned int reserved;   /* to maintain 8-byte alignment */\n\toff_t fsr_offset;        /* IN: start of the region */\n\toff_t fsr_length;        /* IN: size of the region */\n} fspecread_t;\n\n/* fbootstraptransfer_t used by F_READBOOTSTRAP and F_WRITEBOOTSTRAP commands */\n\ntypedef struct fbootstraptransfer {\n\toff_t fbt_offset;       /* IN: offset to start read/write */\n\tsize_t fbt_length;    /* IN: number of bytes to transfer */\n\tvoid *fbt_buffer;       /* IN: buffer to be read/written */\n} fbootstraptransfer_t;\n\n\n/*\n * For F_LOG2PHYS this information is passed back to user\n * Currently only devoffset is returned - that is the VOP_BMAP\n * result - the disk device address corresponding to the\n * current file offset (likely set with an lseek).\n *\n * The flags could hold an indication of whether the # of\n * contiguous bytes reflects the true extent length on disk,\n * or is an advisory value that indicates there is at least that\n * many bytes contiguous.  For some filesystems it might be too\n * inefficient to provide anything beyond the advisory value.\n * Flags and contiguous bytes return values are not yet implemented.\n * For them the fcntl will nedd to switch from using BMAP to CMAP\n * and a per filesystem type flag will be needed to interpret the\n * contiguous bytes count result from CMAP.\n *\n * F_LOG2PHYS_EXT is a variant of F_LOG2PHYS that uses a passed in\n * file offset and length instead of the current file offset.\n * F_LOG2PHYS_EXT operates on the same structure as F_LOG2PHYS, but\n * treats it as an in/out.\n */\n#pragma pack(4)\n\nstruct log2phys {\n\tunsigned int    l2p_flags;       /* unused so far */\n\toff_t           l2p_contigbytes; /* F_LOG2PHYS:     unused so far */\n\t                                 /* F_LOG2PHYS_EXT: IN:  number of bytes to be queried */\n\t                                 /*                 OUT: number of contiguous bytes at this position */\n\toff_t           l2p_devoffset;   /* F_LOG2PHYS:     OUT: bytes into device */\n\t                                 /* F_LOG2PHYS_EXT: IN:  bytes into file */\n\t                                 /*                 OUT: bytes into device */\n};\n\n#pragma pack()\n\n#define O_POPUP    0x80000000   /* force window to popup on open */\n#define O_ALERT    0x20000000   /* small, clean popup window */\n\n\n#endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */\n\n\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n\n#include <sys/_types/_filesec_t.h>\n\ntypedef enum {\n\tFILESEC_OWNER = 1,\n\tFILESEC_GROUP = 2,\n\tFILESEC_UUID = 3,\n\tFILESEC_MODE = 4,\n\tFILESEC_ACL = 5,\n\tFILESEC_GRPUUID = 6,\n\n/* XXX these are private to the implementation */\n\tFILESEC_ACL_RAW = 100,\n\tFILESEC_ACL_ALLOCSIZE = 101\n} filesec_property_t;\n\n/* XXX backwards compatibility */\n#define FILESEC_GUID FILESEC_UUID\n#endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */\n\n__BEGIN_DECLS\nint     open(const char *, int, ...) __DARWIN_ALIAS_C(open);\n#if __DARWIN_C_LEVEL >= 200809L\nint     openat(int, const char *, int, ...) __DARWIN_NOCANCEL(openat) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_8_0);\n#endif\nint     creat(const char *, mode_t) __DARWIN_ALIAS_C(creat);\nint     fcntl(int, int, ...) __DARWIN_ALIAS_C(fcntl);\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n\nint     openx_np(const char *, int, filesec_t);\n/*\n * data-protected non-portable open(2) :\n *  int open_dprotected_np(user_addr_t path, int flags, int class, int dpflags, int mode)\n */\nint open_dprotected_np( const char *, int, int, int, ...);\nint     flock(int, int);\nfilesec_t filesec_init(void);\nfilesec_t filesec_dup(filesec_t);\nvoid    filesec_free(filesec_t);\nint     filesec_get_property(filesec_t, filesec_property_t, void *);\nint     filesec_query_property(filesec_t, filesec_property_t, int *);\nint     filesec_set_property(filesec_t, filesec_property_t, const void *);\nint     filesec_unset_property(filesec_t, filesec_property_t) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2);\n#define _FILESEC_UNSET_PROPERTY ((void *)0)\n#define _FILESEC_REMOVE_ACL     ((void *)1)\n#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */\n__END_DECLS\n\n#endif /* !_SYS_FCNTL_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/file.h",
    "content": "/*\n * Copyright (c) 2000-2008 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/* Copyright (c) 1995, 1997 Apple Computer, Inc. All Rights Reserved */\n/*\n * Copyright (c) 1982, 1986, 1989, 1993\n *\tThe Regents of the University of California.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *\tThis product includes software developed by the University of\n *\tCalifornia, Berkeley and its contributors.\n * 4. Neither the name of the University nor the names of its contributors\n *    may be used to endorse or promote products derived from this software\n *    without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n *\t@(#)file.h\t8.3 (Berkeley) 1/9/95\n */\n\n#ifndef _SYS_FILE_H_\n#define _SYS_FILE_H_\n\n#include <sys/appleapiopts.h>\n#include <sys/types.h>\n#include <sys/fcntl.h>\n#include <sys/unistd.h>\n#include <sys/queue.h>\n#include <sys/cdefs.h>\n\n\n#ifndef _KAUTH_CRED_T\n#define _KAUTH_CRED_T\nstruct ucred;\ntypedef struct ucred *kauth_cred_t;\nstruct posix_cred;\ntypedef struct posix_cred *posix_cred_t;\n#endif  /* !_KAUTH_CRED_T */\n\n__BEGIN_DECLS\n\n__END_DECLS\n#endif /* !_SYS_FILE_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/filedesc.h",
    "content": "/*\n * Copyright (c) 2000-2012 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/* Copyright (c) 1995, 1997 Apple Computer, Inc. All Rights Reserved */\n/*\n * Copyright (c) 1990, 1993\n *\tThe Regents of the University of California.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *\tThis product includes software developed by the University of\n *\tCalifornia, Berkeley and its contributors.\n * 4. Neither the name of the University nor the names of its contributors\n *    may be used to endorse or promote products derived from this software\n *    without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n *\t@(#)filedesc.h\t8.1 (Berkeley) 6/2/93\n */\n\n#ifndef _SYS_FILEDESC_H_\n#define _SYS_FILEDESC_H_\n\n#include <sys/appleapiopts.h>\n\n/*\n * This structure is used for the management of descriptors.  It may be\n * shared by multiple processes.\n *\n * A process is initially started out with NDFILE descriptors [XXXstored within\n * this structureXXX], selected to be enough for typical applications based on\n * the historical limit of 20 open files (and the usage of descriptors by\n * shells).  If these descriptors are exhausted, a larger descriptor table\n * may be allocated, up to a process' resource limit; [XXXthe internal arrays\n * are then unusedXXX].  The initial expansion is set to NDEXTENT; each time\n * it runs out, it is doubled until the resource limit is reached. NDEXTENT\n * should be selected to be the biggest multiple of OFILESIZE (see below)\n * that will fit in a power-of-two sized piece of memory.\n */\n#define NDFILE          25              /* 125 bytes */\n#define NDEXTENT        50              /* 250 bytes in 256-byte alloc. */\n\n\n#endif /* !_SYS_FILEDESC_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/filio.h",
    "content": "/*\n * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */\n/*-\n * Copyright (c) 1982, 1986, 1990, 1993, 1994\n *\tThe Regents of the University of California.  All rights reserved.\n * (c) UNIX System Laboratories, Inc.\n * All or some portions of this file are derived from material licensed\n * to the University of California by American Telephone and Telegraph\n * Co. or Unix System Laboratories, Inc. and are reproduced herein with\n * the permission of UNIX System Laboratories, Inc.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *\tThis product includes software developed by the University of\n *\tCalifornia, Berkeley and its contributors.\n * 4. Neither the name of the University nor the names of its contributors\n *    may be used to endorse or promote products derived from this software\n *    without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n *\t@(#)filio.h\t8.1 (Berkeley) 3/28/94\n */\n\n#ifndef _SYS_FILIO_H_\n#define _SYS_FILIO_H_\n\n#include <sys/ioccom.h>\n\n/* Generic file-descriptor ioctl's. */\n#define FIOCLEX          _IO('f', 1)            /* set close on exec on fd */\n#define FIONCLEX         _IO('f', 2)            /* remove close on exec */\n#define FIONREAD        _IOR('f', 127, int)     /* get # bytes to read */\n#define FIONBIO         _IOW('f', 126, int)     /* set/clear non-blocking i/o */\n#define FIOASYNC        _IOW('f', 125, int)     /* set/clear async i/o */\n#define FIOSETOWN       _IOW('f', 124, int)     /* set owner */\n#define FIOGETOWN       _IOR('f', 123, int)     /* get owner */\n#define FIODTYPE        _IOR('f', 122, int)     /* get d_type */\n\n\n#endif /* !_SYS_FILIO_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/fsgetpath.h",
    "content": "/*\n * Copyright (c) 2008-2017 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n\n#ifndef _FSGETPATH_H_\n#define _FSGETPATH_H_\n\n\n#include <machine/_types.h>\n#include <sys/_types/_ssize_t.h>\n#include <sys/_types/_size_t.h>\n#include <sys/_types/_fsid_t.h>\n#include <_types/_uint64_t.h>\n#include <Availability.h>\n\n\n__BEGIN_DECLS\n\n/*\n * Obtain the full pathname of a file system object by id.\n */\nssize_t fsgetpath(char *, size_t, fsid_t *, uint64_t) __OSX_AVAILABLE(10.13) __IOS_AVAILABLE(11.0) __TVOS_AVAILABLE(11.0) __WATCHOS_AVAILABLE(4.0);\n\n\n__END_DECLS\n\n\n#endif /* !_FSGETPATH_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/gmon.h",
    "content": "/*\n * Copyright (c) 2000-2018 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */\n/*-\n * Copyright (c) 1982, 1986, 1992, 1993\n *\tThe Regents of the University of California.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *\tThis product includes software developed by the University of\n *\tCalifornia, Berkeley and its contributors.\n * 4. Neither the name of the University nor the names of its contributors\n *    may be used to endorse or promote products derived from this software\n *    without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n *\t@(#)gmon.h\t8.2 (Berkeley) 1/4/94\n */\n\n#ifndef _SYS_GMON_H_\n#define _SYS_GMON_H_\n#include <stdint.h>\n#include <sys/types.h>\n\n/*\n * Structure prepended to gmon.out profiling data file.\n */\nstruct gmonhdr {\n\tuint32_t lpc;           /* base pc address of sample buffer */\n\tuint32_t hpc;           /* max pc address of sampled buffer */\n\tuint32_t ncnt;          /* size of sample buffer (plus this header) */\n\tint32_t version;        /* version number */\n\tint32_t profrate;       /* profiling clock rate */\n\tint32_t spare[3];       /* reserved */\n};\n#define GMONVERSION     0x00051879\n\nstruct gmonhdr_64 {\n\tuint64_t lpc;           /* base pc address of sample buffer */\n\tuint64_t hpc;           /* max pc address of sampled buffer */\n\tuint32_t ncnt;          /* size of sample buffer (plus this header) */\n\tint32_t version;        /* version number */\n\tint32_t profrate;       /* profiling clock rate */\n\tint32_t spare[3];       /* reserved */\n};\n\ntypedef struct\n#ifndef __LP64__\n    gmonhdr\n#else\n    gmonhdr_64\n#endif\n    gmonhdr_t;\n\n/*\n * histogram counters are unsigned shorts (according to the kernel).\n */\n#define HISTCOUNTER     unsigned short\n\n/*\n * fraction of text space to allocate for histogram counters here, 1/2\n */\n#define HISTFRACTION    2\n\n/*\n * Fraction of text space to allocate for from hash buckets.\n * The value of HASHFRACTION is based on the minimum number of bytes\n * of separation between two subroutine call points in the object code.\n * Given MIN_SUBR_SEPARATION bytes of separation the value of\n * HASHFRACTION is calculated as:\n *\n *\tHASHFRACTION = MIN_SUBR_SEPARATION / (2 * sizeof(short) - 1);\n *\n * For example, on the VAX, the shortest two call sequence is:\n *\n *\tcalls\t$0,(r0)\n *\tcalls\t$0,(r0)\n *\n * which is separated by only three bytes, thus HASHFRACTION is\n * calculated as:\n *\n *\tHASHFRACTION = 3 / (2 * 2 - 1) = 1\n *\n * Note that the division above rounds down, thus if MIN_SUBR_FRACTION\n * is less than three, this algorithm will not work!\n *\n * In practice, however, call instructions are rarely at a minimal\n * distance.  Hence, we will define HASHFRACTION to be 2 across all\n * architectures.  This saves a reasonable amount of space for\n * profiling data structures without (in practice) sacrificing\n * any granularity.\n */\n#define HASHFRACTION    2\n\n/*\n * percent of text space to allocate for tostructs with a minimum.\n */\n#define ARCDENSITY      2\n#define MINARCS         50\n#define MAXARCS         ((1 << (8 * sizeof(HISTCOUNTER))) - 2)\n\nstruct tostruct {\n\tuint32_t        selfpc;\n\tint32_t         count;\n\tuint16_t        link;\n\tuint16_t        order;\n};\n\nstruct tostruct_64 {\n\tuint64_t        selfpc;\n\tint32_t         count;\n\tuint16_t        link;\n\tuint16_t        order;\n};\n\ntypedef struct\n#ifndef __LP64__\n    tostruct\n#else\n    tostruct_64\n#endif\n    tostruct_t;\n\n/*\n * a raw arc, with pointers to the calling site and\n * the called site and a count.\n */\nstruct rawarc {\n\tuint32_t        raw_frompc;\n\tuint32_t        raw_selfpc;\n\tint32_t         raw_count;\n};\n\nstruct rawarc_64 {\n\tuint64_t        raw_frompc;\n\tuint64_t        raw_selfpc;\n\tint32_t         raw_count;\n};\n\ntypedef struct\n#ifndef __LP64__\n    rawarc\n#else\n    rawarc_64\n#endif\n    rawarc_t;\n\n/*\n * general rounding functions.\n */\n#define ROUNDDOWN(x, y)  (((x)/(y))*(y))\n#define ROUNDUP(x, y)    ((((x)+(y)-1)/(y))*(y))\n\n/*\n * The profiling data structures are housed in this structure.\n */\nstruct gmonparam {\n\tint             state;\n\tu_short         *kcount;\n\tu_long          kcountsize;\n\tu_short         *froms;\n\tu_long          fromssize;\n\ttostruct_t      *tos;\n\tu_long          tossize;\n\tlong            tolimit;\n\tu_long          lowpc;\n\tu_long          highpc;\n\tu_long          textsize;\n\tu_long          hashfraction;\n};\nextern struct gmonparam _gmonparam;\n\n/*\n * Possible states of profiling.\n */\n#define GMON_PROF_ON    0\n#define GMON_PROF_BUSY  1\n#define GMON_PROF_ERROR 2\n#define GMON_PROF_OFF   3\n\n/*\n * In order to support more information than in the original mon.out and\n * gmon.out files there is an alternate gmon.out file format.  The alternate\n * gmon.out file format starts with a magic number then separates the\n * information with gmon_data_t's.\n */\n#define GMON_MAGIC 0xbeefbabe\n#define GMON_MAGIC_64 0xbeefbabf\ntypedef struct gmon_data {\n\tuint32_t type; /* constant for type of data following this struct */\n\tuint32_t size; /* size in bytes of the data following this struct */\n} gmon_data_t;\n\n/*\n * The GMONTYPE_SAMPLES gmon_data.type is for the histogram counters described\n * above and has a gmonhdr_t followed by the counters.\n */\n#define GMONTYPE_SAMPLES        1\n/*\n * The GMONTYPE_RAWARCS gmon_data.type is for the raw arcs described above.\n */\n#define GMONTYPE_RAWARCS        2\n/*\n * The GMONTYPE_ARCS_ORDERS gmon_data.type is for the raw arcs with a call\n * order field.  The order is the order is a sequence number for the order each\n * call site was executed.  Raw_order values start at 1 not zero.  Other than\n * the raw_order field this is the same information as in the rawarc_t.\n */\n#define GMONTYPE_ARCS_ORDERS    3\nstruct rawarc_order {\n\tuint32_t    raw_frompc;\n\tuint32_t    raw_selfpc;\n\tuint32_t    raw_count;\n\tuint32_t    raw_order;\n}; struct rawarc_order_64 {\n\tuint64_t    raw_frompc;\n\tuint64_t    raw_selfpc;\n\tuint32_t    raw_count;\n\tuint32_t    raw_order;\n};\n\ntypedef struct\n#ifndef __LP64__\n    rawarc_order\n#else\n    rawarc_order_64\n#endif\n    rawarc_order_t;\n\n/*\n * The GMONTYPE_DYLD_STATE gmon_data.type is for the dynamic link editor state\n * of the program.\n * The informations starts with an uint32_t with the count of states:\n *      image_count\n * Then each state follows in the file.  The state is made up of\n *      vmaddr_slide (the amount dyld slid this image from it's vmaddress)\n *      name (the file name dyld loaded this image from)\n * The vmaddr_slide is a 32-bit value for 32-bit programs and 64-bit value for\n * 64-bit programs.\n */\n#define GMONTYPE_DYLD_STATE     4\n\n/*\n * The GMONTYPE_DYLD2_STATE gmon_data.type is for the dynamic link editor state\n * of the program.\n * The informations starts with an uint32_t with the count of states:\n *      image_count\n * Then each state follows in the file.  The state is made up of\n *      image_header (the address where dyld loaded this image)\n *      name (the file name dyld loaded this image from)\n * The image_header is a 32-bit value for 32-bit programs and 64-bit value for\n * 64-bit programs.\n */\n#define GMONTYPE_DYLD2_STATE     5\n\n#endif /* !_SYS_GMON_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/ioccom.h",
    "content": "/*\n * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */\n/*-\n * Copyright (c) 1982, 1986, 1990, 1993, 1994\n *\tThe Regents of the University of California.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *\tThis product includes software developed by the University of\n *\tCalifornia, Berkeley and its contributors.\n * 4. Neither the name of the University nor the names of its contributors\n *    may be used to endorse or promote products derived from this software\n *    without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n *\t@(#)ioccom.h\t8.2 (Berkeley) 3/28/94\n */\n\n#ifndef _SYS_IOCCOM_H_\n#define _SYS_IOCCOM_H_\n\n#include <sys/_types.h>\n\n/*\n * Ioctl's have the command encoded in the lower word, and the size of\n * any in or out parameters in the upper word.  The high 3 bits of the\n * upper word are used to encode the in/out status of the parameter.\n */\n#define IOCPARM_MASK    0x1fff          /* parameter length, at most 13 bits */\n#define IOCPARM_LEN(x)  (((x) >> 16) & IOCPARM_MASK)\n#define IOCBASECMD(x)   ((x) & ~(IOCPARM_MASK << 16))\n#define IOCGROUP(x)     (((x) >> 8) & 0xff)\n\n#define IOCPARM_MAX     (IOCPARM_MASK + 1)      /* max size of ioctl args */\n/* no parameters */\n#define IOC_VOID        (__uint32_t)0x20000000\n/* copy parameters out */\n#define IOC_OUT         (__uint32_t)0x40000000\n/* copy parameters in */\n#define IOC_IN          (__uint32_t)0x80000000\n/* copy parameters in and out */\n#define IOC_INOUT       (IOC_IN|IOC_OUT)\n/* mask for IN/OUT/VOID */\n#define IOC_DIRMASK     (__uint32_t)0xe0000000\n\n#define _IOC(inout, group, num, len) \\\n\t(inout | ((len & IOCPARM_MASK) << 16) | ((group) << 8) | (num))\n#define _IO(g, n)        _IOC(IOC_VOID,\t(g), (n), 0)\n#define _IOR(g, n, t)     _IOC(IOC_OUT,\t(g), (n), sizeof(t))\n#define _IOW(g, n, t)     _IOC(IOC_IN,\t(g), (n), sizeof(t))\n/* this should be _IORW, but stdio got there first */\n#define _IOWR(g, n, t)    _IOC(IOC_INOUT,\t(g), (n), sizeof(t))\n\n#endif /* !_SYS_IOCCOM_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/ioctl.h",
    "content": "/*\n * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */\n/*-\n * Copyright (c) 1982, 1986, 1990, 1993, 1994\n *\tThe Regents of the University of California.  All rights reserved.\n * (c) UNIX System Laboratories, Inc.\n * All or some portions of this file are derived from material licensed\n * to the University of California by American Telephone and Telegraph\n * Co. or Unix System Laboratories, Inc. and are reproduced herein with\n * the permission of UNIX System Laboratories, Inc.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *\tThis product includes software developed by the University of\n *\tCalifornia, Berkeley and its contributors.\n * 4. Neither the name of the University nor the names of its contributors\n *    may be used to endorse or promote products derived from this software\n *    without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n *\t@(#)ioctl.h\t8.6 (Berkeley) 3/28/94\n */\n\n#ifndef _SYS_IOCTL_H_\n#define _SYS_IOCTL_H_\n\n#include <sys/ttycom.h>\n\n/*\n * Pun for SunOS prior to 3.2.  SunOS 3.2 and later support TIOCGWINSZ\n * and TIOCSWINSZ (yes, even 3.2-3.5, the fact that it wasn't documented\n * nonwithstanding).\n */\nstruct ttysize {\n\tunsigned short  ts_lines;\n\tunsigned short  ts_cols;\n\tunsigned short  ts_xxx;\n\tunsigned short  ts_yyy;\n};\n#define TIOCGSIZE       TIOCGWINSZ\n#define TIOCSSIZE       TIOCSWINSZ\n\n#include <sys/ioccom.h>\n\n#include <sys/filio.h>\n#include <sys/sockio.h>\n\n\n#include <sys/cdefs.h>\n\n__BEGIN_DECLS\nint     ioctl(int, unsigned long, ...);\n__END_DECLS\n#endif /* !_SYS_IOCTL_H_ */\n\n/*\n * Keep outside _SYS_IOCTL_H_\n * Compatability with old terminal driver\n *\n * Source level -> #define USE_OLD_TTY\n * Kernel level -> always on\n */\n#if defined(USE_OLD_TTY) || defined(BSD_KERNEL_PRIVATE)\n#include <sys/ioctl_compat.h>\n#endif /* defined(USE_OLD_TTY) || defined(BSD_KERNEL_PRIVATE) */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/ioctl_compat.h",
    "content": "/*\n * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */\n/*\n * Copyright (c) 1990, 1993\n *\tThe Regents of the University of California.  All rights reserved.\n * (c) UNIX System Laboratories, Inc.\n * All or some portions of this file are derived from material licensed\n * to the University of California by American Telephone and Telegraph\n * Co. or Unix System Laboratories, Inc. and are reproduced herein with\n * the permission of UNIX System Laboratories, Inc.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *\tThis product includes software developed by the University of\n *\tCalifornia, Berkeley and its contributors.\n * 4. Neither the name of the University nor the names of its contributors\n *    may be used to endorse or promote products derived from this software\n *    without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n *\t@(#)ioctl_compat.h\t8.4 (Berkeley) 1/21/94\n */\n\n#ifndef _SYS_IOCTL_COMPAT_H_\n#define _SYS_IOCTL_COMPAT_H_\n\n#include <sys/ttychars.h>\n#include <sys/ttydev.h>\n\nstruct tchars {\n\tchar    t_intrc;        /* interrupt */\n\tchar    t_quitc;        /* quit */\n\tchar    t_startc;       /* start output */\n\tchar    t_stopc;        /* stop output */\n\tchar    t_eofc;         /* end-of-file */\n\tchar    t_brkc;         /* input delimiter (like nl) */\n};\n\nstruct ltchars {\n\tchar    t_suspc;        /* stop process signal */\n\tchar    t_dsuspc;       /* delayed stop process signal */\n\tchar    t_rprntc;       /* reprint line */\n\tchar    t_flushc;       /* flush output (toggles) */\n\tchar    t_werasc;       /* word erase */\n\tchar    t_lnextc;       /* literal next character */\n};\n\n/*\n * Structure for TIOCGETP and TIOCSETP ioctls.\n */\n#ifndef _SGTTYB_\n#define _SGTTYB_\nstruct sgttyb {\n\tchar    sg_ispeed;              /* input speed */\n\tchar    sg_ospeed;              /* output speed */\n\tchar    sg_erase;               /* erase character */\n\tchar    sg_kill;                /* kill character */\n\tshort   sg_flags;               /* mode flags */\n};\n#endif\n\n#ifdef USE_OLD_TTY\n# undef  TIOCGETD\n# define TIOCGETD       _IOR('t', 0, int)       /* get line discipline */\n# undef  TIOCSETD\n# define TIOCSETD       _IOW('t', 1, int)       /* set line discipline */\n#else\n# define OTIOCGETD      _IOR('t', 0, int)       /* get line discipline */\n# define OTIOCSETD      _IOW('t', 1, int)       /* set line discipline */\n#endif\n#define TIOCHPCL        _IO('t', 2)             /* hang up on last close */\n#define TIOCGETP        _IOR('t', 8,struct sgttyb)/* get parameters -- gtty */\n#define TIOCSETP        _IOW('t', 9,struct sgttyb)/* set parameters -- stty */\n#define TIOCSETN        _IOW('t',10,struct sgttyb)/* as above, but no flushtty*/\n#define TIOCSETC        _IOW('t',17,struct tchars)/* set special characters */\n#define TIOCGETC        _IOR('t',18,struct tchars)/* get special characters */\n#define         TANDEM          0x00000001      /* send stopc on out q full */\n#define         CBREAK          0x00000002      /* half-cooked mode */\n#define         LCASE           0x00000004      /* simulate lower case */\n#define         ECHO            0x00000008      /* echo input */\n#define         CRMOD           0x00000010      /* map \\r to \\r\\n on output */\n#define         RAW             0x00000020      /* no i/o processing */\n#define         ODDP            0x00000040      /* get/send odd parity */\n#define         EVENP           0x00000080      /* get/send even parity */\n#define         ANYP            0x000000c0      /* get any parity/send none */\n#define         NLDELAY         0x00000300      /* \\n delay */\n#define         TBDELAY         0x00000c00      /* horizontal tab delay */\n#define         XTABS           0x00000c00      /* expand tabs on output */\n#define         CRDELAY         0x00003000      /* \\r delay */\n#define         VTDELAY         0x00004000      /* vertical tab delay */\n#define         BSDELAY         0x00008000      /* \\b delay */\n#ifndef _SYS_TERMIOS_H_\n/*\n * These manifest constants have the same names as those in <sys/termios.h>,\n * so you are not permitted to have both definitions in scope simultaneously\n * in the same compilation unit.\n */\n#define                 NL0     0x00000000\n#define                 NL1     0x00000100      /* tty 37 */\n#define                 NL2     0x00000200      /* vt05 */\n#define                 NL3     0x00000300\n#define                 TAB0    0x00000000\n#define                 TAB1    0x00000400      /* tty 37 */\n#define                 TAB2    0x00000800\n#define                 CR0     0x00000000\n#define                 CR1     0x00001000      /* tn 300 */\n#define                 CR2     0x00002000      /* tty 37 */\n#define                 CR3     0x00003000      /* concept 100 */\n#define                 FF0     0x00000000\n#define                 FF1     0x00004000      /* tty 37 */\n#define                 BS0     0x00000000\n#define                 BS1     0x00008000\n#endif  /* !_SYS_TERMIOS_H_ */\n#define         ALLDELAY        (NLDELAY|TBDELAY|CRDELAY|VTDELAY|BSDELAY)\n#define         CRTBS           0x00010000      /* do backspacing for crt */\n#define         PRTERA          0x00020000      /* \\ ... / erase */\n#define         CRTERA          0x00040000      /* \" \\b \" to wipe out char */\n#define         TILDE           0x00080000      /* hazeltine tilde kludge */\n#define         MDMBUF          0x00100000      /*start/stop output on carrier*/\n#define         LITOUT          0x00200000      /* literal output */\n#define         TOSTOP          0x00400000      /*SIGSTOP on background output*/\n#define         FLUSHO          0x00800000      /* flush output to terminal */\n#define         NOHANG          0x01000000      /* (no-op) was no SIGHUP on carrier drop */\n#define         L001000         0x02000000\n#define         CRTKIL          0x04000000      /* kill line with \" \\b \" */\n#define         PASS8           0x08000000\n#define         CTLECH          0x10000000      /* echo control chars as ^X */\n#define         PENDIN          0x20000000      /* tp->t_rawq needs reread */\n#define         DECCTQ          0x40000000      /* only ^Q starts after ^S */\n#define         NOFLSH          0x80000000      /* no output flush on signal */\n#define TIOCLBIS        _IOW('t', 127, int)     /* bis local mode bits */\n#define TIOCLBIC        _IOW('t', 126, int)     /* bic local mode bits */\n#define TIOCLSET        _IOW('t', 125, int)     /* set entire local mode word */\n#define TIOCLGET        _IOR('t', 124, int)     /* get local modes */\n#define         LCRTBS          (CRTBS>>16)\n#define         LPRTERA         (PRTERA>>16)\n#define         LCRTERA         (CRTERA>>16)\n#define         LTILDE          (TILDE>>16)\n#define         LMDMBUF         (MDMBUF>>16)\n#define         LLITOUT         (LITOUT>>16)\n#define         LTOSTOP         (TOSTOP>>16)\n#define         LFLUSHO         (FLUSHO>>16)\n#define         LNOHANG         (NOHANG>>16)\n#define         LCRTKIL         (CRTKIL>>16)\n#define         LPASS8          (PASS8>>16)\n#define         LCTLECH         (CTLECH>>16)\n#define         LPENDIN         (PENDIN>>16)\n#define         LDECCTQ         (DECCTQ>>16)\n#define         LNOFLSH         (NOFLSH>>16)\n#define TIOCSLTC        _IOW('t',117,struct ltchars)/* set local special chars*/\n#define TIOCGLTC        _IOR('t',116,struct ltchars)/* get local special chars*/\n#define OTIOCCONS       _IO('t', 98)    /* for hp300 -- sans int arg */\n#define OTTYDISC        0\n#define NETLDISC        1\n#define NTTYDISC        2\n\n#define TIOCGSID        _IOR('t', 99, int)      /* For svr4 -- get session id */\n\n#endif /* !_SYS_IOCTL_COMPAT_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/ipc.h",
    "content": "/*\n * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/*\n * Copyright (c) 1988 University of Utah.\n * Copyright (c) 1990, 1993\n *\tThe Regents of the University of California.  All rights reserved.\n * (c) UNIX System Laboratories, Inc.\n * All or some portions of this file are derived from material licensed\n * to the University of California by American Telephone and Telegraph\n * Co. or Unix System Laboratories, Inc. and are reproduced herein with\n * the permission of UNIX System Laboratories, Inc.\n *\n * This code is derived from software contributed to Berkeley by\n * the Systems Programming Group of the University of Utah Computer\n * Science Department.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *\tThis product includes software developed by the University of\n *\tCalifornia, Berkeley and its contributors.\n * 4. Neither the name of the University nor the names of its contributors\n *    may be used to endorse or promote products derived from this software\n *    without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n *\t@(#)ipc.h\t8.4 (Berkeley) 2/19/95\n */\n\n/*\n * SVID compatible ipc.h file\n */\n#ifndef _SYS_IPC_H_\n#define _SYS_IPC_H_\n\n#include <sys/appleapiopts.h>\n#include <sys/cdefs.h>\n\n#include <sys/_types.h>\n\n/*\n * [XSI] The uid_t, gid_t, mode_t, and key_t types SHALL be defined as\n * described in <sys/types.h>.\n */\n#include <sys/_types/_uid_t.h>\n#include <sys/_types/_gid_t.h>\n#include <sys/_types/_mode_t.h>\n#include <sys/_types/_key_t.h>\n\n\n#pragma pack(4)\n\n/*\n * Technically, we should force all code references to the new structure\n * definition, not in just the standards conformance case, and leave the\n * legacy interface there for binary compatibility only.  Currently, we\n * are only forcing this for programs requesting standards conformance.\n */\n#if __DARWIN_UNIX03 || defined(KERNEL)\n/*\n * [XSI] Information used in determining permission to perform an IPC\n * operation\n */\nstruct ipc_perm {\n\tuid_t           uid;            /* [XSI] Owner's user ID */\n\tgid_t           gid;            /* [XSI] Owner's group ID */\n\tuid_t           cuid;           /* [XSI] Creator's user ID */\n\tgid_t           cgid;           /* [XSI] Creator's group ID */\n\tmode_t          mode;           /* [XSI] Read/write permission */\n\tunsigned short  _seq;           /* Reserved for internal use */\n\tkey_t           _key;           /* Reserved for internal use */\n};\n#define __ipc_perm_new  ipc_perm\n#else   /* !__DARWIN_UNIX03 */\n#define ipc_perm        __ipc_perm_old\n#endif  /* !__DARWIN_UNIX03 */\n\n#if !__DARWIN_UNIX03\n/*\n * Legacy structure; this structure is maintained for binary backward\n * compatability with previous versions of the interface.  New code\n * should not use this interface, since ID values may be truncated.\n */\nstruct __ipc_perm_old {\n\t__uint16_t      cuid;           /* Creator's user ID */\n\t__uint16_t      cgid;           /* Creator's group ID */\n\t__uint16_t      uid;            /* Owner's user ID */\n\t__uint16_t      gid;            /* Owner's group ID */\n\tmode_t          mode;           /* Read/Write permission */\n\t__uint16_t      seq;            /* Reserved for internal use */\n\tkey_t           key;            /* Reserved for internal use */\n};\n#endif  /* !__DARWIN_UNIX03 */\n\n#pragma pack()\n\n/*\n * [XSI] Definitions shall be provided for the following constants:\n */\n\n/* Mode bits */\n#define IPC_CREAT       001000          /* Create entry if key does not exist */\n#define IPC_EXCL        002000          /* Fail if key exists */\n#define IPC_NOWAIT      004000          /* Error if request must wait */\n\n/* Keys */\n#define IPC_PRIVATE     ((key_t)0)      /* Private key */\n\n/* Control commands */\n#define IPC_RMID        0               /* Remove identifier */\n#define IPC_SET         1               /* Set options */\n#define IPC_STAT        2               /* Get options */\n\n\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n\n/* common mode bits */\n#define IPC_R           000400          /* Read permission */\n#define IPC_W           000200          /* Write/alter permission */\n#define IPC_M           010000          /* Modify control info permission */\n\n#endif  /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */\n\n\n\n\n__BEGIN_DECLS\n/* [XSI] */\nkey_t   ftok(const char *, int);\n__END_DECLS\n\n\n#endif /* !_SYS_IPC_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/kauth.h",
    "content": "/*\n * Copyright (c) 2004-2010 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/*\n * NOTICE: This file was modified by SPARTA, Inc. in 2005 to introduce\n * support for mandatory and extensible security protections.  This notice\n * is included in support of clause 2.2 (b) of the Apple Public License,\n * Version 2.0.\n */\n\n#ifndef _SYS_KAUTH_H\n#define _SYS_KAUTH_H\n\n#include <sys/appleapiopts.h>\n#include <sys/cdefs.h>\n#include <mach/boolean.h>\n#include <machine/types.h>      /* u_int8_t, etc. */\n#include <sys/_types.h>         /* __offsetof() */\n#include <sys/_types/_uid_t.h>  /* uid_t */\n#include <sys/_types/_gid_t.h>     /* gid_t */\n#include <sys/syslimits.h>      /* NGROUPS_MAX */\n\n#ifdef __APPLE_API_EVOLVING\n\n/*\n * Identities.\n */\n\n#define KAUTH_UID_NONE  (~(uid_t)0 - 100)       /* not a valid UID */\n#define KAUTH_GID_NONE  (~(gid_t)0 - 100)       /* not a valid GID */\n\n#include <sys/_types/_guid_t.h>\n\n/* NT Security Identifier, structure as defined by Microsoft */\n#pragma pack(1)    /* push packing of 1 byte */\ntypedef struct {\n\tu_int8_t                sid_kind;\n\tu_int8_t                sid_authcount;\n\tu_int8_t                sid_authority[6];\n#define KAUTH_NTSID_MAX_AUTHORITIES 16\n\tu_int32_t       sid_authorities[KAUTH_NTSID_MAX_AUTHORITIES];\n} ntsid_t;\n#pragma pack()    /* pop packing to previous packing level */\n#define _NTSID_T\n\n/* valid byte count inside a SID structure */\n#define KAUTH_NTSID_HDRSIZE     (8)\n#define KAUTH_NTSID_SIZE(_s)    (KAUTH_NTSID_HDRSIZE + ((_s)->sid_authcount * sizeof(u_int32_t)))\n\n/*\n * External lookup message payload; this structure is shared between the\n * kernel group membership resolver, and the user space group membership\n * resolver daemon, and is use to communicate resolution requests from the\n * kernel to user space, and the result of that request from user space to\n * the kernel.\n */\nstruct kauth_identity_extlookup {\n\tu_int32_t       el_seqno;       /* request sequence number */\n\tu_int32_t       el_result;      /* lookup result */\n#define KAUTH_EXTLOOKUP_SUCCESS         0       /* results here are good */\n#define KAUTH_EXTLOOKUP_BADRQ           1       /* request badly formatted */\n#define KAUTH_EXTLOOKUP_FAILURE         2       /* transient failure during lookup */\n#define KAUTH_EXTLOOKUP_FATAL           3       /* permanent failure during lookup */\n#define KAUTH_EXTLOOKUP_INPROG          100     /* request in progress */\n\tu_int32_t       el_flags;\n#define KAUTH_EXTLOOKUP_VALID_UID       (1<<0)\n#define KAUTH_EXTLOOKUP_VALID_UGUID     (1<<1)\n#define KAUTH_EXTLOOKUP_VALID_USID      (1<<2)\n#define KAUTH_EXTLOOKUP_VALID_GID       (1<<3)\n#define KAUTH_EXTLOOKUP_VALID_GGUID     (1<<4)\n#define KAUTH_EXTLOOKUP_VALID_GSID      (1<<5)\n#define KAUTH_EXTLOOKUP_WANT_UID        (1<<6)\n#define KAUTH_EXTLOOKUP_WANT_UGUID      (1<<7)\n#define KAUTH_EXTLOOKUP_WANT_USID       (1<<8)\n#define KAUTH_EXTLOOKUP_WANT_GID        (1<<9)\n#define KAUTH_EXTLOOKUP_WANT_GGUID      (1<<10)\n#define KAUTH_EXTLOOKUP_WANT_GSID       (1<<11)\n#define KAUTH_EXTLOOKUP_WANT_MEMBERSHIP (1<<12)\n#define KAUTH_EXTLOOKUP_VALID_MEMBERSHIP (1<<13)\n#define KAUTH_EXTLOOKUP_ISMEMBER        (1<<14)\n#define KAUTH_EXTLOOKUP_VALID_PWNAM     (1<<15)\n#define KAUTH_EXTLOOKUP_WANT_PWNAM      (1<<16)\n#define KAUTH_EXTLOOKUP_VALID_GRNAM     (1<<17)\n#define KAUTH_EXTLOOKUP_WANT_GRNAM      (1<<18)\n#define KAUTH_EXTLOOKUP_VALID_SUPGRPS   (1<<19)\n#define KAUTH_EXTLOOKUP_WANT_SUPGRPS    (1<<20)\n\n\t__darwin_pid_t  el_info_pid;            /* request on behalf of PID */\n\tu_int64_t       el_extend;              /* extension field */\n\tu_int32_t       el_info_reserved_1;     /* reserved (APPLE) */\n\n\tuid_t           el_uid;         /* user ID */\n\tguid_t          el_uguid;       /* user GUID */\n\tu_int32_t       el_uguid_valid; /* TTL on translation result (seconds) */\n\tntsid_t         el_usid;        /* user NT SID */\n\tu_int32_t       el_usid_valid;  /* TTL on translation result (seconds) */\n\tgid_t           el_gid;         /* group ID */\n\tguid_t          el_gguid;       /* group GUID */\n\tu_int32_t       el_gguid_valid; /* TTL on translation result (seconds) */\n\tntsid_t         el_gsid;        /* group SID */\n\tu_int32_t       el_gsid_valid;  /* TTL on translation result (seconds) */\n\tu_int32_t       el_member_valid; /* TTL on group lookup result */\n\tu_int32_t       el_sup_grp_cnt;  /* count of supplemental groups up to NGROUPS */\n\tgid_t           el_sup_groups[NGROUPS_MAX];     /* supplemental group list */\n};\n\nstruct kauth_cache_sizes {\n\tu_int32_t kcs_group_size;\n\tu_int32_t kcs_id_size;\n};\n\n#define KAUTH_EXTLOOKUP_REGISTER        (0)\n#define KAUTH_EXTLOOKUP_RESULT          (1<<0)\n#define KAUTH_EXTLOOKUP_WORKER          (1<<1)\n#define KAUTH_EXTLOOKUP_DEREGISTER      (1<<2)\n#define KAUTH_GET_CACHE_SIZES           (1<<3)\n#define KAUTH_SET_CACHE_SIZES           (1<<4)\n#define KAUTH_CLEAR_CACHES              (1<<5)\n\n#define IDENTITYSVC_ENTITLEMENT         \"com.apple.private.identitysvc\"\n\n\n\n/*\n * Generic Access Control Lists.\n */\n#if defined(KERNEL) || defined (_SYS_ACL_H)\n\ntypedef u_int32_t kauth_ace_rights_t;\n\n/* Access Control List Entry (ACE) */\nstruct kauth_ace {\n\tguid_t          ace_applicable;\n\tu_int32_t       ace_flags;\n#define KAUTH_ACE_KINDMASK              0xf\n#define KAUTH_ACE_PERMIT                1\n#define KAUTH_ACE_DENY                  2\n#define KAUTH_ACE_AUDIT                 3       /* not implemented */\n#define KAUTH_ACE_ALARM                 4       /* not implemented */\n#define KAUTH_ACE_INHERITED             (1<<4)\n#define KAUTH_ACE_FILE_INHERIT          (1<<5)\n#define KAUTH_ACE_DIRECTORY_INHERIT     (1<<6)\n#define KAUTH_ACE_LIMIT_INHERIT         (1<<7)\n#define KAUTH_ACE_ONLY_INHERIT          (1<<8)\n#define KAUTH_ACE_SUCCESS               (1<<9)  /* not implemented (AUDIT/ALARM) */\n#define KAUTH_ACE_FAILURE               (1<<10) /* not implemented (AUDIT/ALARM) */\n/* All flag bits controlling ACE inheritance */\n#define KAUTH_ACE_INHERIT_CONTROL_FLAGS         \\\n\t        (KAUTH_ACE_FILE_INHERIT |       \\\n\t         KAUTH_ACE_DIRECTORY_INHERIT |  \\\n\t         KAUTH_ACE_LIMIT_INHERIT |      \\\n\t         KAUTH_ACE_ONLY_INHERIT)\n\tkauth_ace_rights_t ace_rights;          /* scope specific */\n\t/* These rights are never tested, but may be present in an ACL */\n#define KAUTH_ACE_GENERIC_ALL           (1<<21)\n#define KAUTH_ACE_GENERIC_EXECUTE       (1<<22)\n#define KAUTH_ACE_GENERIC_WRITE         (1<<23)\n#define KAUTH_ACE_GENERIC_READ          (1<<24)\n};\n\n#ifndef _KAUTH_ACE\n#define _KAUTH_ACE\ntypedef struct kauth_ace *kauth_ace_t;\n#endif\n\n\n/* Access Control List */\nstruct kauth_acl {\n\tu_int32_t       acl_entrycount;\n\tu_int32_t       acl_flags;\n\n\tstruct kauth_ace acl_ace[1];\n};\n\n/*\n * XXX this value needs to be raised - 3893388\n */\n#define KAUTH_ACL_MAX_ENTRIES           128\n\n/*\n * The low 16 bits of the flags field are reserved for filesystem\n * internal use and must be preserved by all APIs.  This includes\n * round-tripping flags through user-space interfaces.\n */\n#define KAUTH_ACL_FLAGS_PRIVATE (0xffff)\n\n/*\n * The high 16 bits of the flags are used to store attributes and\n * to request specific handling of the ACL.\n */\n\n/* inheritance will be deferred until the first rename operation */\n#define KAUTH_ACL_DEFER_INHERIT (1<<16)\n/* this ACL must not be overwritten as part of an inheritance operation */\n#define KAUTH_ACL_NO_INHERIT    (1<<17)\n\n/* acl_entrycount that tells us the ACL is not valid */\n#define KAUTH_FILESEC_NOACL ((u_int32_t)(-1))\n\n/*\n * If the acl_entrycount field is KAUTH_FILESEC_NOACL, then the size is the\n * same as a kauth_acl structure; the intent is to put an actual entrycount of\n * KAUTH_FILESEC_NOACL on disk to distinguish a kauth_filesec_t with an empty\n * entry (Windows treats this as \"deny all\") from one that merely indicates a\n * file group and/or owner guid values.\n */\n#define KAUTH_ACL_SIZE(c)       (__offsetof(struct kauth_acl, acl_ace) + ((u_int32_t)(c) != KAUTH_FILESEC_NOACL ? ((c) * sizeof(struct kauth_ace)) : 0))\n#define KAUTH_ACL_COPYSIZE(p)   KAUTH_ACL_SIZE((p)->acl_entrycount)\n\n\n#ifndef _KAUTH_ACL\n#define _KAUTH_ACL\ntypedef struct kauth_acl *kauth_acl_t;\n#endif\n\n\n\n/*\n * Extended File Security.\n */\n\n/* File Security information */\nstruct kauth_filesec {\n\tu_int32_t       fsec_magic;\n#define KAUTH_FILESEC_MAGIC     0x012cc16d\n\tguid_t          fsec_owner;\n\tguid_t          fsec_group;\n\n\tstruct kauth_acl fsec_acl;\n};\n\n/* backwards compatibility */\n#define fsec_entrycount fsec_acl.acl_entrycount\n#define fsec_flags      fsec_acl.acl_flags\n#define fsec_ace        fsec_acl.acl_ace\n#define KAUTH_FILESEC_FLAGS_PRIVATE     KAUTH_ACL_FLAGS_PRIVATE\n#define KAUTH_FILESEC_DEFER_INHERIT     KAUTH_ACL_DEFER_INHERIT\n#define KAUTH_FILESEC_NO_INHERIT        KAUTH_ACL_NO_INHERIT\n#define KAUTH_FILESEC_NONE      ((kauth_filesec_t)0)\n#define KAUTH_FILESEC_WANTED    ((kauth_filesec_t)1)\n\n#ifndef _KAUTH_FILESEC\n#define _KAUTH_FILESEC\ntypedef struct kauth_filesec *kauth_filesec_t;\n#endif\n\n#define KAUTH_FILESEC_SIZE(c)           (__offsetof(struct kauth_filesec, fsec_acl) + __offsetof(struct kauth_acl, acl_ace) + (c) * sizeof(struct kauth_ace))\n#define KAUTH_FILESEC_COPYSIZE(p)       KAUTH_FILESEC_SIZE(((p)->fsec_entrycount == KAUTH_FILESEC_NOACL) ? 0 : (p)->fsec_entrycount)\n#define KAUTH_FILESEC_COUNT(s)          (((s)  - KAUTH_FILESEC_SIZE(0)) / sizeof(struct kauth_ace))\n#define KAUTH_FILESEC_VALID(s)          ((s) >= KAUTH_FILESEC_SIZE(0) && (((s) - KAUTH_FILESEC_SIZE(0)) % sizeof(struct kauth_ace)) == 0)\n\n#define KAUTH_FILESEC_XATTR     \"com.apple.system.Security\"\n\n/* Allowable first arguments to kauth_filesec_acl_setendian() */\n#define KAUTH_ENDIAN_HOST       0x00000001      /* set host endianness */\n#define KAUTH_ENDIAN_DISK       0x00000002      /* set disk endianness */\n\n#endif /* KERNEL || <sys/acl.h> */\n\n\n\n/* Actions, also rights bits in an ACE */\n\n#if defined(KERNEL) || defined (_SYS_ACL_H)\n#define KAUTH_VNODE_READ_DATA                   (1U<<1)\n#define KAUTH_VNODE_LIST_DIRECTORY              KAUTH_VNODE_READ_DATA\n#define KAUTH_VNODE_WRITE_DATA                  (1U<<2)\n#define KAUTH_VNODE_ADD_FILE                    KAUTH_VNODE_WRITE_DATA\n#define KAUTH_VNODE_EXECUTE                     (1U<<3)\n#define KAUTH_VNODE_SEARCH                      KAUTH_VNODE_EXECUTE\n#define KAUTH_VNODE_DELETE                      (1U<<4)\n#define KAUTH_VNODE_APPEND_DATA                 (1U<<5)\n#define KAUTH_VNODE_ADD_SUBDIRECTORY            KAUTH_VNODE_APPEND_DATA\n#define KAUTH_VNODE_DELETE_CHILD                (1U<<6)\n#define KAUTH_VNODE_READ_ATTRIBUTES             (1U<<7)\n#define KAUTH_VNODE_WRITE_ATTRIBUTES            (1U<<8)\n#define KAUTH_VNODE_READ_EXTATTRIBUTES          (1U<<9)\n#define KAUTH_VNODE_WRITE_EXTATTRIBUTES         (1U<<10)\n#define KAUTH_VNODE_READ_SECURITY               (1U<<11)\n#define KAUTH_VNODE_WRITE_SECURITY              (1U<<12)\n#define KAUTH_VNODE_TAKE_OWNERSHIP              (1U<<13)\n\n/* backwards compatibility only */\n#define KAUTH_VNODE_CHANGE_OWNER                KAUTH_VNODE_TAKE_OWNERSHIP\n\n/* For Windows interoperability only */\n#define KAUTH_VNODE_SYNCHRONIZE                 (1U<<20)\n\n/* (1<<21) - (1<<24) are reserved for generic rights bits */\n\n/* Actions not expressed as rights bits */\n/*\n * Authorizes the vnode as the target of a hard link.\n */\n#define KAUTH_VNODE_LINKTARGET                  (1U<<25)\n\n/*\n * Indicates that other steps have been taken to authorise the action,\n * but authorisation should be denied for immutable objects.\n */\n#define KAUTH_VNODE_CHECKIMMUTABLE              (1U<<26)\n\n/* Action modifiers */\n/*\n * The KAUTH_VNODE_ACCESS bit is passed to the callback if the authorisation\n * request in progress is advisory, rather than authoritative.  Listeners\n * performing consequential work (i.e. not strictly checking authorisation)\n * may test this flag to avoid performing unnecessary work.\n *\n * This bit will never be present in an ACE.\n */\n#define KAUTH_VNODE_ACCESS                      (1U<<31)\n\n/*\n * The KAUTH_VNODE_NOIMMUTABLE bit is passed to the callback along with the\n * KAUTH_VNODE_WRITE_SECURITY bit (and no others) to indicate that the\n * caller wishes to change one or more of the immutable flags, and the\n * state of these flags should not be considered when authorizing the request.\n * The system immutable flags are only ignored when the system securelevel\n * is low enough to allow their removal.\n */\n#define KAUTH_VNODE_NOIMMUTABLE                 (1U<<30)\n\n\n/*\n * fake right that is composed by the following...\n * vnode must have search for owner, group and world allowed\n * plus there must be no deny modes present for SEARCH... this fake\n * right is used by the fast lookup path to avoid checking\n * for an exact match on the last credential to lookup\n * the component being acted on\n */\n#define KAUTH_VNODE_SEARCHBYANYONE              (1U<<29)\n\n\n/*\n * when passed as an 'action' to \"vnode_uncache_authorized_actions\"\n * it indicates that all of the cached authorizations for that\n * vnode should be invalidated\n */\n#define KAUTH_INVALIDATE_CACHED_RIGHTS          ((kauth_action_t)~0)\n\n\n\n/* The expansions of the GENERIC bits at evaluation time */\n#define KAUTH_VNODE_GENERIC_READ_BITS   (KAUTH_VNODE_READ_DATA |                \\\n\t                                KAUTH_VNODE_READ_ATTRIBUTES |           \\\n\t                                KAUTH_VNODE_READ_EXTATTRIBUTES |        \\\n\t                                KAUTH_VNODE_READ_SECURITY)\n\n#define KAUTH_VNODE_GENERIC_WRITE_BITS  (KAUTH_VNODE_WRITE_DATA |               \\\n\t                                KAUTH_VNODE_APPEND_DATA |               \\\n\t                                KAUTH_VNODE_DELETE |                    \\\n\t                                KAUTH_VNODE_DELETE_CHILD |              \\\n\t                                KAUTH_VNODE_WRITE_ATTRIBUTES |          \\\n\t                                KAUTH_VNODE_WRITE_EXTATTRIBUTES |       \\\n\t                                KAUTH_VNODE_WRITE_SECURITY)\n\n#define KAUTH_VNODE_GENERIC_EXECUTE_BITS (KAUTH_VNODE_EXECUTE)\n\n#define KAUTH_VNODE_GENERIC_ALL_BITS    (KAUTH_VNODE_GENERIC_READ_BITS |        \\\n\t                                KAUTH_VNODE_GENERIC_WRITE_BITS |        \\\n\t                                KAUTH_VNODE_GENERIC_EXECUTE_BITS)\n\n/*\n * Some sets of bits, defined here for convenience.\n */\n#define KAUTH_VNODE_WRITE_RIGHTS        (KAUTH_VNODE_ADD_FILE |                         \\\n\t                                KAUTH_VNODE_ADD_SUBDIRECTORY |                  \\\n\t                                KAUTH_VNODE_DELETE_CHILD |                      \\\n\t                                KAUTH_VNODE_WRITE_DATA |                        \\\n\t                                KAUTH_VNODE_APPEND_DATA |                       \\\n\t                                KAUTH_VNODE_DELETE |                            \\\n\t                                KAUTH_VNODE_WRITE_ATTRIBUTES |                  \\\n\t                                KAUTH_VNODE_WRITE_EXTATTRIBUTES |               \\\n\t                                KAUTH_VNODE_WRITE_SECURITY |                    \\\n\t                                KAUTH_VNODE_TAKE_OWNERSHIP |                    \\\n\t                                KAUTH_VNODE_LINKTARGET |                        \\\n\t                                KAUTH_VNODE_CHECKIMMUTABLE)\n\n\n#endif /* KERNEL || <sys/acl.h> */\n\n\n#endif /* __APPLE_API_EVOLVING */\n#endif /* _SYS_KAUTH_H */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/kdebug.h",
    "content": "/*\n * Copyright (c) 2000-2019 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n\n#ifndef BSD_SYS_KDEBUG_H\n#define BSD_SYS_KDEBUG_H\n\n#include <sys/appleapiopts.h>\n#include <sys/cdefs.h>\n\n__BEGIN_DECLS\n\n#ifdef __APPLE_API_UNSTABLE\n\n/*\n * Kdebug is a kernel facility for tracing events occurring on a system.  User\n * space processes should prefer os_signpost, instead.\n *\n * This header defines reserved debugids, which are 32-bit values that describe\n * each event:\n *\n * +----------------+----------------+----------------------------+----+\n * |   Class (8)    |  Subclass (8)  |          Code (14)         |Func|\n * |                |                |                            |(2) |\n * +----------------+----------------+----------------------------+----+\n * \\_________________________________/\n *         ClassSubclass (CSC)\n * \\________________________________________________________________00_/\n *                                 Eventid\n * \\___________________________________________________________________/\n *                                 Debugid\n *\n * The eventid is a hierarchical ID, indicating which components an event is\n * referring to.  The debugid includes an eventid and two function qualifier\n * bits, to determine the structural significance of an event (whether it\n * starts or ends an interval).\n */\n\n#define KDBG_CLASS_MASK   (0xff000000)\n#define KDBG_CLASS_OFFSET (24)\n#define KDBG_CLASS_MAX    (0xff)\n\n#define KDBG_SUBCLASS_MASK   (0x00ff0000)\n#define KDBG_SUBCLASS_OFFSET (16)\n#define KDBG_SUBCLASS_MAX    (0xff)\n\n/* class and subclass mask */\n#define KDBG_CSC_MASK   (0xffff0000)\n#define KDBG_CSC_OFFSET (KDBG_SUBCLASS_OFFSET)\n#define KDBG_CSC_MAX    (0xffff)\n\n#define KDBG_CODE_MASK   (0x0000fffc)\n#define KDBG_CODE_OFFSET (2)\n#define KDBG_CODE_MAX    (0x3fff)\n\n#define KDBG_EVENTID_MASK (0xfffffffc)\n#define KDBG_FUNC_MASK    (0x00000003)\n\n/* Generate an eventid corresponding to Class, SubClass, and Code. */\n#define KDBG_EVENTID(Class, SubClass, Code)                \\\n\t(((unsigned)((Class)    &   0xff) << KDBG_CLASS_OFFSET)    | \\\n\t ((unsigned)((SubClass) &   0xff) << KDBG_SUBCLASS_OFFSET) | \\\n\t ((unsigned)((Code)     & 0x3fff) << KDBG_CODE_OFFSET))\n/* Deprecated macro using old naming convention. */\n#define KDBG_CODE(Class, SubClass, Code) \\\n\tKDBG_EVENTID(Class, SubClass, Code)\n\n/* Extract pieces of the debug code. */\n#define KDBG_EXTRACT_CLASS(Debugid) \\\n\t((uint8_t)(((Debugid) & KDBG_CLASS_MASK) >> KDBG_CLASS_OFFSET))\n#define KDBG_EXTRACT_SUBCLASS(Debugid) \\\n\t((uint8_t)(((Debugid) & KDBG_SUBCLASS_MASK) >> KDBG_SUBCLASS_OFFSET))\n#define KDBG_EXTRACT_CSC(Debugid) \\\n\t((uint16_t)(((Debugid) & KDBG_CSC_MASK) >> KDBG_CSC_OFFSET))\n#define KDBG_EXTRACT_CODE(Debugid) \\\n\t((uint16_t)(((Debugid) & KDBG_CODE_MASK) >> KDBG_CODE_OFFSET))\n#define KDBG_CLASS_ENCODE(Class, SubClass) KDBG_EVENTID(Class, SubClass, 0)\n#define KDBG_CLASS_DECODE(Debugid) (Debugid & KDBG_CSC_MASK)\n\n/* function qualifiers  */\n#define DBG_FUNC_START 1U\n#define DBG_FUNC_END   2U\n#define DBG_FUNC_NONE  0U\n\n/* The Kernel Debug Classes  */\n\n#define DBG_MACH        1\n#define DBG_NETWORK     2\n#define DBG_FSYSTEM     3\n#define DBG_BSD         4\n#define DBG_IOKIT       5\n#define DBG_DRIVERS     6\n#define DBG_TRACE       7\n#define DBG_DLIL        8\n#define DBG_PTHREAD     9\n#define DBG_CORESTORAGE 10\n#define DBG_CG          11\n#define DBG_MONOTONIC   12\n#define DBG_MISC        20\n#define DBG_SECURITY    30\n#define DBG_DYLD        31\n#define DBG_QT          32\n#define DBG_APPS        33\n#define DBG_LAUNCHD     34\n#define DBG_SILICON     35\n#define DBG_PERF        37\n#define DBG_IMPORTANCE  38\n#define DBG_BANK        40\n#define DBG_XPC         41\n#define DBG_ATM         42\n#define DBG_ARIADNE     43\n#define DBG_DAEMON      44\n#define DBG_ENERGYTRACE 45\n#define DBG_DISPATCH    46\n#define DBG_IMG         49\n#define DBG_UMALLOC     51\n#define DBG_TURNSTILE   53\n#define DBG_AUDIO       54\n\n#define DBG_MIG         255\n\n/* **** The Kernel Debug Sub Classes for Mach (DBG_MACH) **** */\n#define DBG_MACH_EXCP_KTRAP_x86 0x02 /* Kernel Traps on x86 */\n#define DBG_MACH_EXCP_DFLT      0x03 /* deprecated name */\n#define DBG_MACH_EXCP_SYNC_ARM  0x03 /* arm/arm64 synchronous exception */\n#define DBG_MACH_EXCP_IFLT      0x04 /* deprecated name */\n#define DBG_MACH_EXCP_SERR_ARM  0x04 /* arm/arm64 SError (async) exception */\n#define DBG_MACH_EXCP_INTR      0x05 /* Interrupts */\n#define DBG_MACH_EXCP_ALNG      0x06 /* Alignment Exception */\n#define DBG_MACH_EXCP_UTRAP_x86 0x07 /* User Traps on x86 */\n#define DBG_MACH_EXCP_FP        0x08 /* FP Unavail */\n#define DBG_MACH_EXCP_DECI      0x09 /* Decrementer Interrupt */\n#define DBG_MACH_CHUD           0x0A /* deprecated name */\n#define DBG_MACH_SIGNPOST       0x0A /* kernel signposts */\n#define DBG_MACH_EXCP_SC        0x0C /* System Calls */\n#define DBG_MACH_EXCP_TRACE     0x0D /* Trace exception */\n#define DBG_MACH_EXCP_EMUL      0x0E /* Instruction emulated */\n#define DBG_MACH_IHDLR          0x10 /* Interrupt Handlers */\n#define DBG_MACH_IPC            0x20 /* Inter Process Comm */\n#define DBG_MACH_RESOURCE       0x25 /* tracing limits, etc */\n#define DBG_MACH_VM             0x30 /* Virtual Memory */\n#define DBG_MACH_LEAKS          0x31 /* alloc/free */\n#define DBG_MACH_WORKINGSET     0x32 /* private subclass for working set related debugging */\n#define DBG_MACH_SCHED          0x40 /* Scheduler */\n#define DBG_MACH_MSGID_INVALID  0x50 /* Messages - invalid */\n#define DBG_MACH_LOCKS          0x60 /* new lock APIs */\n#define DBG_MACH_PMAP           0x70 /* pmap */\n#define DBG_MACH_CLOCK          0x80 /* clock */\n#define DBG_MACH_MP             0x90 /* MP related */\n#define DBG_MACH_VM_PRESSURE    0xA0 /* Memory Pressure Events */\n#define DBG_MACH_STACKSHOT      0xA1 /* Stackshot/Microstackshot subsystem */\n#define DBG_MACH_SFI            0xA2 /* Selective Forced Idle (SFI) */\n#define DBG_MACH_ENERGY_PERF    0xA3 /* Energy/performance resource stats */\n#define DBG_MACH_SYSDIAGNOSE    0xA4 /* sysdiagnose */\n#define DBG_MACH_ZALLOC         0xA5 /* Zone allocator */\n#define DBG_MACH_THREAD_GROUP   0xA6 /* Thread groups */\n#define DBG_MACH_COALITION      0xA7 /* Coalitions */\n#define DBG_MACH_SHAREDREGION   0xA8 /* Shared region */\n#define DBG_MACH_SCHED_CLUTCH   0xA9 /* Clutch scheduler */\n#define DBG_MACH_IO             0xAA /* I/O */\n#define DBG_MACH_WORKGROUP      0xAB /* Workgroup subsystem */\n#define DBG_MACH_HV             0xAC /* Hypervisor subsystem */\n#define DBG_MACH_KCOV           0xAD /* Kernel coverage sanitizer */\n#define DBG_MACH_MACHDEP_EXCP_SC_x86 0xAE /* Machine Dependent System Calls on x86 */\n#define DBG_MACH_MACHDEP_EXCP_SC_ARM 0xAF /* Machine Dependent System Calls on arm */\n\n/* Codes for DBG_MACH_IO */\n#define DBC_MACH_IO_MMIO_READ           0x1\n#define DBC_MACH_IO_MMIO_WRITE          0x2\n#define DBC_MACH_IO_PHYS_READ           0x3\n#define DBC_MACH_IO_PHYS_WRITE          0x4\n#define DBC_MACH_IO_PORTIO_READ         0x5\n#define DBC_MACH_IO_PORTIO_WRITE        0x6\n\n/* Interrupt type bits for DBG_MACH_EXCP_INTR */\n#define DBG_INTR_TYPE_UNKNOWN   0x0     /* default/unknown interrupt */\n#define DBG_INTR_TYPE_IPI       0x1     /* interprocessor interrupt */\n#define DBG_INTR_TYPE_TIMER     0x2     /* timer interrupt */\n#define DBG_INTR_TYPE_OTHER     0x3     /* other (usually external) interrupt */\n#define DBG_INTR_TYPE_PMI       0x4     /* performance monitor interrupt */\n\n/* Codes for Scheduler (DBG_MACH_SCHED) */\n#define MACH_SCHED              0x0     /* Scheduler */\n#define MACH_STACK_ATTACH       0x1     /* stack_attach() */\n#define MACH_STACK_HANDOFF      0x2     /* stack_handoff() */\n#define MACH_CALL_CONT          0x3     /* call_continuation() */\n#define MACH_CALLOUT            0x4     /* callouts */\n#define MACH_STACK_DETACH       0x5\n#define MACH_MAKE_RUNNABLE      0x6     /* make thread runnable */\n#define MACH_PROMOTE            0x7     /* promoted due to resource (replaced by MACH_PROMOTED) */\n#define MACH_DEMOTE             0x8     /* promotion undone (replaced by MACH_UNPROMOTED) */\n#define MACH_IDLE               0x9     /* processor idling */\n#define MACH_STACK_DEPTH        0xa     /* stack depth at switch */\n#define MACH_MOVED              0xb     /* did not use original scheduling decision */\n#define MACH_PSET_LOAD_AVERAGE  0xc\n#define MACH_AMP_DEBUG          0xd\n#define MACH_FAILSAFE           0xe     /* tripped fixed-pri/RT failsafe */\n#define MACH_BLOCK              0xf     /* thread block */\n#define MACH_WAIT               0x10    /* thread wait assertion */\n#define MACH_GET_URGENCY        0x14    /* Urgency queried by platform */\n#define MACH_URGENCY            0x15    /* Urgency (RT/BG/NORMAL) communicated\n\t                                 * to platform\n\t                                 */\n#define MACH_REDISPATCH         0x16    /* \"next thread\" thread redispatched */\n#define MACH_REMOTE_AST         0x17    /* AST signal issued to remote processor */\n#define MACH_SCHED_CHOOSE_PROCESSOR     0x18    /* Result of choose_processor */\n#define MACH_DEEP_IDLE          0x19    /* deep idle on master processor */\n/* unused                       0x1a    was MACH_SCHED_DECAY_PRIORITY */\n#define MACH_CPU_THROTTLE_DISABLE       0x1b    /* Global CPU Throttle Disable */\n#define MACH_RW_PROMOTE            0x1c /* promoted due to RW lock promotion */\n#define MACH_RW_DEMOTE             0x1d /* promotion due to RW lock undone */\n#define MACH_SCHED_MAINTENANCE     0x1f /* periodic maintenance thread */\n#define MACH_DISPATCH              0x20 /* context switch completed */\n#define MACH_QUANTUM_HANDOFF       0x21 /* quantum handoff occurred */\n#define MACH_MULTIQ_DEQUEUE        0x22 /* Result of multiq dequeue */\n#define MACH_SCHED_THREAD_SWITCH   0x23 /* attempt direct context switch to hinted thread */\n#define MACH_SCHED_SMT_BALANCE     0x24 /* SMT load balancing ASTs */\n#define MACH_REMOTE_DEFERRED_AST   0x25 /* Deferred AST started against remote processor */\n#define MACH_REMOTE_CANCEL_AST     0x26 /* Canceled deferred AST for remote processor */\n#define MACH_SCHED_CHANGE_PRIORITY 0x27 /* thread sched priority changed */\n#define MACH_SCHED_UPDATE_REC_CORES     0x28    /* Change to recommended processor bitmask */\n#define MACH_STACK_WAIT            0x29 /* Thread could not be switched-to because of kernel stack shortage */\n#define MACH_THREAD_BIND           0x2a /* Thread was bound (or unbound) to a processor */\n#define MACH_WAITQ_PROMOTE         0x2b /* Thread promoted by waitq boost */\n#define MACH_WAITQ_DEMOTE          0x2c /* Thread demoted from waitq boost */\n#define MACH_SCHED_LOAD            0x2d /* load update */\n#define MACH_REC_CORES_FAILSAFE    0x2e /* recommended processor failsafe kicked in */\n#define MACH_SCHED_QUANTUM_EXPIRED 0x2f /* thread quantum expired */\n#define MACH_EXEC_PROMOTE          0x30 /* Thread promoted by exec boost */\n#define MACH_EXEC_DEMOTE           0x31 /* Thread demoted from exec boost */\n#define MACH_AMP_SIGNAL_SPILL      0x32 /* AMP spill signal sent to cpuid */\n#define MACH_AMP_STEAL             0x33 /* AMP thread stolen or spilled */\n#define MACH_SCHED_LOAD_EFFECTIVE  0x34 /* Effective scheduler load */\n/* unused  MACH_PROMOTED              0x35 was: thread promoted due to mutex priority promotion */\n/* unused  MACH_UNPROMOTED            0x36 was: thread unpromoted due to mutex priority promotion */\n/* unused  MACH_PROMOTED_UPDATE       0x37 was: thread already promoted, but promotion priority changed */\n#define MACH_QUIESCENT_COUNTER     0x38 /* quiescent counter tick */\n#define MACH_TURNSTILE_USER_CHANGE 0x39 /* base priority change because of turnstile */\n#define MACH_AMP_RECOMMENDATION_CHANGE 0x3a /* Thread group recommendation change */\n#define MACH_AMP_PERFCTL_POLICY_CHANGE 0x3b /* AMP policy for perfctl cluster recommendation */\n#define MACH_TURNSTILE_KERNEL_CHANGE 0x40 /* sched priority change because of turnstile */\n#define MACH_SCHED_WI_AUTO_JOIN      0x41 /* work interval auto join events */\n#define MACH_SCHED_WI_DEFERRED_FINISH 0x42 /* work interval pending finish events for auto-join thread groups */\n#define MACH_SET_RT_DEADLINE       0x43 /* set thread->realtime.deadline */\n#define MACH_CANCEL_RT_DEADLINE    0x44 /* cancel thread->realtime.deadline */\n#define MACH_RT_SIGNAL_SPILL       0x45 /* RT spill signal sent to cpuid */\n#define MACH_RT_STEAL              0x46 /* RT thread stolen or spilled */\n#define MACH_PENDING_AST_URGENT    0x47 /* CPU pending_AST_URGENT set/cleared */\n#define MACH_SCHED_THREAD_SELECT   0x48 /* Result of thread_select */\n#define MACH_SCHED_NEXT_PROCESSOR  0x49 /* Result of choose_next_rt_processor_for_IPI */\n#define MACH_PSET_AVG_EXEC_TIME    0x50\n#define MACH_SUSPEND_USERSPACE     0x51    /* userspace threads are suspended */\n#define MACH_PREEMPTION_EXPIRED    0x52 /* preemption disable threshold crossed */\n#define MACH_FLOOR_PROMOTE         0x53 /* promoted upon request */\n#define MACH_FLOOR_DEMOTE          0x54 /* unpromoted upon request */\n#define MACH_INT_MASKED_EXPIRED    0x55    /* interrupt masked threshold crossed */\n#define MACH_INT_HANDLED_EXPIRED   0x56    /* interrupt handling threshold crossed */\n\n/* Codes for Clutch/Edge Scheduler (DBG_MACH_SCHED_CLUTCH) */\n#define MACH_SCHED_CLUTCH_ROOT_BUCKET_STATE     0x0 /* __unused */\n#define MACH_SCHED_CLUTCH_TG_BUCKET_STATE       0x1 /* __unused */\n#define MACH_SCHED_CLUTCH_THREAD_SELECT         0x2 /* Thread selection events for Clutch scheduler */\n#define MACH_SCHED_CLUTCH_THREAD_STATE          0x3 /* __unused */\n#define MACH_SCHED_CLUTCH_TG_BUCKET_PRI         0x4 /* Clutch bucket priority update event */\n/* Edge Scheduler Tracepoints */\n#define MACH_SCHED_EDGE_CLUSTER_OVERLOAD        0x5 /* Cluster experienced overload; migrating threads to other clusters */\n#define MACH_SCHED_EDGE_STEAL                   0x6 /* Per-cluster avg. thread execution time */\n#define MACH_SCHED_EDGE_REBAL_RUNNABLE          0x7 /* Rebalance runnable threads on a foreign cluster */\n#define MACH_SCHED_EDGE_REBAL_RUNNING           0x8 /* Rebalance running threads on a foreign cluster */\n#define MACH_SCHED_EDGE_SHOULD_YIELD            0x9 /* Edge decisions for thread yield */\n#define MACH_SCHED_CLUTCH_THR_COUNT             0xa /* Clutch scheduler runnable thread counts */\n#define MACH_SCHED_EDGE_LOAD_AVG                0xb /* Per-cluster load average */\n#define MACH_SCHED_EDGE_CLUSTER_SHARED_LOAD     0xc /* Per-cluster shared resource load */\n#define MACH_SCHED_EDGE_RSRC_HEAVY_THREAD       0xd /* Resource heavy thread state */\n#define MACH_SCHED_EDGE_SHARED_RSRC_MIGRATE     0xe /* Migrating a shared resource thread due to cluster load imbalance */\n\n/* Codes for workgroup interval subsystem (DBG_MACH_WORKGROUP) */\n#define WORKGROUP_INTERVAL_CREATE               0x0 /* work interval creation */\n#define WORKGROUP_INTERVAL_DESTROY              0x1 /* work interval destruction */\n#define WORKGROUP_INTERVAL_CHANGE               0x2 /* thread work interval change */\n#define WORKGROUP_INTERVAL_START                0x3 /* work interval start call */\n#define WORKGROUP_INTERVAL_UPDATE               0x4 /* work interval update call */\n#define WORKGROUP_INTERVAL_FINISH               0x5 /* work interval finish call */\n\n/* Codes for coverage sanitizer */\n#define KCOV_STKSZ_THRESHOLD_ABOVE           0x0 /* thread stack is above threshold */\n#define KCOV_STKSZ_THRESHOLD_BELOW           0x1 /* thread stack is below threshold */\n#define KCOV_STKSZ_DELTA                     0X2 /* thread stack change is larger than delta. */\n\n/* Variants for MACH_MULTIQ_DEQUEUE */\n#define MACH_MULTIQ_BOUND     1\n#define MACH_MULTIQ_GROUP     2\n#define MACH_MULTIQ_GLOBAL    3\n\n/* Arguments for vm_fault (DBG_MACH_VM) */\n#define DBG_ZERO_FILL_FAULT           1\n#define DBG_PAGEIN_FAULT              2\n#define DBG_COW_FAULT                 3\n#define DBG_CACHE_HIT_FAULT           4\n#define DBG_NZF_PAGE_FAULT            5\n#define DBG_GUARD_FAULT               6\n#define DBG_PAGEINV_FAULT             7\n#define DBG_PAGEIND_FAULT             8\n#define DBG_COMPRESSOR_FAULT          9\n#define DBG_COMPRESSOR_SWAPIN_FAULT  10\n#define DBG_COR_FAULT                11\n\n/* Codes for IPC (DBG_MACH_IPC) */\n#define MACH_TASK_SUSPEND                       0x0     /* Suspended a task */\n#define MACH_TASK_RESUME                        0x1     /* Resumed a task */\n#define MACH_THREAD_SET_VOUCHER                 0x2\n#define MACH_IPC_MSG_SEND                       0x3     /* mach msg send, uniq msg info */\n#define MACH_IPC_MSG_RECV                       0x4     /* mach_msg receive */\n#define MACH_IPC_MSG_RECV_VOUCHER_REFUSED       0x5     /* mach_msg receive, voucher refused */\n#define MACH_IPC_KMSG_FREE                      0x6     /* kernel free of kmsg data */\n#define MACH_IPC_VOUCHER_CREATE                 0x7     /* Voucher added to global voucher hashtable */\n#define MACH_IPC_VOUCHER_CREATE_ATTR_DATA       0x8     /* Attr data for newly created voucher */\n#define MACH_IPC_VOUCHER_DESTROY                0x9     /* Voucher removed from global voucher hashtable */\n#define MACH_IPC_KMSG_INFO                      0xa     /* Send/Receive info for a kmsg */\n#define MACH_IPC_KMSG_LINK                      0xb     /* link a kernel kmsg pointer to user mach_msg_header_t */\n#define MACH_IPC_PORT_ENTRY_MODIFY              0xc     /* A port space gained or lost a port right (reference) */\n#define MACH_IPC_DESTROY_GUARDED_DESC           0xd     /* Unable to receive a guarded descriptor */\n\n/* Codes for thread groups (DBG_MACH_THREAD_GROUP) */\n#define MACH_THREAD_GROUP_NEW           0x0\n#define MACH_THREAD_GROUP_FREE          0x1\n#define MACH_THREAD_GROUP_SET           0x2\n#define MACH_THREAD_GROUP_NAME          0x3\n#define MACH_THREAD_GROUP_NAME_FREE     0x4\n#define MACH_THREAD_GROUP_FLAGS         0x5\n#define MACH_THREAD_GROUP_BLOCK         0x6\n#define MACH_THREAD_GROUP_PREADOPT      0x7\n#define MACH_THREAD_GROUP_PREADOPT_NEXTTIME  0x8\n#define MACH_THREAD_GROUP_PREADOPT_CLEAR 0x9\n#define MACH_THREAD_GROUP_PREADOPT_NA 0xa\n\n/* Codes for coalitions (DBG_MACH_COALITION) */\n#define MACH_COALITION_NEW                      0x0\n#define MACH_COALITION_FREE                     0x1\n#define MACH_COALITION_ADOPT                    0x2\n#define MACH_COALITION_REMOVE                   0x3\n#define MACH_COALITION_THREAD_GROUP_SET         0x4\n\n/* Codes for pmap (DBG_MACH_PMAP) */\n#define PMAP__CREATE            0x0\n#define PMAP__DESTROY           0x1\n#define PMAP__PROTECT           0x2\n#define PMAP__PAGE_PROTECT      0x3\n#define PMAP__ENTER             0x4\n#define PMAP__REMOVE            0x5\n#define PMAP__NEST              0x6\n#define PMAP__UNNEST            0x7\n#define PMAP__FLUSH_TLBS        0x8\n#define PMAP__UPDATE_INTERRUPT  0x9\n#define PMAP__ATTRIBUTE_CLEAR   0xa\n#define PMAP__REUSABLE          0xb     /* This appears to be unused */\n#define PMAP__QUERY_RESIDENT    0xc\n#define PMAP__FLUSH_KERN_TLBS   0xd\n#define PMAP__FLUSH_DELAYED_TLBS        0xe\n#define PMAP__FLUSH_TLBS_TO     0xf\n#define PMAP__FLUSH_EPT         0x10\n#define PMAP__FAST_FAULT        0x11\n#define PMAP__SWITCH            0x12\n#define PMAP__TTE               0x13\n#define PMAP__SWITCH_USER_TTB   0x14\n#define PMAP__UPDATE_CACHING    0x15\n#define PMAP__ATTRIBUTE_CLEAR_RANGE 0x16\n#define PMAP__CLEAR_USER_TTB    0x17\n#define PMAP__IOMMU_INIT        0x18\n#define PMAP__IOMMU_IOVMALLOC   0x19\n#define PMAP__IOMMU_IOVMFREE    0x1a\n#define PMAP__IOMMU_MAP         0x1b\n#define PMAP__IOMMU_UNMAP       0x1c\n#define PMAP__IOMMU_IOCTL       0x1d\n#define PMAP__IOMMU_GRANT_PAGE  0x1e\n\n/* Codes for clock (DBG_MACH_CLOCK) */\n#define MACH_EPOCH_CHANGE       0x0     /* wake epoch change */\n#define MACH_BRIDGE_RCV_TS      0x1     /* receive timestamp pair from interrupt handler */\n#define MACH_BRIDGE_REMOTE_TIME 0x2     /* calculate remote timestamp */\n#define MACH_BRIDGE_RESET_TS    0x3     /* reset timestamp conversion parameters */\n#define MACH_BRIDGE_TS_PARAMS   0x4     /* recompute timestamp conversion parameters */\n#define MACH_BRIDGE_SKIP_TS     0x5     /* skip timestamp */\n#define MACH_BRIDGE_TS_MISMATCH 0x6     /* mismatch between predicted and received remote timestamp */\n#define MACH_BRIDGE_OBSV_RATE   0x7     /* out of range observed rates */\n\n/* Codes for Stackshot/Microstackshot (DBG_MACH_STACKSHOT) */\n#define MICROSTACKSHOT_RECORD   0x0\n#define MICROSTACKSHOT_GATHER   0x1\n#define STACKSHOT_RECORD        0x2     /* START/END, syscall stackshot */\n#define STACKSHOT_RECORD_SHORT  0x3     /* ran out of space inside stackshot, growing buffer */\n#define STACKSHOT_KERN_RECORD   0x4     /* START/END, internal stackshot */\n\n/* Codes for sysdiagnose (DBG_MACH_SYSDIAGNOSE) */\n#define SYSDIAGNOSE_NOTIFY_USER 0x0\n#define SYSDIAGNOSE_FULL        0x1\n#define SYSDIAGNOSE_STACKSHOT   0x2\n#define SYSDIAGNOSE_TAILSPIN    0x3\n\n/* Codes for Selective Forced Idle (DBG_MACH_SFI) */\n#define SFI_SET_WINDOW                  0x0\n#define SFI_CANCEL_WINDOW               0x1\n#define SFI_SET_CLASS_OFFTIME           0x2\n#define SFI_CANCEL_CLASS_OFFTIME        0x3\n#define SFI_THREAD_DEFER                0x4\n#define SFI_OFF_TIMER                   0x5\n#define SFI_ON_TIMER                    0x6\n#define SFI_WAIT_CANCELED               0x7\n#define SFI_PID_SET_MANAGED             0x8\n#define SFI_PID_CLEAR_MANAGED           0x9\n#define SFI_GLOBAL_DEFER                0xa\n\n/* Codes for Zone Allocator (DBG_MACH_ZALLOC) */\n#define ZALLOC_ZCRAM                    0x0\n\n/* Codes for Mach resource management (DBG_MACH_RESOURCE) */\n/* _K32A/B codes start at double the low nibble */\n#define RMON_ENABLE_CPUUSAGE_MONITOR    0x001\n#define RMON_CPUUSAGE_VIOLATED          0x002\n#define RMON_CPUUSAGE_SUSPENDED         0x003\n#define RMON_CPUUSAGE_VIOLATED_K32A     0x004\n#define RMON_CPUUSAGE_VIOLATED_K32B     0x005\n#define RMON_CPUUSAGE_RESUMED           0x006\n#define RMON_DISABLE_CPUUSAGE_MONITOR   0x00f\n\n#define RMON_ENABLE_CPUWAKES_MONITOR    0x011\n#define RMON_CPUWAKES_VIOLATED          0x012\n#define RMON_CPUWAKES_VIOLATED_K32A     0x014\n#define RMON_CPUWAKES_VIOLATED_K32B     0x015\n#define RMON_DISABLE_CPUWAKES_MONITOR   0x01f\n\n#define RMON_ENABLE_IO_MONITOR          0x021\n#define RMON_LOGWRITES_VIOLATED         0x022\n#define RMON_PHYSWRITES_VIOLATED        0x023\n#define RMON_LOGWRITES_VIOLATED_K32A    0x024\n#define RMON_LOGWRITES_VIOLATED_K32B    0x025\n#define RMON_DISABLE_IO_MONITOR         0x02f\n\n/* Codes for x86 Hypervisor (DBG_MACH_HV) */\n#define HV_X86_ENTER                     0x00\n#define HV_X86_ENTER_ERROR               0x01\n#define HV_X86_TRAP_TASK                 0x02\n#define HV_X86_TRAP_THREAD               0x03\n#define HV_X86_INTERRUPT_INJECT          0x04\n#define HV_X86_INTERRUPT_RECV            0x05\n#define HV_X86_INTERRUPT_SEND            0x06\n#define HV_X86_IPI_SEND                  0x07\n#define HV_X86_NMI_INJECT                0x08\n#define HV_X86_NMI_SEND                  0x09\n#define HV_X86_LSC_HIT                   0x0a\n#define HV_X86_LSC_INSERT                0x0b\n#define HV_X86_LSC_INSERT_IMM32          0x0c\n#define HV_X86_LSC_INVALID               0x0d\n#define HV_X86_LSC_INVALIDATE            0x0e\n#define HV_X86_LSC_MISS                  0x0f\n#define HV_X86_TIMER_CANCEL              0x10\n#define HV_X86_TIMER_FIRE                0x11\n#define HV_X86_TIMER_SCHEDULE            0x12\n#define HV_X86_APIC_ACCESS_EXIT          0x13\n#define HV_X86_APIC_WRITE_EXIT           0x14\n#define HV_X86_EPT_VIOLATION_EXIT        0x15\n#define HV_X86_EXC_NMI_EXIT              0x16\n#define HV_X86_HLT_EXIT                  0x17\n#define HV_X86_IO_EXIT                   0x18\n#define HV_X86_IRQ_EXIT                  0x19\n#define HV_X86_IRQ_WND_EXIT              0x1a\n#define HV_X86_MOV_DR_EXIT               0x1b\n#define HV_X86_NMI_WND_EXIT              0x1c\n#define HV_X86_RDMSR_EXIT                0x1d\n#define HV_X86_RDPMC_EXIT                0x1e\n#define HV_X86_TPR_THRESHOLD_EXIT        0x1f\n#define HV_X86_VMX_TIMER_EXPIRED_EXIT    0x20\n#define HV_X86_WRMSR_EXIT                0x21\n#define HV_X86_VCPU_READ_APIC_TRAP       0x22\n#define HV_X86_VCPU_READ_VMCS_TRAP       0x23\n#define HV_X86_VCPU_RUN_TRAP             0x24\n#define HV_X86_VCPU_RUN_UNTIL_TRAP       0x25\n#define HV_X86_VCPU_WRITE_APIC_TRAP      0x26\n#define HV_X86_VM_ADDRSPACE_CREATE_TRAP  0x27\n#define HV_X86_VM_ADDRSPACE_DESTROY_TRAP 0x28\n#define HV_X86_VM_INTR_MSI_TRAP          0x29\n#define HV_X86_VM_MAP_TRAP               0x2a\n#define HV_X86_VM_PROTECT_TRAP           0x2b\n#define HV_X86_VM_UNMAP_TRAP             0x2c\n#define HV_X86_TSC_OFFSET_SET            0x2d\n\n/* **** The Kernel Debug Sub Classes for Network (DBG_NETWORK) **** */\n#define DBG_NETIP       1       /* Internet Protocol */\n#define DBG_NETARP      2       /* Address Resolution Protocol */\n#define DBG_NETUDP      3       /* User Datagram Protocol */\n#define DBG_NETTCP      4       /* Transmission Control Protocol */\n#define DBG_NETICMP     5       /* Internet Control Message Protocol */\n#define DBG_NETIGMP     6       /* Internet Group Management Protocol */\n#define DBG_NETRIP      7       /* Routing Information Protocol */\n#define DBG_NETOSPF     8       /* Open Shortest Path First */\n#define DBG_NETISIS     9       /* Intermediate System to Intermediate System */\n#define DBG_NETSNMP     10      /* Simple Network Management Protocol */\n#define DBG_NETSOCK     11      /* Socket Layer */\n\n/* For Apple talk */\n#define DBG_NETAARP     100     /* Apple ARP */\n#define DBG_NETDDP      101     /* Datagram Delivery Protocol */\n#define DBG_NETNBP      102     /* Name Binding Protocol */\n#define DBG_NETZIP      103     /* Zone Information Protocol */\n#define DBG_NETADSP     104     /* Name Binding Protocol */\n#define DBG_NETATP      105     /* Apple Transaction Protocol */\n#define DBG_NETASP      106     /* Apple Session Protocol */\n#define DBG_NETAFP      107     /* Apple Filing Protocol */\n#define DBG_NETRTMP     108     /* Routing Table Maintenance Protocol */\n#define DBG_NETAURP     109     /* Apple Update Routing Protocol */\n\n#define DBG_NETIPSEC    128     /* IPsec Protocol  */\n#define DBG_NETVMNET    129     /* VMNet */\n\n/* **** The Kernel Debug Sub Classes for IOKIT (DBG_IOKIT) **** */\n#define DBG_IOINTC                      0       /* Interrupt controller */\n#define DBG_IOWORKLOOP                  1       /* Work from work loop */\n#define DBG_IOINTES                     2       /* Interrupt event source */\n#define DBG_IOCLKES                     3       /* Clock event source */\n#define DBG_IOCMDQ                      4       /* Command queue latencies */\n#define DBG_IOMCURS                     5       /* Memory Cursor */\n#define DBG_IOMDESC                     6       /* Memory Descriptors */\n#define DBG_IOPOWER                     7       /* Power Managerment */\n#define DBG_IOSERVICE                   8       /* Matching etc. */\n#define DBG_IOREGISTRY                  9       /* Registry */\n\n/* **** 9-32 reserved for internal IOKit usage **** */\n\n#define DBG_IOSTORAGE           32      /* Storage layers */\n#define DBG_IONETWORK           33      /* Network layers */\n#define DBG_IOKEYBOARD          34      /* Keyboard */\n#define DBG_IOHID               35      /* HID Devices */\n#define DBG_IOAUDIO             36      /* Audio */\n#define DBG_IOSERIAL            37      /* Serial */\n#define DBG_IOTTY               38      /* TTY layers */\n#define DBG_IOSAM               39      /* SCSI Architecture Model layers */\n#define DBG_IOPARALLELATA       40      /* Parallel ATA */\n#define DBG_IOPARALLELSCSI      41      /* Parallel SCSI */\n#define DBG_IOSATA              42      /* Serial-ATA */\n#define DBG_IOSAS               43      /* SAS */\n#define DBG_IOFIBRECHANNEL      44      /* FiberChannel */\n#define DBG_IOUSB               45      /* USB */\n#define DBG_IOBLUETOOTH         46      /* Bluetooth */\n#define DBG_IOFIREWIRE          47      /* FireWire */\n#define DBG_IOINFINIBAND        48      /* Infiniband */\n#define DBG_IOCPUPM             49      /* CPU Power Management */\n#define DBG_IOGRAPHICS          50      /* Graphics */\n#define DBG_HIBERNATE           51      /* hibernation related events */\n#define DBG_IOTHUNDERBOLT       52      /* Thunderbolt */\n#define DBG_BOOTER              53      /* booter related events */\n#define DBG_IOAUDIO2            54      /* Audio (extended) */\n\n#define DBG_IOSURFACEPA         64      /* IOSurface page mappings */\n#define DBG_IOMDPA              65      /* IOMemoryDescriptor page mappings */\n#define DBG_IODARTPA            66      /* DART page mappings */\n/* **** 67-79 reserved for physical address mapping information **** */\n\n/* Backwards compatibility */\n#define DBG_IOPOINTING          DBG_IOHID                       /* OBSOLETE: Use DBG_IOHID instead */\n#define DBG_IODISK                      DBG_IOSTORAGE           /* OBSOLETE: Use DBG_IOSTORAGE instead */\n\n/* **** The Kernel Debug Sub Classes for Device Drivers (DBG_DRIVERS) **** */\n#define DBG_DRVSTORAGE        1 /* Storage layers */\n#define DBG_DRVNETWORK        2 /* Network layers */\n#define DBG_DRVKEYBOARD       3 /* Keyboard */\n#define DBG_DRVHID            4 /* HID Devices */\n#define DBG_DRVAUDIO          5 /* Audio */\n#define DBG_DRVSERIAL         7 /* Serial */\n#define DBG_DRVSAM            8 /* SCSI Architecture Model layers */\n#define DBG_DRVPARALLELATA    9 /* Parallel ATA */\n#define DBG_DRVPARALLELSCSI  10 /* Parallel SCSI */\n#define DBG_DRVSATA          11 /* Serial ATA */\n#define DBG_DRVSAS           12 /* SAS */\n#define DBG_DRVFIBRECHANNEL  13 /* FiberChannel */\n#define DBG_DRVUSB           14 /* USB */\n#define DBG_DRVBLUETOOTH     15 /* Bluetooth */\n#define DBG_DRVFIREWIRE      16 /* FireWire */\n#define DBG_DRVINFINIBAND    17 /* Infiniband */\n#define DBG_DRVGRAPHICS      18 /* Graphics */\n#define DBG_DRVSD            19 /* Secure Digital */\n#define DBG_DRVNAND          20 /* NAND drivers and layers */\n#define DBG_SSD              21 /* SSD */\n#define DBG_DRVSPI           22 /* SPI */\n#define DBG_DRVWLAN_802_11   23 /* WLAN 802.11 */\n#define DBG_DRVSSM           24 /* System State Manager(AppleSSM) */\n#define DBG_DRVSMC           25 /* System Management Controller */\n#define DBG_DRVMACEFIMANAGER 26 /* Mac EFI Manager */\n#define DBG_DRVANE           27 /* ANE */\n#define DBG_DRVETHERNET      28 /* Ethernet */\n#define DBG_DRVMCC           29 /* Memory Cache Controller */\n#define DBG_DRVACCESSORY     30 /* Accessories */\n#define DBG_SOCDIAGS         31 /* SoC Diagnostics */\n\n/* Backwards compatibility */\n#define DBG_DRVPOINTING         DBG_DRVHID      /* OBSOLETE: Use DBG_DRVHID instead */\n#define DBG_DRVDISK             DBG_DRVSTORAGE  /* OBSOLETE: Use DBG_DRVSTORAGE instead */\n\n/* **** The Kernel Debug Sub Classes for the DLIL Layer (DBG_DLIL) **** */\n#define DBG_DLIL_STATIC 1       /* Static DLIL code */\n#define DBG_DLIL_PR_MOD 2       /* DLIL Protocol Module */\n#define DBG_DLIL_IF_MOD 3       /* DLIL Interface Module */\n#define DBG_DLIL_PR_FLT 4       /* DLIL Protocol Filter */\n#define DBG_DLIL_IF_FLT 5       /* DLIL Interface FIlter */\n\n/* The Kernel Debug Sub Classes for File System (DBG_FSYSTEM) */\n#define DBG_FSRW      0x1     /* reads and writes to the filesystem */\n#define DBG_DKRW      0x2     /* reads and writes to the disk */\n#define DBG_FSVN      0x3     /* vnode operations (inc. locking/unlocking) */\n#define DBG_FSLOOOKUP 0x4     /* namei and other lookup-related operations */\n#define DBG_JOURNAL   0x5     /* journaling operations */\n#define DBG_IOCTL     0x6     /* ioctl to the disk */\n#define DBG_BOOTCACHE 0x7     /* bootcache operations */\n#define DBG_HFS       0x8     /* HFS-specific events; see the hfs project */\n#define DBG_APFS      0x9     /* APFS-specific events; see the apfs project */\n#define DBG_SMB       0xA     /* SMB-specific events; see the smb project */\n#define DBG_MOUNT     0xB     /* Mounting/unmounting operations */\n#define DBG_EXFAT     0xE     /* ExFAT-specific events; see the exfat project */\n#define DBG_MSDOS     0xF     /* FAT-specific events; see the msdosfs project */\n#define DBG_ACFS      0x10    /* Xsan-specific events; see the XsanFS project */\n#define DBG_THROTTLE  0x11    /* I/O Throttling events */\n#define DBG_DECMP     0x12    /* Decmpfs-specific events */\n#define DBG_VFS       0x13    /* VFS layer events */\n#define DBG_LIVEFS    0x14    /* LiveFS events; see the UserFS project */\n#define DBG_CONTENT_PROT 0xCF /* Content Protection Events: see bsd/sys/cprotect.h */\n\n/*\n * For Kernel Debug Sub Class DBG_HFS, state bits for hfs_update event\n */\n#define DBG_HFS_UPDATE_ACCTIME   0x01\n#define DBG_HFS_UPDATE_MODTIME   0x02\n#define DBG_HFS_UPDATE_CHGTIME   0x04\n#define DBG_HFS_UPDATE_MODIFIED  0x08\n#define DBG_HFS_UPDATE_FORCE     0x10\n#define DBG_HFS_UPDATE_DATEADDED 0x20\n#define DBG_HFS_UPDATE_MINOR     0x40\n#define DBG_HFS_UPDATE_SKIPPED   0x80\n\n/*\n * Codes for Kernel Debug Sub Class DBG_VFS\n */\n#define DBG_VFS_IO_COMPRESSION_STATS 0x1000\n\n/* The Kernel Debug Sub Classes for BSD */\n#define DBG_BSD_PROC              0x01 /* process/signals related */\n#define DBG_BSD_MEMSTAT           0x02 /* memorystatus / jetsam operations */\n#define DBG_BSD_KEVENT            0x03 /* kqueue / kevent related */\n#define DBG_BSD_EXCP_SC           0x0C /* System Calls */\n#define DBG_BSD_AIO               0x0D /* aio (POSIX async IO) */\n#define DBG_BSD_SC_EXTENDED_INFO  0x0E /* System Calls, extended info */\n#define DBG_BSD_SC_EXTENDED_INFO2 0x0F /* System Calls, extended info */\n#define DBG_BSD_KDEBUG_TEST       0xFF /* for testing kdebug */\n\n/* The Codes for BSD subcode class DBG_BSD_PROC */\n#define BSD_PROC_EXIT              1  /* process exit */\n#define BSD_PROC_FRCEXIT           2  /* Kernel force termination */\n#define BSD_PROC_EXEC              3  /* process spawn / exec */\n#define BSD_PROC_EXITREASON_CREATE 4  /* exit reason creation */\n#define BSD_PROC_EXITREASON_COMMIT 5  /* exit reason commited to a proc */\n\n/* Codes for BSD subcode class DBG_BSD_MEMSTAT */\n#define BSD_MEMSTAT_SCAN             1  /* memorystatus thread awake */\n#define BSD_MEMSTAT_JETSAM           2  /* LRU jetsam */\n#define BSD_MEMSTAT_JETSAM_HIWAT     3  /* highwater jetsam */\n#define BSD_MEMSTAT_FREEZE           4  /* freeze process */\n#define BSD_MEMSTAT_FREEZE_SCAN      5  /* select a process to freeze and freeze it */\n#define BSD_MEMSTAT_UPDATE           6  /* priority update */\n#define BSD_MEMSTAT_IDLE_DEMOTE      7  /* idle demotion fired */\n#define BSD_MEMSTAT_CLEAR_ERRORS     8  /* reset termination error state */\n#define BSD_MEMSTAT_DIRTY_TRACK      9  /* track the process state */\n#define BSD_MEMSTAT_DIRTY_SET       10  /* set the process state */\n#define BSD_MEMSTAT_DIRTY_CLEAR     11  /* clear the process state */\n#define BSD_MEMSTAT_FAST_JETSAM     15  /* Aggressive jetsam (\"clear-the-deck\") */\n#define BSD_MEMSTAT_COMPACTOR_RUN   16  /* run VM compactor after process kill */\n#define BSD_MEMSTAT_FREEZE_DISABLE  17  /* disable freeze and kill frozen processes */\n#define BSD_MEMSTAT_RELAUNCH_FLAGS  18  /* flags representing jetsam behavior; based on launchd data */\n\n/* Codes for BSD subcode class DBG_BSD_KEVENT */\n#define BSD_KEVENT_KQ_PROCESS_BEGIN   1\n#define BSD_KEVENT_KQ_PROCESS_END     2\n#define BSD_KEVENT_KQWQ_PROCESS_BEGIN 3\n#define BSD_KEVENT_KQWQ_PROCESS_END   4\n#define BSD_KEVENT_KQWQ_BIND          5\n#define BSD_KEVENT_KQWQ_UNBIND        6\n#define BSD_KEVENT_KQWQ_THREQUEST     7\n#define BSD_KEVENT_KQWL_PROCESS_BEGIN 8\n#define BSD_KEVENT_KQWL_PROCESS_END   9\n#define BSD_KEVENT_KQWL_THREQUEST     10\n#define BSD_KEVENT_KQWL_THADJUST      11\n#define BSD_KEVENT_KQ_REGISTER        12\n#define BSD_KEVENT_KQWQ_REGISTER      13\n#define BSD_KEVENT_KQWL_REGISTER      14\n#define BSD_KEVENT_KNOTE_ACTIVATE     15\n#define BSD_KEVENT_KQ_PROCESS         16\n#define BSD_KEVENT_KQWQ_PROCESS       17\n#define BSD_KEVENT_KQWL_PROCESS       18\n#define BSD_KEVENT_KQWL_BIND          19\n#define BSD_KEVENT_KQWL_UNBIND        20\n#define BSD_KEVENT_KNOTE_ENABLE       21\n#define BSD_KEVENT_KNOTE_VANISHED     22\n\n/* The Kernel Debug Sub Classes for DBG_TRACE */\n#define DBG_TRACE_DATA      0\n#define DBG_TRACE_STRING    1\n#define DBG_TRACE_INFO      2\n\n/* The Kernel Debug events: */\n#define TRACE_DATA_NEWTHREAD            (TRACEDBG_CODE(DBG_TRACE_DATA, 1))\n#define TRACE_DATA_EXEC                 (TRACEDBG_CODE(DBG_TRACE_DATA, 2))\n#define TRACE_DATA_THREAD_TERMINATE     (TRACEDBG_CODE(DBG_TRACE_DATA, 3))\n#define TRACE_DATA_THREAD_TERMINATE_PID (TRACEDBG_CODE(DBG_TRACE_DATA, 4))\n#define TRACE_STRING_GLOBAL             (TRACEDBG_CODE(DBG_TRACE_STRING, 0))\n#define TRACE_STRING_NEWTHREAD          (TRACEDBG_CODE(DBG_TRACE_STRING, 1))\n#define TRACE_STRING_EXEC               (TRACEDBG_CODE(DBG_TRACE_STRING, 2))\n#define TRACE_STRING_PROC_EXIT          (TRACEDBG_CODE(DBG_TRACE_STRING, 3))\n#define TRACE_STRING_THREADNAME         (TRACEDBG_CODE(DBG_TRACE_STRING, 4))\n#define TRACE_STRING_THREADNAME_PREV    (TRACEDBG_CODE(DBG_TRACE_STRING, 5))\n#define TRACE_PANIC                     (TRACEDBG_CODE(DBG_TRACE_INFO, 0))\n#define TRACE_TIMESTAMPS                (TRACEDBG_CODE(DBG_TRACE_INFO, 1))\n#define TRACE_LOST_EVENTS               (TRACEDBG_CODE(DBG_TRACE_INFO, 2))\n#define TRACE_WRITING_EVENTS            (TRACEDBG_CODE(DBG_TRACE_INFO, 3))\n#define TRACE_INFO_STRING               (TRACEDBG_CODE(DBG_TRACE_INFO, 4))\n#define TRACE_RETROGRADE_EVENTS         (TRACEDBG_CODE(DBG_TRACE_INFO, 5))\n\n/* The Kernel Debug Sub Classes for DBG_CORESTORAGE */\n#define DBG_CS_IO       0\n\n/* The Kernel Debug Sub Classes for DBG_SECURITY */\n#define DBG_SEC_KERNEL  0 /* raw entropy collected by the kernel */\n#define DBG_SEC_SANDBOX 1\n\n/* Sub-class codes for CoreGraphics (DBG_CG) are defined in its component. */\n\n/* The Kernel Debug Sub Classes for DBG_MONOTONIC */\n#define DBG_MT_INSTRS_CYCLES 1\n#define DBG_MT_DEBUG 2\n#define DBG_MT_RESOURCES_PROC_EXIT 3\n#define DBG_MT_RESOURCES_THR_EXIT 4\n#define DBG_MT_TMPTH 0xfe\n#define DBG_MT_TMPCPU 0xff\n\n/* Kernel Debug events for the DBG_MT_RESOURCES_PROC_EXIT subclass */\n#define DBG_MT_INSTRS_CYCLES_PROC_EXIT MTDBG_RESOURCES_ON_PROC_EXIT(0)\n\n/* Kernel Debug events for the DBG_MT_RESOURCES_THR_EXIT subclass */\n#define DBG_MT_INSTRS_CYCLES_THR_EXIT  MTDBG_RESOURCES_ON_THR_EXIT(0)\n\n/* The Kernel Debug Sub Classes for DBG_MISC */\n#define DBG_MISC_COREBRIGHTNESS 0x01\n#define DBG_MISC_VIDEOENG       0x02\n#define DBG_EVENT               0x10\n#define DBG_MISC_INSTRUMENTS    0x11\n#define DBG_MISC_INSTRUMENTSBT  0x12\n#define DBG_MISC_LAYOUT         0x1a\n#define DBG_BUFFER              0x20\n\n/* The Kernel Debug Sub Classes for DBG_DYLD */\n#define DBG_DYLD_UUID (5)\n\n/* Kernel Debug codes for the DBG_DYLD_UUID subclass */\n#define DBG_DYLD_UUID_MAP_A             (0)\n#define DBG_DYLD_UUID_MAP_B             (1)\n#define DBG_DYLD_UUID_MAP_32_A          (2)\n#define DBG_DYLD_UUID_MAP_32_B          (3)\n#define DBG_DYLD_UUID_MAP_32_C          (4)\n#define DBG_DYLD_UUID_UNMAP_A           (5)\n#define DBG_DYLD_UUID_UNMAP_B           (6)\n#define DBG_DYLD_UUID_UNMAP_32_A        (7)\n#define DBG_DYLD_UUID_UNMAP_32_B        (8)\n#define DBG_DYLD_UUID_UNMAP_32_C        (9)\n#define DBG_DYLD_UUID_SHARED_CACHE_A    (10)\n#define DBG_DYLD_UUID_SHARED_CACHE_B    (11)\n#define DBG_DYLD_UUID_SHARED_CACHE_32_A (12)\n#define DBG_DYLD_UUID_SHARED_CACHE_32_B (13)\n#define DBG_DYLD_UUID_SHARED_CACHE_32_C (14)\n#define DBG_DYLD_AOT_UUID_MAP_A         (15)\n#define DBG_DYLD_AOT_UUID_MAP_B         (16)\n\n/* The Kernel Debug modifiers for the DBG_DKRW sub class */\n#define DKIO_DONE       0x01\n#define DKIO_READ       0x02\n#define DKIO_ASYNC      0x04\n#define DKIO_META       0x08\n#define DKIO_PAGING     0x10\n#define DKIO_THROTTLE   0x20 /* Deprecated, still provided so fs_usage doesn't break */\n#define DKIO_PASSIVE    0x40\n#define DKIO_NOCACHE    0x80\n#define DKIO_TIER_MASK  0xF00\n#define DKIO_TIER_SHIFT 8\n#define DKIO_TIER_UPGRADE 0x1000\n\n/* Kernel Debug Sub Classes for Applications (DBG_APPS) */\n#define DBG_APP_LOGINWINDOW     0x03\n#define DBG_APP_AUDIO           0x04\n#define DBG_APP_SYSTEMUI        0x05\n#define DBG_APP_SIGNPOST        0x0A\n#define DBG_APP_APPKIT          0x0C\n#define DBG_APP_UIKIT           0x0D\n#define DBG_APP_DFR             0x0E\n#define DBG_APP_LAYOUT          0x0F\n#define DBG_APP_COREDATA        0x10\n#define DBG_APP_SAMBA           0x80\n#define DBG_APP_EOSSUPPORT      0x81\n#define DBG_APP_MACEFIMANAGER   0x82\n\n/* Kernel Debug codes for Throttling (DBG_THROTTLE) */\n#define OPEN_THROTTLE_WINDOW    0x1\n#define PROCESS_THROTTLED       0x2\n#define IO_THROTTLE_DISABLE     0x3\n#define IO_TIER_UPL_MISMATCH    0x4\n\n/* Subclasses for MACH Importance Policies (DBG_IMPORTANCE) */\n/* TODO: Split up boost and task policy? */\n#define IMP_ASSERTION                       0x10    /* Task takes/drops a boost assertion */\n#define IMP_BOOST                           0x11    /* Task boost level changed */\n#define IMP_MSG                             0x12    /* boosting message sent by donating task on donating port */\n#define IMP_WATCHPORT                       0x13    /* port marked as watchport, and boost was transferred to the watched task */\n#define IMP_TASK_SUPPRESSION                0x17    /* Task changed suppression behaviors */\n#define IMP_TASK_APPTYPE                    0x18    /* Task launched with apptype */\n#define IMP_UPDATE                          0x19    /* Requested -> effective calculation */\n#define IMP_USYNCH_QOS_OVERRIDE             0x1A    /* Userspace synchronization applied QoS override to resource owning thread */\n#define IMP_DONOR_CHANGE                    0x1B    /* The iit_donor bit changed */\n#define IMP_MAIN_THREAD_QOS                 0x1C    /* The task's main thread QoS was set */\n#define IMP_SYNC_IPC_QOS                    0x1D    /* Sync IPC QOS override */\n/* DBG_IMPORTANCE subclasses  0x20 - 0x3F are reserved for task policy flavors */\n\n/* thread and task attributes */\n#define IMP_TASK_POLICY_DARWIN_BG           0x21\n#define IMP_TASK_POLICY_IOPOL               0x22\n#define IMP_TASK_POLICY_IO                  0x23\n#define IMP_TASK_POLICY_PASSIVE_IO          0x24\n\n/* task only attributes */\n#define IMP_TASK_POLICY_DARWIN_BG_IOPOL     0x27\n/* unused, was IMP_TASK_POLICY_TAL          0x28 */\n#define IMP_TASK_POLICY_BOOST               0x29\n#define IMP_TASK_POLICY_ROLE                0x2A\n/* unused                                   0x2B */\n#define IMP_TASK_POLICY_TERMINATED          0x2C\n#define IMP_TASK_POLICY_NEW_SOCKETS_BG      0x2D\n#define IMP_TASK_POLICY_SUP_ACTIVE          0x2E\n#define IMP_TASK_POLICY_LATENCY_QOS         0x2F\n#define IMP_TASK_POLICY_THROUGH_QOS         0x30\n#define IMP_TASK_POLICY_WATCHERS_BG         0x31\n\n#define IMP_TASK_POLICY_SFI_MANAGED         0x34\n#define IMP_TASK_POLICY_ALL_SOCKETS_BG      0x37\n\n#define IMP_TASK_POLICY_BASE_LATENCY_AND_THROUGHPUT_QOS  0x39 /* latency as value1, throughput as value2 */\n#define IMP_TASK_POLICY_OVERRIDE_LATENCY_AND_THROUGHPUT_QOS  0x3A /* latency as value1, throughput as value2 */\n\n/* thread only attributes */\n#define IMP_TASK_POLICY_PIDBIND_BG          0x32\n/* unused                                   0x33 */\n/* reserved                                 0x35 */\n#define IMP_TASK_POLICY_QOS_OVERRIDE        0x36\n#define IMP_TASK_POLICY_QOS_AND_RELPRIO     0x38 /* QoS as value1, relative priority as value2 */\n#define IMP_TASK_POLICY_QOS_WORKQ_OVERRIDE  0x3B\n#define IMP_TASK_POLICY_QOS_PROMOTE         0x3C\n#define IMP_TASK_POLICY_QOS_KEVENT_OVERRIDE 0x3D\n#define IMP_TASK_POLICY_QOS_IPC_OVERRIDE    IMP_TASK_POLICY_QOS_KEVENT_OVERRIDE /* legacy name */\n#define IMP_TASK_POLICY_QOS_SERVICER_OVERRIDE 0x3E\n\n/* Codes for IMP_ASSERTION */\n#define IMP_HOLD                0x2     /* Task holds a boost assertion */\n#define IMP_DROP                0x4     /* Task drops a boost assertion */\n#define IMP_EXTERN              0x8     /* boost assertion moved from kernel to userspace responsibility (externalized) */\n\n/* Codes for IMP_BOOST */\n#define IMP_BOOSTED             0x1\n#define IMP_UNBOOSTED           0x2     /* Task drops a boost assertion */\n\n/* Codes for IMP_MSG */\n#define IMP_MSG_SEND            0x1     /* boosting message sent by donating task on donating port */\n#define IMP_MSG_DELV            0x2     /* boosting message delivered to task */\n\n/* Codes for IMP_UPDATE */\n#define IMP_UPDATE_TASK_CREATE  0x1\n\n/* Codes for IMP_USYNCH_QOS_OVERRIDE */\n#define IMP_USYNCH_ADD_OVERRIDE         0x0             /* add override for a contended resource */\n#define IMP_USYNCH_REMOVE_OVERRIDE      0x1             /* remove override for a contended resource */\n\n/* Codes for IMP_DONOR_CHANGE */\n#define IMP_DONOR_UPDATE_LIVE_DONOR_STATE       0x0\n#define IMP_DONOR_INIT_DONOR_STATE              0x1\n\n/* Code for IMP_SYNC_IPC_QOS */\n#define IMP_SYNC_IPC_QOS_APPLIED                0x0\n#define IMP_SYNC_IPC_QOS_REMOVED                0x1\n#define IMP_SYNC_IPC_QOS_OVERFLOW               0x2\n#define IMP_SYNC_IPC_QOS_UNDERFLOW              0x3\n\n/* Subclasses for Turnstiles (DBG_TURNSTILE) */\n#define TURNSTILE_HEAP_OPERATIONS               0x10\n#define TURNSTILE_PRIORITY_OPERATIONS           0x20\n#define TURNSTILE_FREELIST_OPERATIONS           0x30\n\n/* Codes for TURNSTILE_HEAP_OPERATIONS */\n#define THREAD_ADDED_TO_TURNSTILE_WAITQ         0x1\n#define THREAD_REMOVED_FROM_TURNSTILE_WAITQ     0x2\n#define THREAD_MOVED_IN_TURNSTILE_WAITQ         0x3\n#define TURNSTILE_ADDED_TO_TURNSTILE_HEAP       0x4\n#define TURNSTILE_REMOVED_FROM_TURNSTILE_HEAP   0x5\n#define TURNSTILE_MOVED_IN_TURNSTILE_HEAP       0x6\n#define TURNSTILE_ADDED_TO_THREAD_HEAP          0x7\n#define TURNSTILE_REMOVED_FROM_THREAD_HEAP      0x8\n#define TURNSTILE_MOVED_IN_THREAD_HEAP          0x9\n#define TURNSTILE_UPDATE_STOPPED_BY_LIMIT       0xa\n#define THREAD_NOT_WAITING_ON_TURNSTILE         0xb\n\n/* Codes for TURNSTILE_PRIORITY_OPERATIONS */\n#define TURNSTILE_PRIORITY_CHANGE               0x1\n#define THREAD_USER_PROMOTION_CHANGE            0x2\n\n/* Codes for TURNSTILE_FREELIST_OPERATIONS */\n#define TURNSTILE_PREPARE                       0x1\n#define TURNSTILE_COMPLETE                      0x2\n\n/* Subclasses for MACH Bank Voucher Attribute Manager (DBG_BANK) */\n#define BANK_ACCOUNT_INFO               0x10    /* Trace points related to bank account struct */\n#define BANK_TASK_INFO                  0x11    /* Trace points related to bank task struct */\n\n/* Subclasses for MACH ATM Voucher Attribute Manager (ATM) */\n#define ATM_SUBAID_INFO                 0x10\n#define ATM_GETVALUE_INFO               0x20\n#define ATM_UNREGISTER_INFO             0x30\n\n/* Codes for BANK_ACCOUNT_INFO */\n#define BANK_SETTLE_CPU_TIME            0x1     /* Bank ledger(chit) rolled up to tasks. */\n#define BANK_SECURE_ORIGINATOR_CHANGED  0x2     /* Secure Originator changed. */\n#define BANK_SETTLE_ENERGY              0x3     /* Bank ledger(energy field) rolled up to tasks. */\n\n/* Codes for ATM_SUBAID_INFO */\n#define ATM_MIN_CALLED                          0x1\n#define ATM_LINK_LIST_TRIM                      0x2\n\n/* Codes for ATM_GETVALUE_INFO */\n#define ATM_VALUE_REPLACED                      0x1\n#define ATM_VALUE_ADDED                         0x2\n\n/* Codes for ATM_UNREGISTER_INFO */\n#define ATM_VALUE_UNREGISTERED                  0x1\n#define ATM_VALUE_DIFF_MAILBOX                  0x2\n\n/* Kernel Debug Sub Classes for daemons (DBG_DAEMON) */\n#define DBG_DAEMON_COREDUET 0x1\n#define DBG_DAEMON_POWERD   0x2\n\n/* Subclasses for the user space allocator */\n#define DBG_UMALLOC_EXTERNAL                    0x1\n#define DBG_UMALLOC_INTERNAL                    0x2\n\n/**********************************************************************/\n\n#define KDBG_MIGCODE(msgid) (((unsigned)DBG_MIG << KDBG_CLASS_OFFSET) | \\\n\t                     ((unsigned)((msgid) & 0x3fffff) << KDBG_CODE_OFFSET))\n\n#define MACHDBG_CODE(SubClass, code) KDBG_CODE(DBG_MACH, SubClass, code)\n#define NETDBG_CODE(SubClass, code) KDBG_CODE(DBG_NETWORK, SubClass, code)\n#define FSDBG_CODE(SubClass, code) KDBG_CODE(DBG_FSYSTEM, SubClass, code)\n#define BSDDBG_CODE(SubClass, code) KDBG_CODE(DBG_BSD, SubClass, code)\n#define IOKDBG_CODE(SubClass, code) KDBG_CODE(DBG_IOKIT, SubClass, code)\n#define DRVDBG_CODE(SubClass, code) KDBG_CODE(DBG_DRIVERS, SubClass, code)\n#define TRACEDBG_CODE(SubClass, code) KDBG_CODE(DBG_TRACE, SubClass, code)\n#define SILICONDBG_CODE(SubClass, code) KDBG_CODE(DBG_SILICON, SubClass, code)\n#define MISCDBG_CODE(SubClass, code) KDBG_CODE(DBG_MISC, SubClass, code)\n#define DLILDBG_CODE(SubClass, code) KDBG_CODE(DBG_DLIL, SubClass, code)\n#define SECURITYDBG_CODE(SubClass, code) KDBG_CODE(DBG_SECURITY, SubClass, code)\n#define DYLDDBG_CODE(SubClass, code) KDBG_CODE(DBG_DYLD, SubClass, code)\n#define QTDBG_CODE(SubClass, code) KDBG_CODE(DBG_QT, SubClass, code)\n#define APPSDBG_CODE(SubClass, code) KDBG_CODE(DBG_APPS, SubClass, code)\n#define ARIADNEDBG_CODE(SubClass, code) KDBG_CODE(DBG_ARIADNE, SubClass, code)\n#define DAEMONDBG_CODE(SubClass, code) KDBG_CODE(DBG_DAEMON, SubClass, code)\n#define CPUPM_CODE(code) IOKDBG_CODE(DBG_IOCPUPM, code)\n#define MTDBG_CODE(SubClass, code) KDBG_CODE(DBG_MONOTONIC, SubClass, code)\n#define MTDBG_RESOURCES_ON_PROC_EXIT(code) MTDBG_CODE(DBG_MT_RESOURCES_PROC_EXIT, code)\n#define MTDBG_RESOURCES_ON_THR_EXIT(code) MTDBG_CODE(DBG_MT_RESOURCES_THR_EXIT, code)\n\n#define KMEM_ALLOC_CODE MACHDBG_CODE(DBG_MACH_LEAKS, 0)\n#define KMEM_ALLOC_CODE_2 MACHDBG_CODE(DBG_MACH_LEAKS, 1)\n#define KMEM_FREE_CODE MACHDBG_CODE(DBG_MACH_LEAKS, 2)\n#define KMEM_FREE_CODE_2 MACHDBG_CODE(DBG_MACH_LEAKS, 3)\n#define ZALLOC_CODE MACHDBG_CODE(DBG_MACH_LEAKS, 4)\n#define ZALLOC_CODE_2 MACHDBG_CODE(DBG_MACH_LEAKS, 5)\n#define ZFREE_CODE MACHDBG_CODE(DBG_MACH_LEAKS, 6)\n#define ZFREE_CODE_2 MACHDBG_CODE(DBG_MACH_LEAKS, 7)\n\n#define PMAP_CODE(code) MACHDBG_CODE(DBG_MACH_PMAP, code)\n\n#define IMPORTANCE_CODE(SubClass, code) KDBG_CODE(DBG_IMPORTANCE, (SubClass), (code))\n#define BANK_CODE(SubClass, code) KDBG_CODE(DBG_BANK, (SubClass), (code))\n#define ATM_CODE(SubClass, code) KDBG_CODE(DBG_ATM, (SubClass), (code))\n#define TURNSTILE_CODE(SubClass, code) KDBG_CODE(DBG_TURNSTILE, (SubClass), (code))\n\n/* Kernel Debug Macros for specific daemons */\n#define COREDUETDBG_CODE(code) DAEMONDBG_CODE(DBG_DAEMON_COREDUET, code)\n#define POWERDDBG_CODE(code) DAEMONDBG_CODE(DBG_DAEMON_POWERD, code)\n\n/* VFS lookup events for serial traces */\n#define VFS_LOOKUP      (FSDBG_CODE(DBG_FSRW,36))\n#define VFS_LOOKUP_DONE (FSDBG_CODE(DBG_FSRW,39))\n\n#endif /* __APPLE_API_UNSTABLE */\n\n__END_DECLS\n\n\n\n#endif /* !defined(BSD_SYS_KDEBUG_H) */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/kdebug_signpost.h",
    "content": "/*\n * Copyright (c) 2016-2019 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n\n#ifndef BSD_SYS_KDEBUG_SIGNPOST_H\n#define BSD_SYS_KDEBUG_SIGNPOST_H\n\n#include <Availability.h>\n#include <stdint.h>\n#include <sys/cdefs.h>\n\n__BEGIN_DECLS\n\n\n/*\n * kdebug_signpost(2) is deprecated.  Use the os_signpost(3) family of tracing\n * functions, instead.\n */\n\nint kdebug_signpost(uint32_t code, uintptr_t arg1, uintptr_t arg2,\n    uintptr_t arg3, uintptr_t arg4)\n__API_DEPRECATED_WITH_REPLACEMENT(\"os_signpost_event_emit\",\n    macos(10.12, 10.15), ios(10.0, 13.0), watchos(3.0, 6.0), tvos(10.0, 13.0));\n\nint kdebug_signpost_start(uint32_t code, uintptr_t arg1, uintptr_t arg2,\n    uintptr_t arg3, uintptr_t arg4)\n__API_DEPRECATED_WITH_REPLACEMENT(\"os_signpost_interval_begin\",\n    macos(10.12, 10.15), ios(10.0, 13.0), watchos(3.0, 6.0), tvos(10.0, 13.0));\n\nint kdebug_signpost_end(uint32_t code, uintptr_t arg1, uintptr_t arg2,\n    uintptr_t arg3, uintptr_t arg4)\n__API_DEPRECATED_WITH_REPLACEMENT(\"os_signpost_interval_end\",\n    macos(10.12, 10.15), ios(10.0, 13.0), watchos(3.0, 6.0), tvos(10.0, 13.0));\n\n\n__END_DECLS\n\n#endif /* !BSD_SYS_KDEBUG_SIGNPOST_H */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/kern_control.h",
    "content": "/*\n * Copyright (c) 2000-2004, 2012-2016 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/*!\n *       @header kern_control.h\n *       This header defines an API to communicate between a kernel\n *       extension and a process outside of the kernel.\n */\n\n#ifndef KPI_KERN_CONTROL_H\n#define KPI_KERN_CONTROL_H\n\n\n#include <sys/appleapiopts.h>\n#include <sys/_types/_u_char.h>\n#include <sys/_types/_u_int16_t.h>\n#include <sys/_types/_u_int32_t.h>\n\n/*\n * Define Controller event subclass, and associated events.\n * Subclass of KEV_SYSTEM_CLASS\n */\n\n/*!\n *       @defined KEV_CTL_SUBCLASS\n *   @discussion The kernel event subclass for kernel control events.\n */\n#define KEV_CTL_SUBCLASS        2\n\n/*!\n *       @defined KEV_CTL_REGISTERED\n *   @discussion The event code indicating a new controller was\n *       registered. The data portion will contain a ctl_event_data.\n */\n#define KEV_CTL_REGISTERED      1       /* a new controller appears */\n\n/*!\n *       @defined KEV_CTL_DEREGISTERED\n *   @discussion The event code indicating a controller was unregistered.\n *       The data portion will contain a ctl_event_data.\n */\n#define KEV_CTL_DEREGISTERED    2       /* a controller disappears */\n\n/*!\n *       @struct ctl_event_data\n *       @discussion This structure is used for KEV_CTL_SUBCLASS kernel\n *               events.\n *       @field ctl_id The kernel control id.\n *       @field ctl_unit The kernel control unit.\n */\nstruct ctl_event_data {\n\tu_int32_t   ctl_id;             /* Kernel Controller ID */\n\tu_int32_t   ctl_unit;\n};\n\n/*\n * Controls destined to the Controller Manager.\n */\n\n/*!\n *       @defined CTLIOCGCOUNT\n *   @discussion The CTLIOCGCOUNT ioctl can be used to determine the\n *       number of kernel controllers registered.\n */\n#define CTLIOCGCOUNT    _IOR('N', 2, int)               /* get number of control structures registered */\n\n/*!\n *       @defined CTLIOCGINFO\n *   @discussion The CTLIOCGINFO ioctl can be used to convert a kernel\n *       control name to a kernel control id.\n */\n#define CTLIOCGINFO     _IOWR('N', 3, struct ctl_info)  /* get id from name */\n\n\n/*!\n *       @defined MAX_KCTL_NAME\n *   @discussion Kernel control names must be no longer than\n *       MAX_KCTL_NAME.\n */\n#define MAX_KCTL_NAME   96\n\n/*\n * Controls destined to the Controller Manager.\n */\n\n/*!\n *       @struct ctl_info\n *       @discussion This structure is used with the CTLIOCGINFO ioctl to\n *               translate from a kernel control name to a control id.\n *       @field ctl_id The kernel control id, filled out upon return.\n *       @field ctl_name The kernel control name to find.\n */\nstruct ctl_info {\n\tu_int32_t   ctl_id;                             /* Kernel Controller ID  */\n\tchar        ctl_name[MAX_KCTL_NAME];            /* Kernel Controller Name (a C string) */\n};\n\n\n/*!\n *       @struct sockaddr_ctl\n *       @discussion The controller address structure is used to establish\n *               contact between a user client and a kernel controller. The\n *               sc_id/sc_unit uniquely identify each controller. sc_id is a\n *               unique identifier assigned to the controller. The identifier can\n *               be assigned by the system at registration time or be a 32-bit\n *               creator code obtained from Apple Computer. sc_unit is a unit\n *               number for this sc_id, and is privately used by the kernel\n *               controller to identify several instances of the controller.\n *       @field sc_len The length of the structure.\n *       @field sc_family AF_SYSTEM.\n *       @field ss_sysaddr AF_SYS_KERNCONTROL.\n *       @field sc_id Controller unique identifier.\n *       @field sc_unit Kernel controller private unit number.\n *       @field sc_reserved Reserved, must be set to zero.\n */\nstruct sockaddr_ctl {\n\tu_char      sc_len;     /* depends on size of bundle ID string */\n\tu_char      sc_family;  /* AF_SYSTEM */\n\tu_int16_t   ss_sysaddr; /* AF_SYS_KERNCONTROL */\n\tu_int32_t   sc_id;      /* Controller unique identifier  */\n\tu_int32_t   sc_unit;    /* Developer private unit number */\n\tu_int32_t   sc_reserved[5];\n};\n\n\n\n#endif /* KPI_KERN_CONTROL_H */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/kern_event.h",
    "content": "/*\n * Copyright (c) 2000-2021 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/* Copyright (c) 1998, 1999 Apple Computer, Inc. All Rights Reserved */\n/*!\n *       @header kern_event.h\n *       This header defines in-kernel functions for generating kernel events as\n *       well as functions for receiving kernel events using a kernel event\n *       socket.\n */\n\n#ifndef SYS_KERN_EVENT_H\n#define SYS_KERN_EVENT_H\n\n#include <sys/appleapiopts.h>\n#include <sys/ioccom.h>\n#include <sys/sys_domain.h>\n\n#define KEV_SNDSPACE    (4 * 1024)\n#define KEV_RECVSPACE   (32 * 1024)\n\n#define KEV_ANY_VENDOR          0\n#define KEV_ANY_CLASS           0\n#define KEV_ANY_SUBCLASS        0\n\n/*\n * Vendor Code\n */\n\n/*!\n *       @defined KEV_VENDOR_APPLE\n *       @discussion Apple generated kernel events use the hard coded vendor code\n *       value of 1. Third party kernel events use a dynamically allocated vendor\n *       code. The vendor code can be found using the SIOCGKEVVENDOR ioctl.\n */\n#define KEV_VENDOR_APPLE        1\n\n/*\n * Definition of top-level classifications for KEV_VENDOR_APPLE\n */\n\n/*!\n *       @defined KEV_NETWORK_CLASS\n *       @discussion Network kernel event class.\n */\n#define KEV_NETWORK_CLASS       1\n\n/*!\n *       @defined KEV_IOKIT_CLASS\n *       @discussion IOKit kernel event class.\n */\n#define KEV_IOKIT_CLASS         2\n\n/*!\n *       @defined KEV_SYSTEM_CLASS\n *       @discussion System kernel event class.\n */\n#define KEV_SYSTEM_CLASS        3\n\n/*!\n *       @defined KEV_APPLESHARE_CLASS\n *       @discussion AppleShare kernel event class.\n */\n#define KEV_APPLESHARE_CLASS    4\n\n/*!\n *       @defined KEV_FIREWALL_CLASS\n *       @discussion Firewall kernel event class.\n */\n#define KEV_FIREWALL_CLASS      5\n\n/*!\n *       @defined KEV_IEEE80211_CLASS\n *       @discussion IEEE 802.11 kernel event class.\n */\n#define KEV_IEEE80211_CLASS     6\n\n/*!\n *       @defined KEV_NKE_CLASS\n *       @discussion NKE kernel event class.\n */\n#define KEV_NKE_CLASS           7\n\n#define KEV_NKE_ALF_SUBCLASS            1\n#define KEV_NKE_ALF_STATE_CHANGED       1\n\n/*\n * The following struct is KPI, but it was originally defined with a trailing\n * array member of size one, intended to be used as a Variable-Length Array.\n * That's problematic because the compiler doesn't know that the array is\n * accessed out-of-bounds and can assume it isn't. This makes\n * -Warray-bounds-pointer-arithmetic sad. We can't just change the code because\n * it requires users to also change their uses of the class, at a minimum\n * because kern_event_msg's size changes when making the last member a VLA. This\n * macro allows users of this KPI to opt-in to the new behavior.\n */\n#if defined(XNU_KERN_EVENT_DATA_IS_VLA)\n#define XNU_KERN_EVENT_DATA_SIZE /* nothing, it's a VLA */\n#else\n#define XNU_KERN_EVENT_DATA_SIZE 1\n#endif\n\n/*!\n *       @struct kern_event_msg\n *       @discussion This structure is prepended to all kernel events. This\n *               structure is used to determine the format of the remainder of\n *               the kernel event. This structure will appear on all messages\n *               received on a kernel event socket. To post a kernel event, a\n *               slightly different structure is used.\n *       @field total_size Total size of the kernel event message including the\n *               header.\n *       @field vendor_code The vendor code indicates which vendor generated the\n *               kernel event. This gives every vendor a unique set of classes\n *               and subclasses to use. Use the SIOCGKEVVENDOR ioctl to look up\n *               vendor codes for vendors other than Apple. Apple uses\n *               KEV_VENDOR_APPLE.\n *       @field kev_class The class of the kernel event.\n *       @field kev_subclass The subclass of the kernel event.\n *       @field id Monotonically increasing value.\n *       @field event_code The event code.\n *       @field event_data Any additional data about this event. Format will\n *               depend on the vendor_code, kev_class, kev_subclass, and\n *               event_code. The length of the event_data can be determined\n *               using total_size - KEV_MSG_HEADER_SIZE.\n */\nstruct kern_event_msg {\n\tu_int32_t       total_size;     /* Size of entire event msg */\n\tu_int32_t       vendor_code;    /* For non-Apple extensibility */\n\tu_int32_t       kev_class;      /* Layer of event source */\n\tu_int32_t       kev_subclass;   /* Component within layer */\n\tu_int32_t       id;             /* Monotonically increasing value */\n\tu_int32_t       event_code;     /* unique code */\n\tu_int32_t       event_data[XNU_KERN_EVENT_DATA_SIZE];   /* One or more data words */\n};\n\n/*!\n *       @defined KEV_MSG_HEADER_SIZE\n *       @discussion Size of the header portion of the kern_event_msg structure.\n *               This accounts for everything right up to event_data. The size\n *               of the data can be found by subtracting KEV_MSG_HEADER_SIZE\n *               from the total size from the kern_event_msg.\n */\n#define KEV_MSG_HEADER_SIZE (offsetof(struct kern_event_msg, event_data[0]))\n\n/*!\n *       @struct kev_request\n *       @discussion This structure is used with the SIOCSKEVFILT and\n *               SIOCGKEVFILT to set and get the control filter setting for a\n *               kernel control socket.\n *       @field total_size Total size of the kernel event message including the\n *               header.\n *       @field vendor_code All kernel events that don't match this vendor code\n *               will be ignored. KEV_ANY_VENDOR can be used to receive kernel\n *               events with any vendor code.\n *       @field kev_class All kernel events that don't match this class will be\n *               ignored. KEV_ANY_CLASS can be used to receive kernel events with\n *               any class.\n *       @field kev_subclass All kernel events that don't match this subclass\n *               will be ignored. KEV_ANY_SUBCLASS can be used to receive kernel\n *               events with any subclass.\n */\nstruct kev_request {\n\tu_int32_t       vendor_code;\n\tu_int32_t       kev_class;\n\tu_int32_t       kev_subclass;\n};\n\n/*!\n *       @defined KEV_VENDOR_CODE_MAX_STR_LEN\n *       @discussion This define sets the maximum length of a string that can be\n *               used to identify a vendor or kext when looking up a vendor code.\n */\n#define KEV_VENDOR_CODE_MAX_STR_LEN     200\n\n/*!\n *       @struct kev_vendor_code\n *       @discussion This structure is used with the SIOCGKEVVENDOR ioctl to\n *               convert from a string identifying a kext or vendor, in the\n *               form of a bundle identifier, to a vendor code.\n *       @field vendor_code After making the SIOCGKEVVENDOR ioctl call, this will\n *               be filled in with the vendor code if there is one.\n *       @field vendor_string A bundle style identifier.\n */\n#pragma pack(4)\nstruct kev_vendor_code {\n\tu_int32_t       vendor_code;\n\tchar            vendor_string[KEV_VENDOR_CODE_MAX_STR_LEN];\n};\n#pragma pack()\n\n/*!\n *       @defined SIOCGKEVID\n *       @discussion Retrieve the current event id. Each event generated will\n *               have a new id. The next event to be generated will have an id\n *               of id+1.\n */\n#define SIOCGKEVID      _IOR('e', 1, u_int32_t)\n\n/*!\n *       @defined SIOCSKEVFILT\n *       @discussion Set the kernel event filter for this socket. Kernel events\n *               not matching this filter will not be received on this socket.\n */\n#define SIOCSKEVFILT    _IOW('e', 2, struct kev_request)\n\n/*!\n *       @defined SIOCGKEVFILT\n *       @discussion Retrieve the kernel event filter for this socket. Kernel\n *               events not matching this filter will not be received on this\n *               socket.\n */\n#define SIOCGKEVFILT    _IOR('e', 3, struct kev_request)\n\n/*!\n *       @defined SIOCGKEVVENDOR\n *       @discussion Lookup the vendor code for the specified vendor. ENOENT will\n *               be returned if a vendor code for that vendor string does not\n *               exist.\n */\n#define SIOCGKEVVENDOR  _IOWR('e', 4, struct kev_vendor_code)\n\n\n#endif /* SYS_KERN_EVENT_H */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/kernel.h",
    "content": "/*\n * Copyright (c) 2000-2019 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */\n/*-\n * Copyright (c) 1990, 1993\n *\tThe Regents of the University of California.  All rights reserved.\n * (c) UNIX System Laboratories, Inc.\n * All or some portions of this file are derived from material licensed\n * to the University of California by American Telephone and Telegraph\n * Co. or Unix System Laboratories, Inc. and are reproduced herein with\n * the permission of UNIX System Laboratories, Inc.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *\tThis product includes software developed by the University of\n *\tCalifornia, Berkeley and its contributors.\n * 4. Neither the name of the University nor the names of its contributors\n *    may be used to endorse or promote products derived from this software\n *    without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n *\t@(#)kernel.h\t8.3 (Berkeley) 1/21/94\n */\n#ifndef _SYS_KERNEL_H_\n#define _SYS_KERNEL_H_\n\n#include <sys/appleapiopts.h>\n\n\n#endif  /* !_SYS_KERNEL_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/kernel_types.h",
    "content": "/*\n * Copyright (c) 2004-2010 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n\n#ifndef _KERN_SYS_KERNELTYPES_H_\n#define _KERN_SYS_KERNELTYPES_H_\n\n#include <sys/cdefs.h>\n#include <sys/types.h>\n#include <stdint.h>\n\n#ifdef BSD_BUILD\n/* Macros(?) to clear/set/test flags. */\n#define SET(t, f)       (t) |= (f)\n#define CLR(t, f)       (t) &= ~(f)\n#define ISSET(t, f)     ((t) & (f))\n#endif\n\n\ntypedef int64_t daddr64_t;\n\n#ifndef BSD_BUILD\nstruct buf;\ntypedef struct buf * buf_t;\n\nstruct file;\ntypedef struct file * file_t;\n\n#ifndef __LP64__\nstruct ucred;\ntypedef struct ucred * ucred_t;\n#endif\n\n#if defined(KERNEL) || !defined(_SYS_MOUNT_H_) /* also defined in mount.h */\nstruct mount;\ntypedef struct mount * mount_t;\n\nstruct vnode;\ntypedef struct vnode * vnode_t;\n#endif\n\nstruct proc;\ntypedef struct proc * proc_t;\n\nstruct proc_ident;\ntypedef struct proc_ident * proc_ident_t;\n\nstruct uio;\ntypedef struct uio * uio_t;\n\nstruct vfs_context;\ntypedef struct vfs_context * vfs_context_t;\n\nstruct vfstable;\ntypedef struct vfstable * vfstable_t;\n\nstruct __ifnet;\nstruct __mbuf;\nstruct __pkthdr;\nstruct __socket;\nstruct __sockopt;\nstruct __ifaddr;\nstruct __ifmultiaddr;\nstruct __ifnet_filter;\nstruct __rtentry;\nstruct __if_clone;\nstruct __bufattr;\n\ntypedef struct __ifnet*                 ifnet_t;\ntypedef struct __mbuf*                  mbuf_t;\ntypedef struct __pkthdr*                pkthdr_t;\ntypedef struct __socket*                socket_t;\ntypedef struct __sockopt*               sockopt_t;\ntypedef struct __ifaddr*                ifaddr_t;\ntypedef struct __ifmultiaddr*   ifmultiaddr_t;\ntypedef struct __ifnet_filter*  interface_filter_t;\ntypedef struct __rtentry*               route_t;\ntypedef struct __if_clone*              if_clone_t;\ntypedef struct __bufattr*               bufattr_t;\n\n#else /* BSD_BUILD */\n\ntypedef struct buf * buf_t;\ntypedef struct file * file_t;\n#ifndef __LP64__\ntypedef struct ucred * ucred_t;\n#endif\n#if defined(KERNEL) || !defined(_SYS_MOUNT_H_) /* also defined in mount.h */\ntypedef struct mount * mount_t;\ntypedef struct vnode * vnode_t;\n#endif\ntypedef struct proc * proc_t;\ntypedef struct proc_ident * proc_ident_t;\ntypedef struct uio * uio_t;\ntypedef struct user_iovec * user_iovec_t;\ntypedef struct vfs_context * vfs_context_t;\ntypedef struct vfstable * vfstable_t;\n\n\n#endif /* !BSD_BUILD */\n\n#include <sys/_types/_guid_t.h>\n\n#ifndef _KAUTH_ACE\n#define _KAUTH_ACE\nstruct kauth_ace;\ntypedef struct kauth_ace * kauth_ace_t;\n#endif\n#ifndef _KAUTH_ACL\n#define _KAUTH_ACL\nstruct kauth_acl;\ntypedef struct kauth_acl * kauth_acl_t;\n#endif\n#ifndef _KAUTH_FILESEC\n#define _KAUTH_FILESEC\nstruct kauth_filesec;\ntypedef struct kauth_filesec * kauth_filesec_t;\n#endif\n\n#ifndef _KAUTH_ACTION_T\n#define _KAUTH_ACTION_T\ntypedef int kauth_action_t;\n#endif\n\n#endif /* !_KERN_SYS_KERNELTYPES_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/lctx.h",
    "content": "/*\n * TODO: remove this file\n */\n#ifndef _SYS_LCTX_H_\n#define _SYS_LCTX_H_\n\n#include <sys/errno.h> /* errno, ENOSYS */\n#include <sys/_types/_pid_t.h> /* pid_t */\nstatic __inline pid_t\ngetlcid(pid_t pid)\n{\n\terrno = ENOSYS;\n\treturn -1;\n}\n\nstatic __inline int\nsetlcid(pid_t pid, pid_t lcid)\n{\n\terrno = ENOSYS;\n\treturn -1;\n}\n\n#define LCID_PROC_SELF  (0)\n#define LCID_REMOVE     (-1)\n#define LCID_CREATE     (0)\n\n#endif  /* !_SYS_LCTX_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/loadable_fs.h",
    "content": "/*\n * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/*\t@(#)loadable_fs.h\t2.0\t26/06/90\t(c) 1990 NeXT\t*/\n\n/* XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n *\n * W I L L    D R A S T I C A L L Y   C H A N G E   S O O N\n * U S E   A T  Y O U R   O W N  R I S K\n *\n * XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX */\n\n\n/*\n * loadable_fs.h - message struct for loading and initializing loadable\n *\t\t   file systems.\n */\n\n#ifndef _SYS_LOADABLE_FS_\n#define _SYS_LOADABLE_FS_\n\n\n/*\n * Constants for Loadable FS Utilities (in \"/System/Library/Filesystems\")\n *\n * Example of a /usr/filesystems directory\n *\n * /usr/filesystems/dos.fs/dos.util\t\tutility with which WSM\n *\t\t\t\t\t\t\tcommunicates\n * /usr/filesystems/dos.fs/dos.name             \"DOS Floppy\"\n * /usr/filesystems/dos.fs/dos_reloc\t\tactual loadable filesystem\n * /usr/filesystems/dos.fs/dos.openfs.tiff\t\"open folder\" icon\n * /usr/filesystems/dos.fs/dos.fs.tiff\t\t\"closed folder\" icon\n */\n#define FS_DIR_LOCATION         \"/System/Library/Filesystems\"\n#define FS_DIR_SUFFIX           \".fs\"\n#define FS_UTIL_SUFFIX          \".util\"\n\n/*\n * .util program commands - all sent in the form \"-p\" or \"-m\" ... as argv[1].\n */\n#define FSUC_PROBE              'p'     /* probe FS for mount or init */\n/* example usage: foo.util -p fd0 removable writable */\n\n#define FSUC_PROBEFORINIT       'P'     /* probe FS for init only */\n/* example usage: foo.util -P fd0 removable */\n\n#define FSUC_MOUNT              'm'     /* mount FS */\n/* example usage: foo.util -m fd0 /bar removable writable */\n\n#define FSUC_REPAIR             'r'     /* repair ('fsck') FS */\n/* example usage: foo.util -r fd0 removable */\n\n#define FSUC_UNMOUNT            'u'     /* unmount FS */\n/* example usage: foo.util -u fd0 /bar */\n\n/* The following is not used by Workspace Manager */\n#define FSUC_MOUNT_FORCE        'M'     /* like FSUC_MOUNT, but proceed even on\n\t                                 * error. */\n/*\n * Return codes from .util program\n */\n#define FSUR_RECOGNIZED         (-1)    /* response to FSUC_PROBE; implies that\n\t                                 * a mount is possible */\n#define FSUR_UNRECOGNIZED       (-2)    /* negative response to FSUC_PROBE */\n#define FSUR_IO_SUCCESS         (-3)    /* mount, unmount, repair succeeded */\n#define FSUR_IO_FAIL            (-4)    /* unrecoverable I/O error */\n#define FSUR_IO_UNCLEAN         (-5)    /* mount failed, file system not clean\n\t                                 */\n#define FSUR_INVAL              (-6)    /* invalid argument */\n#define FSUR_LOADERR            (-7)    /* kern_loader error */\n#define FSUR_INITRECOGNIZED     (-8)    /* response to FSUC_PROBE or\n\t                                 * FSUC_PROBEFORINIT, implies that\n\t                                 * initialization is possible */\n\n/*\n *\tmount parameters passed from WSM to the .util program.\n */\n#define DEVICE_READONLY         \"readonly\"\n#define DEVICE_WRITABLE         \"writable\"\n\n#define DEVICE_REMOVABLE        \"removable\"\n#define DEVICE_FIXED            \"fixed\"\n\n#endif  /* _SYS_LOADABLE_FS_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/lock.h",
    "content": "/*\n * Copyright (c) 2000-2006 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/* Copyright (c) 1995, 1997 Apple Computer, Inc. All Rights Reserved */\n/*\n * Copyright (c) 1995\n *\tThe Regents of the University of California.  All rights reserved.\n *\n * This code contains ideas from software contributed to Berkeley by\n * Avadis Tevanian, Jr., Michael Wayne Young, and the Mach Operating\n * System project at Carnegie-Mellon University.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *\tThis product includes software developed by the University of\n *\tCalifornia, Berkeley and its contributors.\n * 4. Neither the name of the University nor the names of its contributors\n *    may be used to endorse or promote products derived from this software\n *    without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n *\t@(#)lock.h\t8.12 (Berkeley) 5/19/95\n */\n\n#ifndef _SYS_LOCK_H_\n#define _SYS_LOCK_H_\n\n#include <sys/appleapiopts.h>\n#include <sys/types.h>\n#include <sys/cdefs.h>\n\n\n#endif  /* _SYS_LOCK_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/lockf.h",
    "content": "/*\n * Copyright (c) 2004-2018 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/*\n * Copyright (c) 1991, 1993\n *\tThe Regents of the University of California.  All rights reserved.\n *\n * This code is derived from software contributed to Berkeley by\n * Scooter Morris at Genentech Inc.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 4. Neither the name of the University nor the names of its contributors\n *    may be used to endorse or promote products derived from this software\n *    without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n *\t@(#)lockf.h\t8.1 (Berkeley) 6/11/93\n * $FreeBSD: src/sys/sys/lockf.h,v 1.16 2004/04/07 04:19:49 imp Exp $\n */\n\n#ifndef _SYS_LOCKF_H_\n#define _SYS_LOCKF_H_\n\n#include <sys/queue.h>\n#include <sys/cdefs.h>\n#include <sys/types.h>\n\nstruct vnop_advlock_args;\nstruct vnode;\n\n#if IMPORTANCE_INHERITANCE\n#define LF_NOT_BOOSTED  0\n#define LF_BOOSTED      1\n#endif /* IMPORTANCE_INHERITANCE */\n\n/*\n * The lockf structure is a kernel structure which contains the information\n * associated with a byte range lock.  The lockf structures are linked into\n * the vnode structure.  Locks are sorted by the starting byte of the lock for\n * efficiency after they have been committed; uncommitted locks are on the list\n * head so they may quickly be accessed, and are both short lived and transient.\n */\nTAILQ_HEAD(locklist, lockf);\n\nstruct lockf {\n\tshort   lf_flags;           /* Semantics: F_POSIX, F_FLOCK, F_WAIT */\n\tshort   lf_type;            /* Lock type: F_RDLCK, F_WRLCK */\n#if IMPORTANCE_INHERITANCE\n\tint     lf_boosted;         /* Is the owner of the lock boosted */\n#endif\n\toff_t   lf_start;           /* Byte # of the start of the lock */\n\toff_t   lf_end;             /* Byte # of the end of the lock (-1=EOF) */\n\tcaddr_t lf_id;              /* Id of the resource holding the lock */\n\tstruct  lockf **lf_head;    /* Back pointer to the head of the locf list */\n\tstruct  vnode *lf_vnode;    /* Back pointer to the inode */\n\tstruct  lockf *lf_next;     /* Pointer to the next lock on this inode */\n\tstruct  locklist lf_blkhd;  /* List of requests blocked on this lock */\n\tTAILQ_ENTRY(lockf) lf_block;/* A request waiting for a lock */\n\tstruct  proc *lf_owner;     /* The proc that did the SETLK, if known */\n};\n\n__BEGIN_DECLS\n\n\n__END_DECLS\n\n#endif /* !_SYS_LOCKF_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/lockstat.h",
    "content": "/*\n * CDDL HEADER START\n *\n * The contents of this file are subject to the terms of the\n * Common Development and Distribution License, Version 1.0 only\n * (the \"License\").  You may not use this file except in compliance\n * with the License.\n *\n * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE\n * or http://www.opensolaris.org/os/licensing.\n * See the License for the specific language governing permissions\n * and limitations under the License.\n *\n * When distributing Covered Code, include this CDDL HEADER in each\n * file and include the License file at usr/src/OPENSOLARIS.LICENSE.\n * If applicable, add the following below this CDDL HEADER, with the\n * fields enclosed by brackets \"[]\" replaced with your own identifying\n * information: Portions Copyright [yyyy] [name of copyright owner]\n *\n * CDDL HEADER END\n */\n/*\n * Copyright 1997-2003 Sun Microsystems, Inc.  All rights reserved.\n * Use is subject to license terms.\n */\n\n#ifndef _SYS_LOCKSTAT_H\n#define _SYS_LOCKSTAT_H\n\n#ifdef  __cplusplus\nextern \"C\" {\n#endif\n\n/*\n * Name the various locking functions...\n */\n#define LS_LCK_MTX_LOCK                 \"lck_mtx_lock\"\n#define LS_LCK_MTX_SPIN_LOCK            \"lck_mtx_spin_lock\"\n#define LS_LCK_MTX_UNLOCK               \"lck_mtx_unlock\"\n#define LS_LCK_MTX_TRY_LOCK             \"lck_mtx_try_lock\"\n#define LS_LCK_MTX_TRY_SPIN_LOCK        \"lck_mtx_try_spin_lock\"\n#define LS_LCK_MTX_EXT_LOCK             \"lck_mtx_ext_lock\"\n#define LS_LCK_MTX_EXT_UNLOCK           \"lck_mtx_ext_unlock\"\n#define LS_LCK_MTX_LOCK_SPIN_LOCK       \"lck_mtx_lock_spin\"\n\n#define LS_LCK_SPIN_LOCK                \"lck_spin_lock\"\n#define LS_LCK_SPIN_TRY_LOCK            \"lck_spin_try_lock\"\n#define LS_LCK_SPIN_UNLOCK              \"lck_spin_unlock\"\n#define LS_LCK_RW_LOCK_SHARED           \"lck_rw_lock_shared\"\n#define LS_LCK_RW_LOCK_EXCL             \"lck_rw_lock_exclusive\"\n#define LS_LCK_RW_DONE                  \"lck_rw_done\"\n#define LS_LCK_RW_TRY_LOCK_EXCL         \"lck_rw_try_lock_exclusive\"\n#define LS_LCK_RW_TRY_LOCK_SHARED       \"lck_rw_try_lock_shared\"\n#define LS_LCK_RW_LOCK_SHARED_TO_EXCL   \"lck_rw_lock_shared_to_exclusive\"\n#define LS_LCK_RW_LOCK_EXCL_TO_SHARED   \"lck_rw_lock_exclusive_to_shared\"\n#define LS_LCK_TICKET_LOCK              \"lck_ticket_lock\"\n#define LS_LCK_TICKET_UNLOCK            \"lck_ticket_unlock\"\n\n\n#define LS_ACQUIRE                      \"acquire\"\n#define LS_RELEASE                      \"release\"\n#define LS_SPIN                         \"spin\"\n#define LS_BLOCK                        \"block\"\n#define LS_UPGRADE                      \"upgrade\"\n#define LS_DOWNGRADE                    \"downgrade\"\n\n#define LS_TYPE_ADAPTIVE                \"adaptive\"\n#define LS_TYPE_SPIN                    \"spin\"\n#define LS_TYPE_RW                      \"rw\"\n#define LS_TYPE_TICKET                  \"ticket\"\n\n#define LSA_ACQUIRE                     (LS_TYPE_ADAPTIVE \"-\" LS_ACQUIRE)\n#define LSA_RELEASE                     (LS_TYPE_ADAPTIVE \"-\" LS_RELEASE)\n#define LSA_SPIN                        (LS_TYPE_ADAPTIVE \"-\" LS_SPIN)\n#define LSA_BLOCK                       (LS_TYPE_ADAPTIVE \"-\" LS_BLOCK)\n#define LSS_ACQUIRE                     (LS_TYPE_SPIN \"-\" LS_ACQUIRE)\n#define LSS_RELEASE                     (LS_TYPE_SPIN \"-\" LS_RELEASE)\n#define LSS_SPIN                        (LS_TYPE_SPIN \"-\" LS_SPIN)\n#define LSR_ACQUIRE                     (LS_TYPE_RW \"-\" LS_ACQUIRE)\n#define LSR_RELEASE                     (LS_TYPE_RW \"-\" LS_RELEASE)\n#define LSR_BLOCK                       (LS_TYPE_RW \"-\" LS_BLOCK)\n#define LSR_SPIN                        (LS_TYPE_RW \"-\" LS_SPIN)\n#define LSR_UPGRADE                     (LS_TYPE_RW \"-\" LS_UPGRADE)\n#define LSR_DOWNGRADE                   (LS_TYPE_RW \"-\" LS_DOWNGRADE)\n#define LST_ACQUIRE                     (LS_TYPE_TICKET \"-\" LS_ACQUIRE)\n#define LST_RELEASE                     (LS_TYPE_TICKET \"-\" LS_RELEASE)\n#define LST_SPIN                        (LS_TYPE_TICKET \"-\" LS_SPIN)\n\n#ifdef  __cplusplus\n}\n#endif\n\n#endif  /* _SYS_LOCKSTAT_H */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/log_data.h",
    "content": "/*\n * Copyright (c) 2019 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/*\n * @OSF_COPYRIGHT@\n */\n/*\n */\n\n#ifndef _DATA_LOG_H_\n#define _DATA_LOG_H_\n\n/*\n * rdar://problem/48252465\n * This header should be exported only to dexts.\n */\nint log_data_as_kernel(unsigned int tag, unsigned int flags, void *buffer, unsigned int size);\n\n#endif /* _DATA_LOG_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/malloc.h",
    "content": "/*\n * Copyright (c) 2000-2013 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/* Copyright (c) 1998, 1999 Apple Computer, Inc. All Rights Reserved */\n/* Copyright (c) 1995, 1997 Apple Computer, Inc. All Rights Reserved */\n/*\n * Copyright (c) 1987, 1993\n *\tThe Regents of the University of California.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *\tThis product includes software developed by the University of\n *\tCalifornia, Berkeley and its contributors.\n * 4. Neither the name of the University nor the names of its contributors\n *    may be used to endorse or promote products derived from this software\n *    without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n *\t@(#)malloc.h\t8.5 (Berkeley) 5/3/95\n */\n/*\n * NOTICE: This file was modified by SPARTA, Inc. in 2005 to introduce\n * support for mandatory and extensible security protections.  This notice\n * is included in support of clause 2.2 (b) of the Apple Public License,\n * Version 2.0.\n */\n\n#ifndef _SYS_MALLOC_H_\n#define _SYS_MALLOC_H_\n\n#include <sys/appleapiopts.h>\n\n\n\n#endif  /* _SYS_MALLOC_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/mbuf.h",
    "content": "/*\n * Copyright (c) 1999-2020 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/* Copyright (c) 1998, 1999 Apple Computer, Inc. All Rights Reserved */\n/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */\n/*\n * Mach Operating System\n * Copyright (c) 1987 Carnegie-Mellon University\n * All rights reserved.  The CMU software License Agreement specifies\n * the terms and conditions for use and redistribution.\n */\n/*\n * Copyright (c) 1994 NeXT Computer, Inc. All rights reserved.\n *\n * Copyright (c) 1982, 1986, 1988 Regents of the University of California.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *      This product includes software developed by the University of\n *      California, Berkeley and its contributors.\n * 4. Neither the name of the University nor the names of its contributors\n *    may be used to endorse or promote products derived from this software\n *    without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n *\t@(#)mbuf.h\t8.3 (Berkeley) 1/21/94\n */\n/*\n * NOTICE: This file was modified by SPARTA, Inc. in 2005 to introduce\n * support for mandatory and extensible security protections.  This notice\n * is included in support of clause 2.2 (b) of the Apple Public License,\n * Version 2.0.\n */\n\n#ifndef _SYS_MBUF_H_\n#define _SYS_MBUF_H_\n\n#include <sys/appleapiopts.h>\n#include <sys/cdefs.h>\n#include <sys/_types/_u_int32_t.h> /* u_int32_t */\n#include <sys/_types/_u_int64_t.h> /* u_int64_t */\n#include <sys/_types/_u_short.h> /* u_short */\n\n\n\n/* mbuf types */\n#define MT_FREE         0       /* should be on free list */\n#define MT_DATA         1       /* dynamic (data) allocation */\n#define MT_HEADER       2       /* packet header */\n#define MT_SOCKET       3       /* socket structure */\n#define MT_PCB          4       /* protocol control block */\n#define MT_RTABLE       5       /* routing tables */\n#define MT_HTABLE       6       /* IMP host tables */\n#define MT_ATABLE       7       /* address resolution tables */\n#define MT_SONAME       8       /* socket name */\n#define MT_SOOPTS       10      /* socket options */\n#define MT_FTABLE       11      /* fragment reassembly header */\n#define MT_RIGHTS       12      /* access rights */\n#define MT_IFADDR       13      /* interface address */\n#define MT_CONTROL      14      /* extra-data protocol message */\n#define MT_OOBDATA      15      /* expedited data  */\n#define MT_TAG          16      /* volatile metadata associated to pkts */\n#define MT_MAX          32      /* enough? */\n\n\n/*\n * Mbuf statistics (legacy).\n */\nstruct mbstat {\n\tu_int32_t       m_mbufs;        /* mbufs obtained from page pool */\n\tu_int32_t       m_clusters;     /* clusters obtained from page pool */\n\tu_int32_t       m_spare;        /* spare field */\n\tu_int32_t       m_clfree;       /* free clusters */\n\tu_int32_t       m_drops;        /* times failed to find space */\n\tu_int32_t       m_wait;         /* times waited for space */\n\tu_int32_t       m_drain;        /* times drained protocols for space */\n\tu_short         m_mtypes[256];  /* type specific mbuf allocations */\n\tu_int32_t       m_mcfail;       /* times m_copym failed */\n\tu_int32_t       m_mpfail;       /* times m_pullup failed */\n\tu_int32_t       m_msize;        /* length of an mbuf */\n\tu_int32_t       m_mclbytes;     /* length of an mbuf cluster */\n\tu_int32_t       m_minclsize;    /* min length of data to allocate a cluster */\n\tu_int32_t       m_mlen;         /* length of data in an mbuf */\n\tu_int32_t       m_mhlen;        /* length of data in a header mbuf */\n\tu_int32_t       m_bigclusters;  /* clusters obtained from page pool */\n\tu_int32_t       m_bigclfree;    /* free clusters */\n\tu_int32_t       m_bigmclbytes;  /* length of an mbuf cluster */\n\tu_int32_t       m_forcedefunct; /* times we force defunct'ed an app's sockets */\n};\n\n/* Compatibillity with 10.3 */\nstruct ombstat {\n\tu_int32_t       m_mbufs;        /* mbufs obtained from page pool */\n\tu_int32_t       m_clusters;     /* clusters obtained from page pool */\n\tu_int32_t       m_spare;        /* spare field */\n\tu_int32_t       m_clfree;       /* free clusters */\n\tu_int32_t       m_drops;        /* times failed to find space */\n\tu_int32_t       m_wait;         /* times waited for space */\n\tu_int32_t       m_drain;        /* times drained protocols for space */\n\tu_short         m_mtypes[256];  /* type specific mbuf allocations */\n\tu_int32_t       m_mcfail;       /* times m_copym failed */\n\tu_int32_t       m_mpfail;       /* times m_pullup failed */\n\tu_int32_t       m_msize;        /* length of an mbuf */\n\tu_int32_t       m_mclbytes;     /* length of an mbuf cluster */\n\tu_int32_t       m_minclsize;    /* min length of data to allocate a cluster */\n\tu_int32_t       m_mlen;         /* length of data in an mbuf */\n\tu_int32_t       m_mhlen;        /* length of data in a header mbuf */\n};\n\n/*\n * mbuf class statistics.\n */\n#define MAX_MBUF_CNAME  15\n\n\ntypedef struct mb_class_stat {\n\tchar            mbcl_cname[MAX_MBUF_CNAME + 1]; /* class name */\n\tu_int32_t       mbcl_size;      /* buffer size */\n\tu_int32_t       mbcl_total;     /* # of buffers created */\n\tu_int32_t       mbcl_active;    /* # of active buffers */\n\tu_int32_t       mbcl_infree;    /* # of available buffers */\n\tu_int32_t       mbcl_slab_cnt;  /* # of available slabs */\n#if defined(KERNEL) || defined(__LP64__)\n\tu_int32_t       mbcl_pad;       /* padding */\n#endif /* KERNEL || __LP64__ */\n\tu_int64_t       mbcl_alloc_cnt; /* # of times alloc is called */\n\tu_int64_t       mbcl_free_cnt;  /* # of times free is called */\n\tu_int64_t       mbcl_notified;  /* # of notified wakeups */\n\tu_int64_t       mbcl_purge_cnt; /* # of purges so far */\n\tu_int64_t       mbcl_fail_cnt;  /* # of allocation failures */\n\tu_int32_t       mbcl_ctotal;    /* total only for this class */\n\tu_int32_t       mbcl_release_cnt; /* amount of memory returned */\n\t/*\n\t * Cache layer statistics\n\t */\n\tu_int32_t       mbcl_mc_state;  /* cache state (see below) */\n\tu_int32_t       mbcl_mc_cached; /* # of cached buffers */\n\tu_int32_t       mbcl_mc_waiter_cnt;  /* # waiters on the cache */\n\tu_int32_t       mbcl_mc_wretry_cnt;  /* # of wait retries */\n\tu_int32_t       mbcl_mc_nwretry_cnt; /* # of no-wait retry attempts */\n\tu_int32_t       mbcl_peak_reported; /* last usage peak reported */\n\tu_int32_t       mbcl_reserved[7];    /* for future use */\n} mb_class_stat_t;\n\n#define MCS_DISABLED    0       /* cache is permanently disabled */\n#define MCS_ONLINE      1       /* cache is online */\n#define MCS_PURGING     2       /* cache is being purged */\n#define MCS_OFFLINE     3       /* cache is offline (resizing) */\n\n\ntypedef struct mb_stat {\n\tu_int32_t       mbs_cnt;        /* number of classes */\n#if defined(KERNEL) || defined(__LP64__)\n\tu_int32_t       mbs_pad;        /* padding */\n#endif /* KERNEL || __LP64__ */\n\tmb_class_stat_t mbs_class[1];   /* class array */\n} mb_stat_t;\n\n\n\n#endif  /* !_SYS_MBUF_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/mman.h",
    "content": "/*\n * Copyright (c) 2000-2020 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */\n/*-\n * Copyright (c) 1982, 1986, 1993\n *\tThe Regents of the University of California.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *\tThis product includes software developed by the University of\n *\tCalifornia, Berkeley and its contributors.\n * 4. Neither the name of the University nor the names of its contributors\n *    may be used to endorse or promote products derived from this software\n *    without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n *\t@(#)mman.h\t8.1 (Berkeley) 6/2/93\n */\n\n/*\n * Currently unsupported:\n *\n * [TYM]\tPOSIX_TYPED_MEM_ALLOCATE\n * [TYM]\tPOSIX_TYPED_MEM_ALLOCATE_CONTIG\n * [TYM]\tPOSIX_TYPED_MEM_MAP_ALLOCATABLE\n * [TYM]\tstruct posix_typed_mem_info\n * [TYM]\tposix_mem_offset()\n * [TYM]\tposix_typed_mem_get_info()\n * [TYM]\tposix_typed_mem_open()\n */\n\n#ifndef _SYS_MMAN_H_\n#define _SYS_MMAN_H_\n\n#include <sys/appleapiopts.h>\n#include <sys/cdefs.h>\n\n#include <sys/_types.h>\n\n/*\n * [various] The mode_t, off_t, and size_t types shall be defined as\n * described in <sys/types.h>\n */\n#include <sys/_types/_mode_t.h>\n#include <sys/_types/_off_t.h>\n#include <sys/_types/_size_t.h>\n\n#if __DARWIN_C_LEVEL >= 200809L\n#include <Availability.h>\n#endif /* __DARWIN_C_LEVEL */\n\n/*\n * Protections are chosen from these bits, or-ed together\n */\n#define PROT_NONE       0x00    /* [MC2] no permissions */\n#define PROT_READ       0x01    /* [MC2] pages can be read */\n#define PROT_WRITE      0x02    /* [MC2] pages can be written */\n#define PROT_EXEC       0x04    /* [MC2] pages can be executed */\n\n/*\n * Flags contain sharing type and options.\n * Sharing types; choose one.\n */\n#define MAP_SHARED      0x0001          /* [MF|SHM] share changes */\n#define MAP_PRIVATE     0x0002          /* [MF|SHM] changes are private */\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n#define MAP_COPY        MAP_PRIVATE     /* Obsolete */\n#endif  /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */\n\n/*\n * Other flags\n */\n#define MAP_FIXED        0x0010 /* [MF|SHM] interpret addr exactly */\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n#define MAP_RENAME       0x0020 /* Sun: rename private pages to file */\n#define MAP_NORESERVE    0x0040 /* Sun: don't reserve needed swap area */\n#define MAP_RESERVED0080 0x0080 /* previously unimplemented MAP_INHERIT */\n#define MAP_NOEXTEND     0x0100 /* for MAP_FILE, don't change file size */\n#define MAP_HASSEMAPHORE 0x0200 /* region may contain semaphores */\n#define MAP_NOCACHE      0x0400 /* don't cache pages for this mapping */\n#define MAP_JIT          0x0800 /* Allocate a region that will be used for JIT purposes */\n\n/*\n * Mapping type\n */\n#define MAP_FILE        0x0000  /* map from file (default) */\n#define MAP_ANON        0x1000  /* allocated from memory, swap space */\n#define MAP_ANONYMOUS   MAP_ANON\n\n/*\n * The MAP_RESILIENT_* flags can be used when the caller wants to map some\n * possibly unreliable memory and be able to access it safely, possibly\n * getting the wrong contents rather than raising any exception.\n * For safety reasons, such mappings have to be read-only (PROT_READ access\n * only).\n *\n * MAP_RESILIENT_CODESIGN:\n *      accessing this mapping will not generate code-signing violations,\n *\teven if the contents are tainted.\n * MAP_RESILIENT_MEDIA:\n *\taccessing this mapping will not generate an exception if the contents\n *\tare not available (unreachable removable or remote media, access beyond\n *\tend-of-file, ...).  Missing contents will be replaced with zeroes.\n */\n#define MAP_RESILIENT_CODESIGN  0x2000 /* no code-signing failures */\n#define MAP_RESILIENT_MEDIA     0x4000 /* no backing-store failures */\n\n#if defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500\n#define MAP_32BIT       0x8000          /* Return virtual addresses <4G only */\n#endif /* defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500 */\n\n\n/*\n * Flags used to support translated processes.\n */\n#define MAP_TRANSLATED_ALLOW_EXECUTE 0x20000 /* allow execute in translated processes */\n\n#define MAP_UNIX03       0x40000 /* UNIX03 compliance */\n\n#endif  /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */\n\n/*\n * Process memory locking\n */\n#define MCL_CURRENT     0x0001  /* [ML] Lock only current memory */\n#define MCL_FUTURE      0x0002  /* [ML] Lock all future memory as well */\n\n/*\n * Error return from mmap()\n */\n#define MAP_FAILED      ((void *)-1)    /* [MF|SHM] mmap failed */\n\n/*\n * msync() flags\n */\n#define MS_ASYNC        0x0001  /* [MF|SIO] return immediately */\n#define MS_INVALIDATE   0x0002  /* [MF|SIO] invalidate all cached data */\n#define MS_SYNC         0x0010  /* [MF|SIO] msync synchronously */\n\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n#define MS_KILLPAGES    0x0004  /* invalidate pages, leave mapped */\n#define MS_DEACTIVATE   0x0008  /* deactivate pages, leave mapped */\n\n#endif  /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */\n\n\n/*\n * Advice to madvise\n */\n#define POSIX_MADV_NORMAL       0       /* [MC1] no further special treatment */\n#define POSIX_MADV_RANDOM       1       /* [MC1] expect random page refs */\n#define POSIX_MADV_SEQUENTIAL   2       /* [MC1] expect sequential page refs */\n#define POSIX_MADV_WILLNEED     3       /* [MC1] will need these pages */\n#define POSIX_MADV_DONTNEED     4       /* [MC1] dont need these pages */\n\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n#define MADV_NORMAL             POSIX_MADV_NORMAL\n#define MADV_RANDOM             POSIX_MADV_RANDOM\n#define MADV_SEQUENTIAL         POSIX_MADV_SEQUENTIAL\n#define MADV_WILLNEED           POSIX_MADV_WILLNEED\n#define MADV_DONTNEED           POSIX_MADV_DONTNEED\n#define MADV_FREE               5       /* pages unneeded, discard contents */\n#define MADV_ZERO_WIRED_PAGES   6       /* zero the wired pages that have not been unwired before the entry is deleted */\n#define MADV_FREE_REUSABLE      7       /* pages can be reused (by anyone) */\n#define MADV_FREE_REUSE         8       /* caller wants to reuse those pages */\n#define MADV_CAN_REUSE          9\n#define MADV_PAGEOUT            10      /* page out now (internal only) */\n\n/*\n * Return bits from mincore\n */\n#define MINCORE_INCORE           0x1     /* Page is incore */\n#define MINCORE_REFERENCED       0x2     /* Page has been referenced by us */\n#define MINCORE_MODIFIED         0x4     /* Page has been modified by us */\n#define MINCORE_REFERENCED_OTHER 0x8     /* Page has been referenced */\n#define MINCORE_MODIFIED_OTHER  0x10     /* Page has been modified */\n#define MINCORE_PAGED_OUT       0x20     /* Page has been paged out */\n#define MINCORE_COPIED          0x40     /* Page has been copied */\n#define MINCORE_ANONYMOUS       0x80     /* Page belongs to an anonymous object */\n#endif  /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */\n\n\n\n\n__BEGIN_DECLS\n/* [ML] */\nint     mlockall(int);\nint     munlockall(void);\n/* [MR] */\nint     mlock(const void *, size_t);\n#ifndef _MMAP\n#define _MMAP\n/* [MC3]*/\nvoid *  mmap(void *, size_t, int, int, int, off_t) __DARWIN_ALIAS(mmap);\n#endif\n/* [MPR] */\nint     mprotect(void *, size_t, int) __DARWIN_ALIAS(mprotect);\n/* [MF|SIO] */\nint     msync(void *, size_t, int) __DARWIN_ALIAS_C(msync);\n/* [MR] */\nint     munlock(const void *, size_t);\n/* [MC3]*/\nint     munmap(void *, size_t) __DARWIN_ALIAS(munmap);\n/* [SHM] */\nint     shm_open(const char *, int, ...);\nint     shm_unlink(const char *);\n/* [ADV] */\nint     posix_madvise(void *, size_t, int);\n\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\nint     madvise(void *, size_t, int);\nint     mincore(const void *, size_t, char *);\nint     minherit(void *, size_t, int);\n#endif\n\n\n__END_DECLS\n\n#endif /* !_SYS_MMAN_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/mount.h",
    "content": "/*\n * Copyright (c) 2000-2018 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */\n/*\n * Copyright (c) 1989, 1991, 1993\n *\tThe Regents of the University of California.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *\tThis product includes software developed by the University of\n *\tCalifornia, Berkeley and its contributors.\n * 4. Neither the name of the University nor the names of its contributors\n *    may be used to endorse or promote products derived from this software\n *    without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n *\t@(#)mount.h\t8.21 (Berkeley) 5/20/95\n */\n/*\n * NOTICE: This file was modified by SPARTA, Inc. in 2005 to introduce\n * support for mandatory and extensible security protections.  This notice\n * is included in support of clause 2.2 (b) of the Apple Public License,\n * Version 2.0.\n */\n\n\n#ifndef _SYS_MOUNT_H_\n#define _SYS_MOUNT_H_\n\n#include <sys/appleapiopts.h>\n#include <sys/cdefs.h>\n#include <sys/attr.h>           /* needed for vol_capabilities_attr_t */\n#include <os/base.h>\n\n#include <stdint.h>\n#include <sys/ucred.h>\n#include <sys/queue.h>          /* XXX needed for user builds */\n#include <Availability.h>\n\n#include <sys/_types/_fsid_t.h> /* file system id type */\n\n/*\n * file system statistics\n */\n\n#define MFSNAMELEN      15      /* length of fs type name, not inc. null */\n#define MFSTYPENAMELEN  16      /* length of fs type name including null */\n\n#if __DARWIN_64_BIT_INO_T\n#define MNAMELEN        MAXPATHLEN      /* length of buffer for returned name */\n#else /* ! __DARWIN_64_BIT_INO_T */\n#define MNAMELEN        90              /* length of buffer for returned name */\n#endif /* __DARWIN_64_BIT_INO_T */\n\n#define MNT_EXT_ROOT_DATA_VOL      0x00000001      /* Data volume of root volume group */\n\n#define __DARWIN_STRUCT_STATFS64 { \\\n\tuint32_t\tf_bsize;        /* fundamental file system block size */ \\\n\tint32_t\t\tf_iosize;       /* optimal transfer block size */ \\\n\tuint64_t\tf_blocks;       /* total data blocks in file system */ \\\n\tuint64_t\tf_bfree;        /* free blocks in fs */ \\\n\tuint64_t\tf_bavail;       /* free blocks avail to non-superuser */ \\\n\tuint64_t\tf_files;        /* total file nodes in file system */ \\\n\tuint64_t\tf_ffree;        /* free file nodes in fs */ \\\n\tfsid_t\t\tf_fsid;         /* file system id */ \\\n\tuid_t\t\tf_owner;        /* user that mounted the filesystem */ \\\n\tuint32_t\tf_type;         /* type of filesystem */ \\\n\tuint32_t\tf_flags;        /* copy of mount exported flags */ \\\n\tuint32_t\tf_fssubtype;    /* fs sub-type (flavor) */ \\\n\tchar\t\tf_fstypename[MFSTYPENAMELEN];   /* fs type name */ \\\n\tchar\t\tf_mntonname[MAXPATHLEN];        /* directory on which mounted */ \\\n\tchar\t\tf_mntfromname[MAXPATHLEN];      /* mounted filesystem */ \\\n\tuint32_t    f_flags_ext;    /* extended flags */ \\\n\tuint32_t\tf_reserved[7];  /* For future use */ \\\n}\n\n#if !__DARWIN_ONLY_64_BIT_INO_T\n\nstruct statfs64 __DARWIN_STRUCT_STATFS64;\n\n#endif /* !__DARWIN_ONLY_64_BIT_INO_T */\n\n#if __DARWIN_64_BIT_INO_T\n\nstruct statfs __DARWIN_STRUCT_STATFS64;\n\n#else /* !__DARWIN_64_BIT_INO_T */\n\n/*\n * LP64 - WARNING - must be kept in sync with struct user_statfs in mount_internal.h.\n */\nstruct statfs {\n\tshort   f_otype;                /* TEMPORARY SHADOW COPY OF f_type */\n\tshort   f_oflags;               /* TEMPORARY SHADOW COPY OF f_flags */\n\tlong    f_bsize;                /* fundamental file system block size */\n\tlong    f_iosize;               /* optimal transfer block size */\n\tlong    f_blocks;               /* total data blocks in file system */\n\tlong    f_bfree;                /* free blocks in fs */\n\tlong    f_bavail;               /* free blocks avail to non-superuser */\n\tlong    f_files;                /* total file nodes in file system */\n\tlong    f_ffree;                /* free file nodes in fs */\n\tfsid_t  f_fsid;                 /* file system id */\n\tuid_t   f_owner;                /* user that mounted the filesystem */\n\tshort   f_reserved1;    /* spare for later */\n\tshort   f_type;                 /* type of filesystem */\n\tlong    f_flags;                /* copy of mount exported flags */\n\tlong    f_reserved2[2]; /* reserved for future use */\n\tchar    f_fstypename[MFSNAMELEN]; /* fs type name */\n\tchar    f_mntonname[MNAMELEN];  /* directory on which mounted */\n\tchar    f_mntfromname[MNAMELEN];/* mounted filesystem */\n\tchar    f_reserved3;    /* For alignment */\n\tlong    f_reserved4[4]; /* For future use */\n};\n\n#endif /* __DARWIN_64_BIT_INO_T */\n\n#pragma pack(4)\n\nstruct vfsstatfs {\n\tuint32_t        f_bsize;        /* fundamental file system block size */\n\tsize_t          f_iosize;       /* optimal transfer block size */\n\tuint64_t        f_blocks;       /* total data blocks in file system */\n\tuint64_t        f_bfree;        /* free blocks in fs */\n\tuint64_t        f_bavail;       /* free blocks avail to non-superuser */\n\tuint64_t        f_bused;        /* free blocks avail to non-superuser */\n\tuint64_t        f_files;        /* total file nodes in file system */\n\tuint64_t        f_ffree;        /* free file nodes in fs */\n\tfsid_t          f_fsid;         /* file system id */\n\tuid_t           f_owner;        /* user that mounted the filesystem */\n\tuint64_t        f_flags;        /* copy of mount exported flags */\n\tchar            f_fstypename[MFSTYPENAMELEN];/* fs type name inclus */\n\tchar            f_mntonname[MAXPATHLEN];/* directory on which mounted */\n\tchar            f_mntfromname[MAXPATHLEN];/* mounted filesystem */\n\tuint32_t        f_fssubtype;     /* fs sub-type (flavor) */\n\tvoid            *f_reserved[2];         /* For future use == 0 */\n};\n\n#pragma pack()\n\n\n/*\n * User specifiable flags.\n *\n * Unmount uses MNT_FORCE flag.\n */\n#define MNT_RDONLY      0x00000001      /* read only filesystem */\n#define MNT_SYNCHRONOUS 0x00000002      /* file system written synchronously */\n#define MNT_NOEXEC      0x00000004      /* can't exec from filesystem */\n#define MNT_NOSUID      0x00000008      /* don't honor setuid bits on fs */\n#define MNT_NODEV       0x00000010      /* don't interpret special files */\n#define MNT_UNION       0x00000020      /* union with underlying filesystem */\n#define MNT_ASYNC       0x00000040      /* file system written asynchronously */\n#define MNT_CPROTECT    0x00000080      /* file system supports content protection */\n\n/*\n * NFS export related mount flags.\n */\n#define MNT_EXPORTED    0x00000100      /* file system is exported */\n\n/*\n * Denotes storage which can be removed from the system by the user.\n */\n\n#define MNT_REMOVABLE   0x00000200\n\n/*\n * MAC labeled / \"quarantined\" flag\n */\n#define MNT_QUARANTINE  0x00000400      /* file system is quarantined */\n\n/*\n * Flags set by internal operations.\n */\n#define MNT_LOCAL       0x00001000      /* filesystem is stored locally */\n#define MNT_QUOTA       0x00002000      /* quotas are enabled on filesystem */\n#define MNT_ROOTFS      0x00004000      /* identifies the root filesystem */\n#define MNT_DOVOLFS     0x00008000      /* FS supports volfs (deprecated flag in Mac OS X 10.5) */\n\n\n#define MNT_DONTBROWSE  0x00100000      /* file system is not appropriate path to user data */\n#define MNT_IGNORE_OWNERSHIP 0x00200000 /* VFS will ignore ownership information on filesystem objects */\n#define MNT_AUTOMOUNTED 0x00400000      /* filesystem was mounted by automounter */\n#define MNT_JOURNALED   0x00800000      /* filesystem is journaled */\n#define MNT_NOUSERXATTR 0x01000000      /* Don't allow user extended attributes */\n#define MNT_DEFWRITE    0x02000000      /* filesystem should defer writes */\n#define MNT_MULTILABEL  0x04000000      /* MAC support for individual labels */\n#define MNT_NOATIME             0x10000000      /* disable update of file access time */\n#define MNT_SNAPSHOT    0x40000000 /* The mount is a snapshot */\n#define MNT_STRICTATIME 0x80000000      /* enable strict update of file access time */\n\n/* backwards compatibility only */\n#define MNT_UNKNOWNPERMISSIONS MNT_IGNORE_OWNERSHIP\n\n\n/*\n * XXX I think that this could now become (~(MNT_CMDFLAGS))\n * but the 'mount' program may need changing to handle this.\n */\n#define MNT_VISFLAGMASK (MNT_RDONLY\t| MNT_SYNCHRONOUS | MNT_NOEXEC\t| \\\n\t                MNT_NOSUID\t| MNT_NODEV\t| MNT_UNION\t| \\\n\t                MNT_ASYNC\t| MNT_EXPORTED\t| MNT_QUARANTINE | \\\n\t                MNT_LOCAL\t| MNT_QUOTA | MNT_REMOVABLE | \\\n\t                MNT_ROOTFS\t| MNT_DOVOLFS\t| MNT_DONTBROWSE | \\\n\t                MNT_IGNORE_OWNERSHIP | MNT_AUTOMOUNTED | MNT_JOURNALED | \\\n\t                MNT_NOUSERXATTR | MNT_DEFWRITE\t| MNT_MULTILABEL | \\\n\t                MNT_NOATIME | MNT_STRICTATIME | MNT_SNAPSHOT | MNT_CPROTECT)\n/*\n * External filesystem command modifier flags.\n * Unmount can use the MNT_FORCE flag.\n * XXX These are not STATES and really should be somewhere else.\n * External filesystem control flags.\n */\n#define MNT_UPDATE      0x00010000      /* not a real mount, just an update */\n#define MNT_NOBLOCK     0x00020000      /* don't block unmount if not responding */\n#define MNT_RELOAD      0x00040000      /* reload filesystem data */\n#define MNT_FORCE       0x00080000      /* force unmount or readonly change */\n#define MNT_CMDFLAGS    (MNT_UPDATE|MNT_NOBLOCK|MNT_RELOAD|MNT_FORCE)\n\n\n\n/*\n * Sysctl CTL_VFS definitions.\n *\n * Second level identifier specifies which filesystem. Second level\n * identifier VFS_GENERIC returns information about all filesystems.\n */\n#define VFS_GENERIC             0       /* generic filesystem information */\n#define VFS_NUMMNTOPS           1       /* int: total num of vfs mount/unmount operations */\n/*\n * Third level identifiers for VFS_GENERIC are given below; third\n * level identifiers for specific filesystems are given in their\n * mount specific header files.\n */\n#define VFS_MAXTYPENUM  1       /* int: highest defined filesystem type */\n#define VFS_CONF        2       /* struct: vfsconf for filesystem given\n\t                         *  as next argument */\n\n/*\n * Flags for various system call interfaces.\n *\n * waitfor flags to vfs_sync() and getfsstat()\n */\n#define MNT_WAIT        1       /* synchronized I/O file integrity completion */\n#define MNT_NOWAIT      2       /* start all I/O, but do not wait for it */\n#define MNT_DWAIT       4       /* synchronized I/O data integrity completion */\n\n\n#if !defined(KERNEL) && !defined(_KERN_SYS_KERNELTYPES_H_) /* also defined in kernel_types.h */\nstruct mount;\ntypedef struct mount * mount_t;\nstruct vnode;\ntypedef struct vnode * vnode_t;\n#endif\n\n/* Reserved fields preserve binary compatibility */\nstruct vfsconf {\n\tuint32_t vfc_reserved1;         /* opaque */\n\tchar    vfc_name[MFSNAMELEN];   /* filesystem type name */\n\tint     vfc_typenum;            /* historic filesystem type number */\n\tint     vfc_refcount;           /* number mounted of this type */\n\tint     vfc_flags;              /* permanent flags */\n\tuint32_t vfc_reserved2;         /* opaque */\n\tuint32_t vfc_reserved3;         /* opaque */\n};\n\nstruct vfsidctl {\n\tint             vc_vers;        /* should be VFSIDCTL_VERS1 (below) */\n\tfsid_t          vc_fsid;        /* fsid to operate on. */\n\tvoid            *vc_ptr;        /* pointer to data structure. */\n\tsize_t          vc_len;         /* sizeof said structure. */\n\tu_int32_t       vc_spare[12];   /* spare (must be zero). */\n};\n\n\n/* vfsidctl API version. */\n#define VFS_CTL_VERS1   0x01\n\n\n/*\n * New style VFS sysctls, do not reuse/conflict with the namespace for\n * private sysctls.\n */\n#define VFS_CTL_OSTATFS 0x00010001      /* old legacy statfs */\n#define VFS_CTL_UMOUNT  0x00010002      /* unmount */\n#define VFS_CTL_QUERY   0x00010003      /* anything wrong? (vfsquery) */\n#define VFS_CTL_NEWADDR 0x00010004      /* reconnect to new address */\n#define VFS_CTL_TIMEO   0x00010005      /* set timeout for vfs notification */\n#define VFS_CTL_NOLOCKS 0x00010006      /* disable file locking */\n#define VFS_CTL_SADDR   0x00010007      /* get server address */\n#define VFS_CTL_DISC    0x00010008      /* server disconnected */\n#define VFS_CTL_SERVERINFO  0x00010009  /* information about fs server */\n#define VFS_CTL_NSTATUS 0x0001000A      /* netfs mount status */\n#define VFS_CTL_STATFS64 0x0001000B     /* statfs64 */\n\n/*\n * Automatically select the correct VFS_CTL_*STATFS* flavor based\n * on what \"struct statfs\" layout the client will use.\n */\n#if __DARWIN_64_BIT_INO_T\n#define VFS_CTL_STATFS  VFS_CTL_STATFS64\n#else\n#define VFS_CTL_STATFS  VFS_CTL_OSTATFS\n#endif\n\nstruct vfsquery {\n\tu_int32_t       vq_flags;\n\tu_int32_t       vq_spare[31];\n};\n\nstruct vfs_server {\n\tint32_t  vs_minutes;                    /* minutes until server goes down. */\n\tu_int8_t vs_server_name[MAXHOSTNAMELEN * 3]; /* UTF8 server name to display (null terminated) */\n};\n\n/*\n * NetFS mount status - returned by VFS_CTL_NSTATUS\n */\nstruct netfs_status {\n\tu_int32_t       ns_status;              // Current status of mount (vfsquery flags)\n\tchar            ns_mountopts[512];      // Significant mount options\n\tuint32_t        ns_waittime;            // Time waiting for reply (sec)\n\tuint32_t        ns_threadcount;         // Number of threads blocked on network calls\n\tuint64_t        ns_threadids[0];        // Thread IDs of those blocked threads\n};\n\n/* vfsquery flags */\n#define VQ_NOTRESP      0x0001  /* server down */\n#define VQ_NEEDAUTH     0x0002  /* server bad auth */\n#define VQ_LOWDISK      0x0004  /* we're low on space */\n#define VQ_MOUNT        0x0008  /* new filesystem arrived */\n#define VQ_UNMOUNT      0x0010  /* filesystem has left */\n#define VQ_DEAD         0x0020  /* filesystem is dead, needs force unmount */\n#define VQ_ASSIST       0x0040  /* filesystem needs assistance from external program */\n#define VQ_NOTRESPLOCK  0x0080  /* server lockd down */\n#define VQ_UPDATE       0x0100  /* filesystem information has changed */\n#define VQ_VERYLOWDISK  0x0200  /* file system has *very* little disk space left */\n#define VQ_SYNCEVENT    0x0400  /* a sync just happened (not set by kernel starting Mac OS X 10.9) */\n#define VQ_SERVEREVENT  0x0800  /* server issued notification/warning */\n#define VQ_QUOTA        0x1000  /* a user quota has been hit */\n#define VQ_NEARLOWDISK          0x2000  /* Above lowdisk and below desired disk space */\n#define VQ_DESIRED_DISK         0x4000  /* the desired disk space */\n#define VQ_FREE_SPACE_CHANGE    0x8000  /* free disk space has significantly changed */\n#define VQ_FLAG10000    0x10000  /* placeholder */\n\n\n\n/*\n * Generic file handle\n */\n#define NFS_MAX_FH_SIZE         NFSV4_MAX_FH_SIZE\n#define NFSV4_MAX_FH_SIZE       128\n#define NFSV3_MAX_FH_SIZE       64\n#define NFSV2_MAX_FH_SIZE       32\nstruct fhandle {\n\tunsigned int    fh_len;                         /* length of file handle */\n\tunsigned char   fh_data[NFS_MAX_FH_SIZE];       /* file handle value */\n};\ntypedef struct fhandle  fhandle_t;\n\n\n\n__BEGIN_DECLS\nint     fhopen(const struct fhandle *, int);\nint     fstatfs(int, struct statfs *) __DARWIN_INODE64(fstatfs);\n#if !__DARWIN_ONLY_64_BIT_INO_T\nint     fstatfs64(int, struct statfs64 *) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_6, __IPHONE_NA, __IPHONE_NA);\n#endif /* !__DARWIN_ONLY_64_BIT_INO_T */\nint     getfh(const char *, fhandle_t *);\nint     getfsstat(struct statfs *, int, int) __DARWIN_INODE64(getfsstat);\n#if !__DARWIN_ONLY_64_BIT_INO_T\nint     getfsstat64(struct statfs64 *, int, int) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_6, __IPHONE_NA, __IPHONE_NA);\n#endif /* !__DARWIN_ONLY_64_BIT_INO_T */\nint     getmntinfo(struct statfs **, int) __DARWIN_INODE64(getmntinfo);\nint     getmntinfo_r_np(struct statfs **, int) __DARWIN_INODE64(getmntinfo_r_np)\n__OSX_AVAILABLE(10.13) __IOS_AVAILABLE(11.0)\n__TVOS_AVAILABLE(11.0) __WATCHOS_AVAILABLE(4.0);\n#if !__DARWIN_ONLY_64_BIT_INO_T\nint     getmntinfo64(struct statfs64 **, int) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_6, __IPHONE_NA, __IPHONE_NA);\n#endif /* !__DARWIN_ONLY_64_BIT_INO_T */\nint     mount(const char *, const char *, int, void *);\nint     fmount(const char *, int, int, void *) __OSX_AVAILABLE(10.13) __IOS_AVAILABLE(11.0) __TVOS_AVAILABLE(11.0) __WATCHOS_AVAILABLE(4.0);\nint     statfs(const char *, struct statfs *) __DARWIN_INODE64(statfs);\n#if !__DARWIN_ONLY_64_BIT_INO_T\nint     statfs64(const char *, struct statfs64 *) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_6, __IPHONE_NA, __IPHONE_NA);\n#endif /* !__DARWIN_ONLY_64_BIT_INO_T */\nint     unmount(const char *, int);\nint     getvfsbyname(const char *, struct vfsconf *);\n__END_DECLS\n\n#endif /* !_SYS_MOUNT_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/msg.h",
    "content": "/*\n * Copyright (c) 2000-2007 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/*\t$NetBSD: msg.h,v 1.4 1994/06/29 06:44:43 cgd Exp $\t*/\n\n/*\n * SVID compatible msg.h file\n *\n * Author:  Daniel Boulet\n *\n * Copyright 1993 Daniel Boulet and RTMX Inc.\n *\n * This system call was implemented by Daniel Boulet under contract from RTMX.\n *\n * Redistribution and use in source forms, with and without modification,\n * are permitted provided that this entire comment appears intact.\n *\n * Redistribution in binary form may occur without any restrictions.\n * Obviously, it would be nice if you gave credit where credit is due\n * but requiring it would be too onerous.\n *\n * This software is provided ``AS IS'' without any warranties of any kind.\n */\n/*\n * NOTICE: This file was modified by SPARTA, Inc. in 2005 to introduce\n * support for mandatory and extensible security protections.  This notice\n * is included in support of clause 2.2 (b) of the Apple Public License,\n * Version 2.0.\n */\n\n#ifndef _SYS_MSG_H_\n#define _SYS_MSG_H_\n\n#include <sys/appleapiopts.h>\n\n#include <sys/_types.h>\n#include <sys/cdefs.h>\n\n/*\n * [XSI] All of the symbols from <sys/ipc.h> SHALL be defined when this\n * header is included\n */\n#include <sys/ipc.h>\n\n\n/*\n * [XSI] The pid_t, time_t, key_t, size_t, and ssize_t types shall be\n * defined as described in <sys/types.h>.\n *\n * NOTE:\tThe definition of the key_t type is implicit from the\n *\t\tinclusion of <sys/ipc.h>\n */\n#include <sys/_types/_pid_t.h>\n#include <sys/_types/_time_t.h>\n#include <sys/_types/_size_t.h>\n#include <sys/_types/_ssize_t.h>\n\n/* [XSI] Used for the number of messages in the message queue */\ntypedef unsigned long           msgqnum_t;\n\n/* [XSI] Used for the number of bytes allowed in a message queue */\ntypedef unsigned long           msglen_t;\n\n/*\n * Possible values for the fifth parameter to msgrcv(), in addition to the\n * IPC_NOWAIT flag, which is permitted.\n */\n#define MSG_NOERROR     010000          /* [XSI] No error if big message */\n\n\n/*\n * Technically, we should force all code references to the new structure\n * definition, not in just the standards conformance case, and leave the\n * legacy interface there for binary compatibility only.  Currently, we\n * are only forcing this for programs requesting standards conformance.\n */\n#if __DARWIN_UNIX03 || defined(KERNEL)\n#pragma pack(4)\n/*\n * Structure used internally.\n *\n * Structure whose address is passed as the third parameter to msgctl()\n * when the second parameter is IPC_SET or IPC_STAT.  In the case of the\n * IPC_SET command, only the msg_perm.{uid|gid|perm} and msg_qbytes are\n * honored.  In the case of IPC_STAT, only the fields indicated as [XSI]\n * mandated fields are guaranteed to meaningful: DO NOT depend on the\n * contents of the other fields.\n *\n * NOTES:\tReserved fields are not preserved across IPC_SET/IPC_STAT.\n */\n#if (defined(_POSIX_C_SOURCE) && !defined(_DARWIN_C_SOURCE))\nstruct msqid_ds\n#else\n#define msqid_ds        __msqid_ds_new\nstruct __msqid_ds_new\n#endif\n{\n\tstruct __ipc_perm_new   msg_perm; /* [XSI] msg queue permissions */\n\t__int32_t       msg_first;      /* RESERVED: kernel use only */\n\t__int32_t       msg_last;       /* RESERVED: kernel use only */\n\tmsglen_t        msg_cbytes;     /* # of bytes on the queue */\n\tmsgqnum_t       msg_qnum;       /* [XSI] number of msgs on the queue */\n\tmsglen_t        msg_qbytes;     /* [XSI] max bytes on the queue */\n\tpid_t           msg_lspid;      /* [XSI] pid of last msgsnd() */\n\tpid_t           msg_lrpid;      /* [XSI] pid of last msgrcv() */\n\ttime_t          msg_stime;      /* [XSI] time of last msgsnd() */\n\t__int32_t       msg_pad1;       /* RESERVED: DO NOT USE */\n\ttime_t          msg_rtime;      /* [XSI] time of last msgrcv() */\n\t__int32_t       msg_pad2;       /* RESERVED: DO NOT USE */\n\ttime_t          msg_ctime;      /* [XSI] time of last msgctl() */\n\t__int32_t       msg_pad3;       /* RESERVED: DO NOT USE */\n\t__int32_t       msg_pad4[4];    /* RESERVED: DO NOT USE */\n};\n#pragma pack()\n#else   /* !__DARWIN_UNIX03 */\n#define msqid_ds        __msqid_ds_old\n#endif  /* !__DARWIN_UNIX03 */\n\n#if !__DARWIN_UNIX03\nstruct __msqid_ds_old {\n\tstruct __ipc_perm_old   msg_perm; /* [XSI] msg queue permissions */\n\t__int32_t       msg_first;      /* RESERVED: kernel use only */\n\t__int32_t       msg_last;       /* RESERVED: kernel use only */\n\tmsglen_t        msg_cbytes;     /* # of bytes on the queue */\n\tmsgqnum_t       msg_qnum;       /* [XSI] number of msgs on the queue */\n\tmsglen_t        msg_qbytes;     /* [XSI] max bytes on the queue */\n\tpid_t           msg_lspid;      /* [XSI] pid of last msgsnd() */\n\tpid_t           msg_lrpid;      /* [XSI] pid of last msgrcv() */\n\ttime_t          msg_stime;      /* [XSI] time of last msgsnd() */\n\t__int32_t       msg_pad1;       /* RESERVED: DO NOT USE */\n\ttime_t          msg_rtime;      /* [XSI] time of last msgrcv() */\n\t__int32_t       msg_pad2;       /* RESERVED: DO NOT USE */\n\ttime_t          msg_ctime;      /* [XSI] time of last msgctl() */\n\t__int32_t       msg_pad3;       /* RESERVED: DO NOT USE */\n\t__int32_t       msg_pad4[4];    /* RESERVED: DO NOT USE */\n};\n#endif  /* !__DARWIN_UNIX03 */\n\n\n\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n#ifdef __APPLE_API_UNSTABLE\n/* XXX kernel only; protect with macro later */\n\nstruct msg {\n\tstruct msg      *msg_next;      /* next msg in the chain */\n\tlong            msg_type;       /* type of this message */\n\t                                /* >0 -> type of this message */\n\t                                /* 0 -> free header */\n\tunsigned short  msg_ts;         /* size of this message */\n\tshort           msg_spot;       /* location of msg start in buffer */\n\tstruct label    *label;         /* MAC label */\n};\n\n/*\n * Example structure describing a message whose address is to be passed as\n * the second argument to the functions msgrcv() and msgsnd().  The only\n * actual hard requirement is that the first field be of type long, and\n * contain the message type.  The user is encouraged to define their own\n * application specific structure; this definition is included solely for\n * backward compatability with existing source code.\n */\nstruct mymsg {\n\tlong    mtype;          /* message type (+ve integer) */\n\tchar    mtext[1];       /* message body */\n};\n\n/*\n * Based on the configuration parameters described in an SVR2 (yes, two)\n * config(1m) man page.\n *\n * Each message is broken up and stored in segments that are msgssz bytes\n * long.  For efficiency reasons, this should be a power of two.  Also,\n * it doesn't make sense if it is less than 8 or greater than about 256.\n * Consequently, msginit in kern/sysv_msg.c checks that msgssz is a power of\n * two between 8 and 1024 inclusive (and panic's if it isn't).\n */\nstruct msginfo {\n\tint     msgmax,         /* max chars in a message */\n\t    msgmni,             /* max message queue identifiers */\n\t    msgmnb,             /* max chars in a queue */\n\t    msgtql,             /* max messages in system */\n\t    msgssz,             /* size of a message segment (see notes above) */\n\t    msgseg;             /* number of message segments */\n};\n#endif  /* __APPLE_API_UNSTABLE */\n#endif  /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */\n\n\n__BEGIN_DECLS\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\nint msgsys(int, ...);\n#endif  /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */\nint msgctl(int, int, struct msqid_ds *) __DARWIN_ALIAS(msgctl);\nint msgget(key_t, int);\nssize_t msgrcv(int, void *, size_t, long, int) __DARWIN_ALIAS_C(msgrcv);\nint msgsnd(int, const void *, size_t, int) __DARWIN_ALIAS_C(msgsnd);\n__END_DECLS\n\n\n#endif /* !_SYS_MSG_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/msgbuf.h",
    "content": "/*\n * Copyright (c) 2000-2010 Apple, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */\n/*\n * Copyright (c) 1981, 1984, 1993\n *\tThe Regents of the University of California.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *\tThis product includes software developed by the University of\n *\tCalifornia, Berkeley and its contributors.\n * 4. Neither the name of the University nor the names of its contributors\n *    may be used to endorse or promote products derived from this software\n *    without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n *\t@(#)msgbuf.h\t8.1 (Berkeley) 6/2/93\n */\n#ifndef _SYS_MSGBUF_H_\n#define _SYS_MSGBUF_H_\n\n#include <sys/cdefs.h>\n\n#define MAX_MSG_BSIZE   (1*1024*1024)\nstruct  msgbuf {\n#define MSG_MAGIC       0x063061\n\tint             msg_magic;\n\tint             msg_size;\n\tint             msg_bufx;               /* write pointer */\n\tint             msg_bufr;               /* read pointer */\n\tchar    *msg_bufc;              /* buffer */\n};\n\n\n#endif  /* !_SYS_MSGBUF_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/netport.h",
    "content": "/*\n * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */\n/*\n * Copyright (c) 1987,1988,1989 Carnegie-Mellon University All rights reserved.\n */\n#ifndef _SYS_NETPORT_H_\n#define _SYS_NETPORT_H_\n\n#include <_types/_uint32_t.h> /* uint32_t */\n\ntypedef uint32_t        netaddr_t;\n\n/*\n * Network Port structure.\n */\ntypedef struct {\n\tlong        np_uid_high;\n\tlong        np_uid_low;\n} np_uid_t;\n\ntypedef struct {\n\tnetaddr_t   np_receiver;\n\tnetaddr_t   np_owner;\n\tnp_uid_t    np_puid;\n\tnp_uid_t    np_sid;\n} network_port_t;\n\n#endif  /* !_SYS_NETPORT_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/param.h",
    "content": "/*\n * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/* Copyright (c) 1995, 1997 Apple Computer, Inc. All Rights Reserved */\n/*-\n * Copyright (c) 1982, 1986, 1989, 1993\n *\tThe Regents of the University of California.  All rights reserved.\n * (c) UNIX System Laboratories, Inc.\n * All or some portions of this file are derived from material licensed\n * to the University of California by American Telephone and Telegraph\n * Co. or Unix System Laboratories, Inc. and are reproduced herein with\n * the permission of UNIX System Laboratories, Inc.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *\tThis product includes software developed by the University of\n *\tCalifornia, Berkeley and its contributors.\n * 4. Neither the name of the University nor the names of its contributors\n *    may be used to endorse or promote products derived from this software\n *    without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n *\t@(#)param.h\t8.3 (Berkeley) 4/4/95\n */\n\n#ifndef _SYS_PARAM_H_\n#define _SYS_PARAM_H_\n\n#define BSD     199506          /* System version (year & month). */\n#define BSD4_3  1\n#define BSD4_4  1\n\n#define NeXTBSD 1995064         /* NeXTBSD version (year, month, release) */\n#define NeXTBSD4_0 0            /* NeXTBSD 4.0 */\n\n#include <sys/_types.h>\n#include <sys/_types/_null.h>\n\n#ifndef LOCORE\n#include <sys/types.h>\n#endif\n\n/*\n * Machine-independent constants (some used in following include files).\n * Redefined constants are from POSIX 1003.1 limits file.\n *\n * MAXCOMLEN should be >= sizeof(ac_comm) (see <acct.h>)\n * MAXLOGNAME should be >= UT_NAMESIZE (see <utmp.h>)\n */\n#include <sys/syslimits.h>\n\n#define MAXCOMLEN       16              /* max command name remembered */\n#define MAXINTERP       64              /* max interpreter file name length */\n#define MAXLOGNAME      255             /* max login name length */\n#define MAXUPRC         CHILD_MAX       /* max simultaneous processes */\n#define NCARGS          ARG_MAX         /* max bytes for an exec function */\n#define NGROUPS         NGROUPS_MAX     /* max number groups */\n#define NOFILE          256             /* default max open files per process */\n#define NOGROUP         65535           /* marker for empty group set member */\n#define MAXHOSTNAMELEN  256             /* max hostname size */\n#define MAXDOMNAMELEN   256             /* maximum domain name length */\n\n/* Machine type dependent parameters. */\n#include <machine/param.h>\n\n/* More types and definitions used throughout the kernel. */\n#include <limits.h>\n\n/* Signals. */\n#include <sys/signal.h>\n\n/*\n * Priorities.  Note that with 32 run queues, differences less than 4 are\n * insignificant.\n */\n#define PSWP    0\n#define PVM     4\n#define PINOD   8\n#define PRIBIO  16\n#define PVFS    20\n#define PZERO   22              /* No longer magic, shouldn't be here.  XXX */\n#define PSOCK   24\n#define PWAIT   32\n#define PLOCK   36\n#define PPAUSE  40\n#define PUSER   50\n#define MAXPRI  127             /* Priorities range from 0 through MAXPRI. */\n\n#define PRIMASK 0x0ff\n#define PCATCH  0x100           /* OR'd with pri for tsleep to check signals */\n#define PTTYBLOCK 0x200         /* for tty SIGTTOU and SIGTTIN blocking */\n#define PDROP   0x400           /* OR'd with pri to stop re-aquistion of mutex upon wakeup */\n#define PSPIN   0x800           /* OR'd with pri to require mutex in spin mode upon wakeup */\n\n#define NBPW    sizeof(int)     /* number of bytes per word (integer) */\n\n#define CMASK   022             /* default file mask: S_IWGRP|S_IWOTH */\n#define NODEV   (dev_t)(-1)     /* non-existent device */\n\n/*\n * Clustering of hardware pages on machines with ridiculously small\n * page sizes is done here.  The paging subsystem deals with units of\n * CLSIZE pte's describing NBPG (from machine/param.h) pages each.\n */\n#define CLBYTES         (CLSIZE*NBPG)\n#define CLOFSET         (CLSIZE*NBPG-1) /* for clusters, like PGOFSET */\n#define claligned(x)    ((((int)(x))&CLOFSET)==0)\n#define CLOFF           CLOFSET\n#define CLSHIFT         (PGSHIFT+CLSIZELOG2)\n\n#if CLSIZE == 1\n#define clbase(i)       (i)\n#define clrnd(i)        (i)\n#else\n/* Give the base virtual address (first of CLSIZE). */\n#define clbase(i)       ((i) &~ (CLSIZE-1))\n/* Round a number of clicks up to a whole cluster. */\n#define clrnd(i)        (((i) + (CLSIZE-1)) &~ (CLSIZE-1))\n#endif\n\n#define CBLOCK  64              /* Clist block size, must be a power of 2. */\n#define CBQSIZE (CBLOCK/NBBY)   /* Quote bytes/cblock - can do better. */\n                                /* Data chars/clist. */\n#define CBSIZE  (CBLOCK - sizeof(struct cblock *) - CBQSIZE)\n#define CROUND  (CBLOCK - 1)    /* Clist rounding. */\n\n/*\n * File system parameters and macros.\n *\n * The file system is made out of blocks of at most MAXPHYS units, with\n * smaller units (fragments) only in the last direct block.  MAXBSIZE\n * primarily determines the size of buffers in the buffer pool.  It may be\n * made larger than MAXPHYS without any effect on existing file systems;\n * however making it smaller may make some file systems unmountable.\n * We set this to track the value of MAX_UPL_TRANSFER_BYTES from\n * osfmk/mach/memory_object_types.h to bound it at the maximum UPL size.\n */\n#define MAXBSIZE        (256 * 4096)\n#define MAXPHYSIO       MAXPHYS\n#define MAXFRAG         8\n\n#define MAXPHYSIO_WIRED (16 * 1024 * 1024)\n\n/*\n * MAXPATHLEN defines the longest permissable path length after expanding\n * symbolic links. It is used to allocate a temporary buffer from the buffer\n * pool in which to do the name expansion, hence should be a power of two,\n * and must be less than or equal to MAXBSIZE.  MAXSYMLINKS defines the\n * maximum number of symbolic links that may be expanded in a path name.\n * It should be set high enough to allow all legitimate uses, but halt\n * infinite loops reasonably quickly.\n */\n#define MAXPATHLEN      PATH_MAX\n#define MAXSYMLINKS     32\n\n/* Bit map related macros. */\n#define setbit(a, i)     (((unsigned char *)(a))[(i)/NBBY] |= 1u<<((i)%NBBY))\n#define clrbit(a, i)     (((unsigned char *)(a))[(i)/NBBY] &= ~(1u<<((i)%NBBY)))\n#define isset(a, i)      (((unsigned char *)(a))[(i)/NBBY] & (1u<<((i)%NBBY)))\n#define isclr(a, i)      ((((unsigned char *)(a))[(i)/NBBY] & (1u<<((i)%NBBY))) == 0)\n\n/* Macros for counting and rounding. */\n#ifndef howmany\n#define howmany(x, y)   ((((x) % (y)) == 0) ? ((x) / (y)) : (((x) / (y)) + 1))\n#endif\n#define roundup(x, y)   ((((x) % (y)) == 0) ? \\\n\t                (x) : ((x) + ((y) - ((x) % (y)))))\n#define powerof2(x)     ((((x)-1)&(x))==0)\n\n/* Macros for min/max. */\n#ifndef MIN\n#define MIN(a, b) (((a)<(b))?(a):(b))\n#endif /* MIN */\n#ifndef MAX\n#define MAX(a, b) (((a)>(b))?(a):(b))\n#endif  /* MAX */\n\n/*\n * Scale factor for scaled integers used to count %cpu time and load avgs.\n *\n * The number of CPU `tick's that map to a unique `%age' can be expressed\n * by the formula (1 / (2 ^ (FSHIFT - 11))).  The maximum load average that\n * can be calculated (assuming 32 bits) can be closely approximated using\n * the formula (2 ^ (2 * (16 - FSHIFT))) for (FSHIFT < 15).\n *\n * For the scheduler to maintain a 1:1 mapping of CPU `tick' to `%age',\n * FSHIFT must be at least 11; this gives us a maximum load avg of ~1024.\n */\n#define FSHIFT  11              /* bits to right of fixed binary point */\n#define FSCALE  (1<<FSHIFT)\n\n#endif  /* _SYS_PARAM_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/paths.h",
    "content": "/*\n * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/*\t@(#)paths.h\t1.0\t11/13/00\t*/\n\n#ifndef _SYS_PATHS_H_\n#define _SYS_PATHS_H_\n\n#include <sys/appleapiopts.h>\n\n#ifdef __APPLE_API_PRIVATE\n\n/* Provides support for system wide forks */\n#define _PATH_FORKSPECIFIER    \"/..namedfork/\"\n#define _PATH_DATANAME         \"data\"\n#define _PATH_RSRCNAME         \"rsrc\"\n#define _PATH_RSRCFORKSPEC     \"/..namedfork/rsrc\"\n\n#endif /* __APPLE_API_PRIVATE */\n#endif /* !_SYS_PATHS_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/pipe.h",
    "content": "/*\n * Copyright (c) 2004-2020 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/*\n * Copyright (c) 1996 John S. Dyson\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice immediately at the beginning of the file, without modification,\n *    this list of conditions, and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. Absolutely no warranty of function or purpose is made by the author\n *    John S. Dyson.\n * 4. This work was done expressly for inclusion into FreeBSD.  Other use\n *    is allowed if this notation is included.\n * 5. Modifications may be freely made to this file if the above conditions\n *    are met.\n *\n * $FreeBSD: src/sys/sys/pipe.h,v 1.24 2003/08/13 20:01:38 alc Exp $\n */\n/*\n * NOTICE: This file was modified by SPARTA, Inc. in 2006 to introduce\n * support for mandatory and extensible security protections.  This notice\n * is included in support of clause 2.2 (b) of the Apple Public License,\n * Version 2.0.\n */\n\n#ifndef _SYS_PIPE_H_\n#define _SYS_PIPE_H_\n\n#include <sys/queue.h>                  /* for TAILQ macros */\n#include <sys/ev.h>\n#include <sys/cdefs.h>\n#include <sys/_types/_caddr_t.h>\n#include <sys/_types/_u_int.h>\n\n/*\n * Pipe buffer size, keep moderate in value, pipes take kva space.\n */\n#ifndef PIPE_SIZE\n#define PIPE_SIZE       16384\n#endif\n\n#define PIPE_KVAMAX     (1024 * 1024 * 16)\n\n#ifndef BIG_PIPE_SIZE\n#define BIG_PIPE_SIZE   (64*1024)\n#endif\n\n#ifndef SMALL_PIPE_SIZE\n#define SMALL_PIPE_SIZE PAGE_SIZE\n#endif\n\n/*\n * PIPE_MINDIRECT MUST be smaller than PIPE_SIZE and MUST be bigger\n * than PIPE_BUF.\n */\n#ifndef PIPE_MINDIRECT\n#define PIPE_MINDIRECT  8192\n#endif\n\n#define PIPENPAGES      (BIG_PIPE_SIZE / PAGE_SIZE + 1)\n\n/*\n * Pipe buffer information.\n * Separate in, out, cnt are used to simplify calculations.\n * Buffered write is active when the buffer.cnt field is set.\n */\nstruct pipebuf {\n\tu_int   cnt;            /* number of chars currently in buffer */\n\tu_int   in;             /* in pointer */\n\tu_int   out;            /* out pointer */\n\tu_int   size;           /* size of buffer */\n\tcaddr_t buffer; /* kva of buffer */\n};\n\n\n#ifdef PIPE_DIRECT\n/*\n * Information to support direct transfers between processes for pipes.\n */\nstruct pipemapping {\n\tvm_offset_t     kva;            /* kernel virtual address */\n\tvm_size_t       cnt;            /* number of chars in buffer */\n\tvm_size_t       pos;            /* current position of transfer */\n\tint             npages;         /* number of pages */\n\tvm_page_t       ms[PIPENPAGES]; /* pages in source process */\n};\n#endif\n\n/*\n * Bits in pipe_state.\n */\n#define PIPE_ASYNC      0x004   /* Async? I/O. */\n#define PIPE_WANTR      0x008   /* Reader wants some characters. */\n#define PIPE_WANTW      0x010   /* Writer wants space to put characters. */\n#define PIPE_WANT       0x020   /* Pipe is wanted to be run-down. */\n// was  PIPE_SEL        0x040   /* Pipe has a select active. */\n#define PIPE_EOF        0x080   /* Pipe is in EOF condition. */\n#define PIPE_LOCKFL     0x100   /* Process has exclusive access to pointers/data. */\n#define PIPE_LWANT      0x200   /* Process wants exclusive access to pointers/data. */\n#define PIPE_DIRECTW    0x400   /* Pipe direct write active. */\n#define PIPE_DIRECTOK   0x800   /* Direct mode ok. */\n// was  PIPE_KNOTE      0x1000\n#define PIPE_DRAIN      0x2000  /* Waiting for I/O to drop for a close.  Treated like EOF;\n\t                         *       only separate for easier debugging. */\n#define PIPE_WSELECT    0x4000  /* Some thread has done an FWRITE select on the pipe */\n#define PIPE_DEAD       0x8000  /* Pipe is dead and needs garbage collection */\n\n\n#endif /* !_SYS_PIPE_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/poll.h",
    "content": "/*\n * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/*-\n * Copyright (c) 1997 Peter Wemm <peter@freebsd.org>\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. The name of the author may not be used to endorse or promote products\n *    derived from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n */\n\n#ifndef _SYS_POLL_H_\n#define _SYS_POLL_H_\n\n/*\n * This file is intended to be compatible with the traditional poll.h.\n */\n\n/*\n * Requestable events.  If poll(2) finds any of these set, they are\n * copied to revents on return.\n */\n#define POLLIN          0x0001          /* any readable data available */\n#define POLLPRI         0x0002          /* OOB/Urgent readable data */\n#define POLLOUT         0x0004          /* file descriptor is writeable */\n#define POLLRDNORM      0x0040          /* non-OOB/URG data available */\n#define POLLWRNORM      POLLOUT         /* no write type differentiation */\n#define POLLRDBAND      0x0080          /* OOB/Urgent readable data */\n#define POLLWRBAND      0x0100          /* OOB/Urgent data can be written */\n\n/*\n * FreeBSD extensions: polling on a regular file might return one\n * of these events (currently only supported on local filesystems).\n */\n#define POLLEXTEND      0x0200          /* file may have been extended */\n#define POLLATTRIB      0x0400          /* file attributes may have changed */\n#define POLLNLINK       0x0800          /* (un)link/rename may have happened */\n#define POLLWRITE       0x1000          /* file's contents may have changed */\n\n/*\n * These events are set if they occur regardless of whether they were\n * requested.\n */\n#define POLLERR         0x0008          /* some poll error occurred */\n#define POLLHUP         0x0010          /* file descriptor was \"hung up\" */\n#define POLLNVAL        0x0020          /* requested events \"invalid\" */\n\n#define POLLSTANDARD    (POLLIN|POLLPRI|POLLOUT|POLLRDNORM|POLLRDBAND|\\\n\t                 POLLWRBAND|POLLERR|POLLHUP|POLLNVAL)\n\nstruct pollfd {\n\tint     fd;\n\tshort   events;\n\tshort   revents;\n};\n\ntypedef unsigned int nfds_t;\n\n\n#include <sys/cdefs.h>\n\n__BEGIN_DECLS\n\n/*\n * This is defined here (instead of <poll.h>) because this is where\n * traditional SVR4 code will look to find it.\n */\nextern int poll(struct pollfd *, nfds_t, int) __DARWIN_ALIAS_C(poll);\n\n__END_DECLS\n\n\n#endif /* !_SYS_POLL_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/posix_sem.h",
    "content": "/*\n * Copyright (c) 1999-2003 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/*\n *\tCopyright (c) 1990, 1996-1998 Apple Computer, Inc.\n *\tAll Rights Reserved.\n */\n/*\n * posix_shm.c : Support for POSIX semaphore APIs\n *\n *\tFile:\tposix_sem.c\n *\tAuthor:\tAnanthakrishna Ramesh\n *\n * HISTORY\n * 2-Sep-1999\tA.Ramesh\n *\tCreated for MacOSX\n *\n */\n\n#ifndef _SYS_POSIX_SEM_H_\n#define _SYS_POSIX_SEM_H_\n\n#include <sys/appleapiopts.h>\n#include <sys/types.h>\n#include <sys/proc.h>\n\nstruct label;\n\n#define PSEMNAMLEN      31      /* maximum name segment length we bother with */\n\nstruct pseminfo {\n\tunsigned int    psem_flags;\n\tunsigned int    psem_usecount;\n\tmode_t          psem_mode;\n\tuid_t           psem_uid;\n\tgid_t           psem_gid;\n\tchar            psem_name[PSEMNAMLEN + 1];      /* segment name */\n\tvoid *          psem_semobject;\n\tstruct label *  psem_label;\n\tpid_t           psem_creator_pid;\n\tuint64_t        psem_creator_uniqueid;\n};\n\n#define PSEMINFO_NULL (struct pseminfo *)0\n\n#define PSEM_NONE       1\n#define PSEM_DEFINED    2\n#define PSEM_ALLOCATED  4\n#define PSEM_MAPPED     8\n#define PSEM_INUSE      0x10\n#define PSEM_REMOVED    0x20\n#define PSEM_INCREATE   0x40\n#define PSEM_INDELETE   0x80\n\n#endif\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/posix_shm.h",
    "content": "/*\n * Copyright (c) 1999-2003 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/*\n *\tCopyright (c) 1990, 1996-1998 Apple Computer, Inc.\n *\tAll Rights Reserved.\n */\n/*\n * posix_shm.c : Support for POSIX shared memory APIs\n *\n *\tFile:\tposix_shm.c\n *\tAuthor:\tAnanthakrishna Ramesh\n *\n * HISTORY\n * 2-Sep-1999\tA.Ramesh\n *\tCreated for MacOSX\n *\n */\n\n#ifndef _SYS_POSIX_SHM_H_\n#define _SYS_POSIX_SHM_H_\n\n#include <sys/appleapiopts.h>\n#include <sys/types.h>\n#include <sys/proc.h>\n\nstruct label;\n\n#define PSHMNAMLEN      31      /* maximum name segment length we bother with */\n\nstruct pshminfo {\n\tunsigned int pshm_flags;\n\tunsigned int pshm_usecount;\n\toff_t        pshm_length;\n\tmode_t       pshm_mode;\n\tuid_t        pshm_uid;\n\tgid_t        pshm_gid;\n\tchar         pshm_name[PSHMNAMLEN + 1];\n\tvoid         *pshm_memobject;\n\tstruct label *pshm_label;\n};\n\n#endif\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/proc.h",
    "content": "/*\n * Copyright (c) 2000-2018 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/* Copyright (c) 1995, 1997 Apple Computer, Inc. All Rights Reserved */\n/*-\n * Copyright (c) 1986, 1989, 1991, 1993\n *\tThe Regents of the University of California.  All rights reserved.\n * (c) UNIX System Laboratories, Inc.\n * All or some portions of this file are derived from material licensed\n * to the University of California by American Telephone and Telegraph\n * Co. or Unix System Laboratories, Inc. and are reproduced herein with\n * the permission of UNIX System Laboratories, Inc.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *\tThis product includes software developed by the University of\n *\tCalifornia, Berkeley and its contributors.\n * 4. Neither the name of the University nor the names of its contributors\n *    may be used to endorse or promote products derived from this software\n *    without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n *\t@(#)proc.h\t8.15 (Berkeley) 5/19/95\n */\n\n#ifndef _SYS_PROC_H_\n#define _SYS_PROC_H_\n\n#include <sys/appleapiopts.h>\n#include <sys/cdefs.h>\n#include <sys/select.h>                 /* For struct selinfo. */\n#include <sys/queue.h>\n#include <sys/lock.h>\n#include <sys/param.h>\n#include <sys/event.h>\n#include <sys/time.h>\n#include <mach/boolean.h>\n\n\n#include <Availability.h>\n\n\nstruct session;\nstruct pgrp;\nstruct proc;\nstruct proc_ident;\n\n/* Exported fields for kern sysctls */\nstruct extern_proc {\n\tunion {\n\t\tstruct {\n\t\t\tstruct  proc *__p_forw; /* Doubly-linked run/sleep queue. */\n\t\t\tstruct  proc *__p_back;\n\t\t} p_st1;\n\t\tstruct timeval __p_starttime;   /* process start time */\n\t} p_un;\n#define p_forw p_un.p_st1.__p_forw\n#define p_back p_un.p_st1.__p_back\n#define p_starttime p_un.__p_starttime\n\tstruct  vmspace *p_vmspace;     /* Address space. */\n\tstruct  sigacts *p_sigacts;     /* Signal actions, state (PROC ONLY). */\n\tint     p_flag;                 /* P_* flags. */\n\tchar    p_stat;                 /* S* process status. */\n\tpid_t   p_pid;                  /* Process identifier. */\n\tpid_t   p_oppid;         /* Save parent pid during ptrace. XXX */\n\tint     p_dupfd;         /* Sideways return value from fdopen. XXX */\n\t/* Mach related  */\n\tcaddr_t user_stack;     /* where user stack was allocated */\n\tvoid    *exit_thread;   /* XXX Which thread is exiting? */\n\tint             p_debugger;             /* allow to debug */\n\tboolean_t       sigwait;        /* indication to suspend */\n\t/* scheduling */\n\tu_int   p_estcpu;        /* Time averaged value of p_cpticks. */\n\tint     p_cpticks;       /* Ticks of cpu time. */\n\tfixpt_t p_pctcpu;        /* %cpu for this process during p_swtime */\n\tvoid    *p_wchan;        /* Sleep address. */\n\tchar    *p_wmesg;        /* Reason for sleep. */\n\tu_int   p_swtime;        /* Time swapped in or out. */\n\tu_int   p_slptime;       /* Time since last blocked. */\n\tstruct  itimerval p_realtimer;  /* Alarm timer. */\n\tstruct  timeval p_rtime;        /* Real time. */\n\tu_quad_t p_uticks;              /* Statclock hits in user mode. */\n\tu_quad_t p_sticks;              /* Statclock hits in system mode. */\n\tu_quad_t p_iticks;              /* Statclock hits processing intr. */\n\tint     p_traceflag;            /* Kernel trace points. */\n\tstruct  vnode *p_tracep;        /* Trace to vnode. */\n\tint     p_siglist;              /* DEPRECATED. */\n\tstruct  vnode *p_textvp;        /* Vnode of executable. */\n\tint     p_holdcnt;              /* If non-zero, don't swap. */\n\tsigset_t p_sigmask;     /* DEPRECATED. */\n\tsigset_t p_sigignore;   /* Signals being ignored. */\n\tsigset_t p_sigcatch;    /* Signals being caught by user. */\n\tu_char  p_priority;     /* Process priority. */\n\tu_char  p_usrpri;       /* User-priority based on p_cpu and p_nice. */\n\tchar    p_nice;         /* Process \"nice\" value. */\n\tchar    p_comm[MAXCOMLEN + 1];\n\tstruct  pgrp *p_pgrp;   /* Pointer to process group. */\n\tstruct  user *p_addr;   /* Kernel virtual addr of u-area (PROC ONLY). */\n\tu_short p_xstat;        /* Exit status for wait; also stop signal. */\n\tu_short p_acflag;       /* Accounting flags. */\n\tstruct  rusage *p_ru;   /* Exit information. XXX */\n};\n\n\n/* Status values. */\n#define SIDL    1               /* Process being created by fork. */\n#define SRUN    2               /* Currently runnable. */\n#define SSLEEP  3               /* Sleeping on an address. */\n#define SSTOP   4               /* Process debugging or suspension. */\n#define SZOMB   5               /* Awaiting collection by parent. */\n\n/* These flags are kept in extern_proc.p_flag. */\n#define P_ADVLOCK       0x00000001      /* Process may hold POSIX adv. lock */\n#define P_CONTROLT      0x00000002      /* Has a controlling terminal */\n#define P_LP64          0x00000004      /* Process is LP64 */\n#define P_NOCLDSTOP     0x00000008      /* No SIGCHLD when children stop */\n\n#define P_PPWAIT        0x00000010      /* Parent waiting for chld exec/exit */\n#define P_PROFIL        0x00000020      /* Has started profiling */\n#define P_SELECT        0x00000040      /* Selecting; wakeup/waiting danger */\n#define P_CONTINUED     0x00000080      /* Process was stopped and continued */\n\n#define P_SUGID         0x00000100      /* Has set privileges since last exec */\n#define P_SYSTEM        0x00000200      /* Sys proc: no sigs, stats or swap */\n#define P_TIMEOUT       0x00000400      /* Timing out during sleep */\n#define P_TRACED        0x00000800      /* Debugged process being traced */\n\n#define P_DISABLE_ASLR  0x00001000      /* Disable address space layout randomization */\n#define P_WEXIT         0x00002000      /* Working on exiting */\n#define P_EXEC          0x00004000      /* Process called exec. */\n\n/* Should be moved to machine-dependent areas. */\n#define P_OWEUPC        0x00008000      /* Owe process an addupc() call at next ast. */\n\n#define P_AFFINITY      0x00010000      /* xxx */\n#define P_TRANSLATED    0x00020000      /* xxx */\n#define P_CLASSIC       P_TRANSLATED    /* xxx */\n\n#define P_DELAYIDLESLEEP 0x00040000     /* Process is marked to delay idle sleep on disk IO */\n#define P_CHECKOPENEVT  0x00080000      /* check if a vnode has the OPENEVT flag set on open */\n\n#define P_DEPENDENCY_CAPABLE    0x00100000      /* process is ok to call vfs_markdependency() */\n#define P_REBOOT        0x00200000      /* Process called reboot() */\n#define P_RESV6         0x00400000      /* used to be P_TBE */\n#define P_RESV7         0x00800000      /* (P_SIGEXC)signal exceptions */\n\n#define P_THCWD         0x01000000      /* process has thread cwd  */\n#define P_RESV9         0x02000000      /* (P_VFORK)process has vfork children */\n#define P_ADOPTPERSONA  0x04000000      /* process adopted a persona (used to be P_NOATTACH) */\n#define P_RESV11        0x08000000      /* (P_INVFORK) proc in vfork */\n\n#define P_NOSHLIB       0x10000000      /* no shared libs are in use for proc */\n                                        /* flag set on exec */\n#define P_FORCEQUOTA    0x20000000      /* Force quota for root */\n#define P_NOCLDWAIT     0x40000000      /* No zombies when chil procs exit */\n#define P_NOREMOTEHANG  0x80000000      /* Don't hang on remote FS ops */\n\n#define P_INMEM         0               /* Obsolete: retained for compilation */\n#define P_NOSWAP        0               /* Obsolete: retained for compilation */\n#define P_PHYSIO        0               /* Obsolete: retained for compilation */\n#define P_FSTRACE       0               /* Obsolete: retained for compilation */\n#define P_SSTEP         0               /* Obsolete: retained for compilation */\n\n#define P_DIRTY_TRACK                           0x00000001      /* track dirty state */\n#define P_DIRTY_ALLOW_IDLE_EXIT                 0x00000002      /* process can be idle-exited when clean */\n#define P_DIRTY_DEFER                           0x00000004      /* defer initial opt-in to idle-exit */\n#define P_DIRTY                                 0x00000008      /* process is dirty */\n#define P_DIRTY_SHUTDOWN                        0x00000010      /* process is dirty during shutdown */\n#define P_DIRTY_TERMINATED                      0x00000020      /* process has been marked for termination */\n#define P_DIRTY_BUSY                            0x00000040      /* serialization flag */\n#define P_DIRTY_MARKED                          0x00000080      /* marked dirty previously */\n#define P_DIRTY_AGING_IN_PROGRESS               0x00000100      /* aging in one of the 'aging bands' */\n#define P_DIRTY_LAUNCH_IN_PROGRESS              0x00000200      /* launch is in progress */\n#define P_DIRTY_DEFER_ALWAYS                    0x00000400      /* defer going to idle-exit after every dirty->clean transition.\n\t                                                         * For legacy jetsam policy only. This is the default with the other policies.*/\n\n#define P_DIRTY_IS_DIRTY                        (P_DIRTY | P_DIRTY_SHUTDOWN)\n#define P_DIRTY_IDLE_EXIT_ENABLED               (P_DIRTY_TRACK|P_DIRTY_ALLOW_IDLE_EXIT)\n\n\n\n\n#endif  /* !_SYS_PROC_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/proc_info.h",
    "content": "/*\n * Copyright (c) 2005-2020 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n\n#ifndef _SYS_PROC_INFO_H\n#define _SYS_PROC_INFO_H\n\n#include <sys/cdefs.h>\n#include <sys/param.h>\n#include <sys/types.h>\n#include <sys/stat.h>\n#include <sys/mount.h>\n#include <sys/socket.h>\n#include <sys/un.h>\n#include <sys/kern_control.h>\n#include <sys/event.h>\n#include <net/if.h>\n#include <net/route.h>\n#include <netinet/in.h>\n#include <netinet/tcp.h>\n#include <mach/machine.h>\n#include <uuid/uuid.h>\n\n\n__BEGIN_DECLS\n\n\n#define PROC_ALL_PIDS           1\n#define PROC_PGRP_ONLY          2\n#define PROC_TTY_ONLY           3\n#define PROC_UID_ONLY           4\n#define PROC_RUID_ONLY          5\n#define PROC_PPID_ONLY          6\n#define PROC_KDBG_ONLY          7\n\nstruct proc_bsdinfo {\n\tuint32_t                pbi_flags;              /* 64bit; emulated etc */\n\tuint32_t                pbi_status;\n\tuint32_t                pbi_xstatus;\n\tuint32_t                pbi_pid;\n\tuint32_t                pbi_ppid;\n\tuid_t                   pbi_uid;\n\tgid_t                   pbi_gid;\n\tuid_t                   pbi_ruid;\n\tgid_t                   pbi_rgid;\n\tuid_t                   pbi_svuid;\n\tgid_t                   pbi_svgid;\n\tuint32_t                rfu_1;                  /* reserved */\n\tchar                    pbi_comm[MAXCOMLEN];\n\tchar                    pbi_name[2 * MAXCOMLEN];  /* empty if no name is registered */\n\tuint32_t                pbi_nfiles;\n\tuint32_t                pbi_pgid;\n\tuint32_t                pbi_pjobc;\n\tuint32_t                e_tdev;                 /* controlling tty dev */\n\tuint32_t                e_tpgid;                /* tty process group id */\n\tint32_t                 pbi_nice;\n\tuint64_t                pbi_start_tvsec;\n\tuint64_t                pbi_start_tvusec;\n};\n\n\nstruct proc_bsdshortinfo {\n\tuint32_t                pbsi_pid;               /* process id */\n\tuint32_t                pbsi_ppid;              /* process parent id */\n\tuint32_t                pbsi_pgid;              /* process perp id */\n\tuint32_t                pbsi_status;            /* p_stat value, SZOMB, SRUN, etc */\n\tchar                    pbsi_comm[MAXCOMLEN];   /* upto 16 characters of process name */\n\tuint32_t                pbsi_flags;              /* 64bit; emulated etc */\n\tuid_t                   pbsi_uid;               /* current uid on process */\n\tgid_t                   pbsi_gid;               /* current gid on process */\n\tuid_t                   pbsi_ruid;              /* current ruid on process */\n\tgid_t                   pbsi_rgid;              /* current tgid on process */\n\tuid_t                   pbsi_svuid;             /* current svuid on process */\n\tgid_t                   pbsi_svgid;             /* current svgid on process */\n\tuint32_t                pbsi_rfu;               /* reserved for future use*/\n};\n\n\n\n\n/* pbi_flags values */\n#define PROC_FLAG_SYSTEM        1       /*  System process */\n#define PROC_FLAG_TRACED        2       /* process currently being traced, possibly by gdb */\n#define PROC_FLAG_INEXIT        4       /* process is working its way in exit() */\n#define PROC_FLAG_PPWAIT        8\n#define PROC_FLAG_LP64          0x10    /* 64bit process */\n#define PROC_FLAG_SLEADER       0x20    /* The process is the session leader */\n#define PROC_FLAG_CTTY          0x40    /* process has a control tty */\n#define PROC_FLAG_CONTROLT      0x80    /* Has a controlling terminal */\n#define PROC_FLAG_THCWD         0x100   /* process has a thread with cwd */\n/* process control bits for resource starvation */\n#define PROC_FLAG_PC_THROTTLE   0x200   /* In resource starvation situations, this process is to be throttled */\n#define PROC_FLAG_PC_SUSP       0x400   /* In resource starvation situations, this process is to be suspended */\n#define PROC_FLAG_PC_KILL       0x600   /* In resource starvation situations, this process is to be terminated */\n#define PROC_FLAG_PC_MASK       0x600\n/* process action bits for resource starvation */\n#define PROC_FLAG_PA_THROTTLE   0x800   /* The process is currently throttled due to resource starvation */\n#define PROC_FLAG_PA_SUSP       0x1000  /* The process is currently suspended due to resource starvation */\n#define PROC_FLAG_PSUGID        0x2000   /* process has set privileges since last exec */\n#define PROC_FLAG_EXEC          0x4000   /* process has called exec  */\n\n\nstruct proc_taskinfo {\n\tuint64_t                pti_virtual_size;       /* virtual memory size (bytes) */\n\tuint64_t                pti_resident_size;      /* resident memory size (bytes) */\n\tuint64_t                pti_total_user;         /* total time */\n\tuint64_t                pti_total_system;\n\tuint64_t                pti_threads_user;       /* existing threads only */\n\tuint64_t                pti_threads_system;\n\tint32_t                 pti_policy;             /* default policy for new threads */\n\tint32_t                 pti_faults;             /* number of page faults */\n\tint32_t                 pti_pageins;            /* number of actual pageins */\n\tint32_t                 pti_cow_faults;         /* number of copy-on-write faults */\n\tint32_t                 pti_messages_sent;      /* number of messages sent */\n\tint32_t                 pti_messages_received;  /* number of messages received */\n\tint32_t                 pti_syscalls_mach;      /* number of mach system calls */\n\tint32_t                 pti_syscalls_unix;      /* number of unix system calls */\n\tint32_t                 pti_csw;                /* number of context switches */\n\tint32_t                 pti_threadnum;          /* number of threads in the task */\n\tint32_t                 pti_numrunning;         /* number of running threads */\n\tint32_t                 pti_priority;           /* task priority*/\n};\n\nstruct proc_taskallinfo {\n\tstruct proc_bsdinfo     pbsd;\n\tstruct proc_taskinfo    ptinfo;\n};\n\n#define MAXTHREADNAMESIZE 64\n\nstruct proc_threadinfo {\n\tuint64_t                pth_user_time;          /* user run time */\n\tuint64_t                pth_system_time;        /* system run time */\n\tint32_t                 pth_cpu_usage;          /* scaled cpu usage percentage */\n\tint32_t                 pth_policy;             /* scheduling policy in effect */\n\tint32_t                 pth_run_state;          /* run state (see below) */\n\tint32_t                 pth_flags;              /* various flags (see below) */\n\tint32_t                 pth_sleep_time;         /* number of seconds that thread */\n\tint32_t                 pth_curpri;             /* cur priority*/\n\tint32_t                 pth_priority;           /*  priority*/\n\tint32_t                 pth_maxpriority;        /* max priority*/\n\tchar                    pth_name[MAXTHREADNAMESIZE];    /* thread name, if any */\n};\n\nstruct proc_regioninfo {\n\tuint32_t                pri_protection;\n\tuint32_t                pri_max_protection;\n\tuint32_t                pri_inheritance;\n\tuint32_t                pri_flags;              /* shared, external pager, is submap */\n\tuint64_t                pri_offset;\n\tuint32_t                pri_behavior;\n\tuint32_t                pri_user_wired_count;\n\tuint32_t                pri_user_tag;\n\tuint32_t                pri_pages_resident;\n\tuint32_t                pri_pages_shared_now_private;\n\tuint32_t                pri_pages_swapped_out;\n\tuint32_t                pri_pages_dirtied;\n\tuint32_t                pri_ref_count;\n\tuint32_t                pri_shadow_depth;\n\tuint32_t                pri_share_mode;\n\tuint32_t                pri_private_pages_resident;\n\tuint32_t                pri_shared_pages_resident;\n\tuint32_t                pri_obj_id;\n\tuint32_t                pri_depth;\n\tuint64_t                pri_address;\n\tuint64_t                pri_size;\n};\n\n#define PROC_REGION_SUBMAP      1\n#define PROC_REGION_SHARED      2\n\n#define SM_COW             1\n#define SM_PRIVATE         2\n#define SM_EMPTY           3\n#define SM_SHARED          4\n#define SM_TRUESHARED      5\n#define SM_PRIVATE_ALIASED 6\n#define SM_SHARED_ALIASED  7\n#define SM_LARGE_PAGE      8\n\n\n/*\n *\tThread run states (state field).\n */\n\n#define TH_STATE_RUNNING        1       /* thread is running normally */\n#define TH_STATE_STOPPED        2       /* thread is stopped */\n#define TH_STATE_WAITING        3       /* thread is waiting normally */\n#define TH_STATE_UNINTERRUPTIBLE 4      /* thread is in an uninterruptible\n\t                                 *  wait */\n#define TH_STATE_HALTED         5       /* thread is halted at a\n\t                                 *  clean point */\n\n/*\n *\tThread flags (flags field).\n */\n#define TH_FLAGS_SWAPPED        0x1     /* thread is swapped out */\n#define TH_FLAGS_IDLE           0x2     /* thread is an idle thread */\n\n\nstruct proc_workqueueinfo {\n\tuint32_t        pwq_nthreads;           /* total number of workqueue threads */\n\tuint32_t        pwq_runthreads;         /* total number of running workqueue threads */\n\tuint32_t        pwq_blockedthreads;     /* total number of blocked workqueue threads */\n\tuint32_t        pwq_state;\n};\n\n/*\n *\tworkqueue state (pwq_state field)\n */\n#define WQ_EXCEEDED_CONSTRAINED_THREAD_LIMIT 0x1\n#define WQ_EXCEEDED_TOTAL_THREAD_LIMIT 0x2\n#define WQ_FLAGS_AVAILABLE 0x4\n\nstruct proc_fileinfo {\n\tuint32_t                fi_openflags;\n\tuint32_t                fi_status;\n\toff_t                   fi_offset;\n\tint32_t                 fi_type;\n\tuint32_t                fi_guardflags;\n};\n\n/* stats flags in proc_fileinfo */\n#define PROC_FP_SHARED  1       /* shared by more than one fd */\n#define PROC_FP_CLEXEC  2       /* close on exec */\n#define PROC_FP_GUARDED 4       /* guarded fd */\n#define PROC_FP_CLFORK  8       /* close on fork */\n\n#define PROC_FI_GUARD_CLOSE             (1u << 0)\n#define PROC_FI_GUARD_DUP               (1u << 1)\n#define PROC_FI_GUARD_SOCKET_IPC        (1u << 2)\n#define PROC_FI_GUARD_FILEPORT          (1u << 3)\n\nstruct proc_exitreasonbasicinfo {\n\tuint32_t                        beri_namespace;\n\tuint64_t                        beri_code;\n\tuint64_t                        beri_flags;\n\tuint32_t                        beri_reason_buf_size;\n} __attribute__((packed));\n\nstruct proc_exitreasoninfo {\n\tuint32_t                        eri_namespace;\n\tuint64_t                        eri_code;\n\tuint64_t                        eri_flags;\n\tuint32_t                        eri_reason_buf_size;\n\tuint64_t                        eri_kcd_buf;\n} __attribute__((packed));\n\n/*\n * A copy of stat64 with static sized fields.\n */\nstruct vinfo_stat {\n\tuint32_t        vst_dev;        /* [XSI] ID of device containing file */\n\tuint16_t        vst_mode;       /* [XSI] Mode of file (see below) */\n\tuint16_t        vst_nlink;      /* [XSI] Number of hard links */\n\tuint64_t        vst_ino;        /* [XSI] File serial number */\n\tuid_t           vst_uid;        /* [XSI] User ID of the file */\n\tgid_t           vst_gid;        /* [XSI] Group ID of the file */\n\tint64_t         vst_atime;      /* [XSI] Time of last access */\n\tint64_t         vst_atimensec;  /* nsec of last access */\n\tint64_t         vst_mtime;      /* [XSI] Last data modification time */\n\tint64_t         vst_mtimensec;  /* last data modification nsec */\n\tint64_t         vst_ctime;      /* [XSI] Time of last status change */\n\tint64_t         vst_ctimensec;  /* nsec of last status change */\n\tint64_t         vst_birthtime;  /*  File creation time(birth)  */\n\tint64_t         vst_birthtimensec;      /* nsec of File creation time */\n\toff_t           vst_size;       /* [XSI] file size, in bytes */\n\tint64_t         vst_blocks;     /* [XSI] blocks allocated for file */\n\tint32_t         vst_blksize;    /* [XSI] optimal blocksize for I/O */\n\tuint32_t        vst_flags;      /* user defined flags for file */\n\tuint32_t        vst_gen;        /* file generation number */\n\tuint32_t        vst_rdev;       /* [XSI] Device ID */\n\tint64_t         vst_qspare[2];  /* RESERVED: DO NOT USE! */\n};\n\nstruct vnode_info {\n\tstruct vinfo_stat       vi_stat;\n\tint                     vi_type;\n\tint                     vi_pad;\n\tfsid_t                  vi_fsid;\n};\n\nstruct vnode_info_path {\n\tstruct vnode_info       vip_vi;\n\tchar                    vip_path[MAXPATHLEN];   /* tail end of it  */\n};\n\nstruct vnode_fdinfo {\n\tstruct proc_fileinfo    pfi;\n\tstruct vnode_info       pvi;\n};\n\nstruct vnode_fdinfowithpath {\n\tstruct proc_fileinfo    pfi;\n\tstruct vnode_info_path  pvip;\n};\n\nstruct proc_regionwithpathinfo {\n\tstruct proc_regioninfo  prp_prinfo;\n\tstruct vnode_info_path  prp_vip;\n};\n\nstruct proc_regionpath {\n\tuint64_t prpo_addr;\n\tuint64_t prpo_regionlength;\n\tchar prpo_path[MAXPATHLEN];\n};\n\nstruct proc_vnodepathinfo {\n\tstruct vnode_info_path  pvi_cdir;\n\tstruct vnode_info_path  pvi_rdir;\n};\n\nstruct proc_threadwithpathinfo {\n\tstruct proc_threadinfo  pt;\n\tstruct vnode_info_path  pvip;\n};\n\n/*\n *  Socket\n */\n\n\n/*\n * IPv4 and IPv6 Sockets\n */\n\n#define INI_IPV4        0x1\n#define INI_IPV6        0x2\n\nstruct in4in6_addr {\n\tu_int32_t               i46a_pad32[3];\n\tstruct in_addr          i46a_addr4;\n};\n\nstruct in_sockinfo {\n\tint                                     insi_fport;             /* foreign port */\n\tint                                     insi_lport;             /* local port */\n\tuint64_t                                insi_gencnt;            /* generation count of this instance */\n\tuint32_t                                insi_flags;             /* generic IP/datagram flags */\n\tuint32_t                                insi_flow;\n\n\tuint8_t                                 insi_vflag;             /* ini_IPV4 or ini_IPV6 */\n\tuint8_t                                 insi_ip_ttl;            /* time to live proto */\n\tuint32_t                                rfu_1;                  /* reserved */\n\t/* protocol dependent part */\n\tunion {\n\t\tstruct in4in6_addr      ina_46;\n\t\tstruct in6_addr         ina_6;\n\t}                                       insi_faddr;             /* foreign host table entry */\n\tunion {\n\t\tstruct in4in6_addr      ina_46;\n\t\tstruct in6_addr         ina_6;\n\t}                                       insi_laddr;             /* local host table entry */\n\tstruct {\n\t\tu_char                  in4_tos;                        /* type of service */\n\t}                                       insi_v4;\n\tstruct {\n\t\tuint8_t                 in6_hlim;\n\t\tint                     in6_cksum;\n\t\tu_short                 in6_ifindex;\n\t\tshort                   in6_hops;\n\t}                                       insi_v6;\n};\n\n/*\n * TCP Sockets\n */\n\n#define TSI_T_REXMT             0       /* retransmit */\n#define TSI_T_PERSIST           1       /* retransmit persistence */\n#define TSI_T_KEEP              2       /* keep alive */\n#define TSI_T_2MSL              3       /* 2*msl quiet time timer */\n#define TSI_T_NTIMERS           4\n\n#define TSI_S_CLOSED            0       /* closed */\n#define TSI_S_LISTEN            1       /* listening for connection */\n#define TSI_S_SYN_SENT          2       /* active, have sent syn */\n#define TSI_S_SYN_RECEIVED      3       /* have send and received syn */\n#define TSI_S_ESTABLISHED       4       /* established */\n#define TSI_S__CLOSE_WAIT       5       /* rcvd fin, waiting for close */\n#define TSI_S_FIN_WAIT_1        6       /* have closed, sent fin */\n#define TSI_S_CLOSING           7       /* closed xchd FIN; await FIN ACK */\n#define TSI_S_LAST_ACK          8       /* had fin and close; await FIN ACK */\n#define TSI_S_FIN_WAIT_2        9       /* have closed, fin is acked */\n#define TSI_S_TIME_WAIT         10      /* in 2*msl quiet wait after close */\n#define TSI_S_RESERVED          11      /* pseudo state: reserved */\n\nstruct tcp_sockinfo {\n\tstruct in_sockinfo              tcpsi_ini;\n\tint                             tcpsi_state;\n\tint                             tcpsi_timer[TSI_T_NTIMERS];\n\tint                             tcpsi_mss;\n\tuint32_t                        tcpsi_flags;\n\tuint32_t                        rfu_1;          /* reserved */\n\tuint64_t                        tcpsi_tp;       /* opaque handle of TCP protocol control block */\n};\n\n/*\n * Unix Domain Sockets\n */\n\n\nstruct un_sockinfo {\n\tuint64_t                                unsi_conn_so;   /* opaque handle of connected socket */\n\tuint64_t                                unsi_conn_pcb;  /* opaque handle of connected protocol control block */\n\tunion {\n\t\tstruct sockaddr_un      ua_sun;\n\t\tchar                    ua_dummy[SOCK_MAXADDRLEN];\n\t}                                       unsi_addr;      /* bound address */\n\tunion {\n\t\tstruct sockaddr_un      ua_sun;\n\t\tchar                    ua_dummy[SOCK_MAXADDRLEN];\n\t}                                       unsi_caddr;     /* address of socket connected to */\n};\n\n/*\n * PF_NDRV Sockets\n */\n\nstruct ndrv_info {\n\tuint32_t        ndrvsi_if_family;\n\tuint32_t        ndrvsi_if_unit;\n\tchar            ndrvsi_if_name[IF_NAMESIZE];\n};\n\n/*\n * Kernel Event Sockets\n */\n\nstruct kern_event_info {\n\tuint32_t        kesi_vendor_code_filter;\n\tuint32_t        kesi_class_filter;\n\tuint32_t        kesi_subclass_filter;\n};\n\n/*\n * Kernel Control Sockets\n */\n\nstruct kern_ctl_info {\n\tuint32_t        kcsi_id;\n\tuint32_t        kcsi_reg_unit;\n\tuint32_t        kcsi_flags;                     /* support flags */\n\tuint32_t        kcsi_recvbufsize;               /* request more than the default buffer size */\n\tuint32_t        kcsi_sendbufsize;               /* request more than the default buffer size */\n\tuint32_t        kcsi_unit;\n\tchar            kcsi_name[MAX_KCTL_NAME];       /* unique nke identifier, provided by DTS */\n};\n\n/*\n * VSock Sockets\n */\n\nstruct vsock_sockinfo {\n\tuint32_t        local_cid;\n\tuint32_t        local_port;\n\tuint32_t        remote_cid;\n\tuint32_t        remote_port;\n};\n\n/* soi_state */\n\n#define SOI_S_NOFDREF           0x0001  /* no file table ref any more */\n#define SOI_S_ISCONNECTED       0x0002  /* socket connected to a peer */\n#define SOI_S_ISCONNECTING      0x0004  /* in process of connecting to peer */\n#define SOI_S_ISDISCONNECTING   0x0008  /* in process of disconnecting */\n#define SOI_S_CANTSENDMORE      0x0010  /* can't send more data to peer */\n#define SOI_S_CANTRCVMORE       0x0020  /* can't receive more data from peer */\n#define SOI_S_RCVATMARK         0x0040  /* at mark on input */\n#define SOI_S_PRIV              0x0080  /* privileged for broadcast, raw... */\n#define SOI_S_NBIO              0x0100  /* non-blocking ops */\n#define SOI_S_ASYNC             0x0200  /* async i/o notify */\n#define SOI_S_INCOMP            0x0800  /* Unaccepted, incomplete connection */\n#define SOI_S_COMP              0x1000  /* unaccepted, complete connection */\n#define SOI_S_ISDISCONNECTED    0x2000  /* socket disconnected from peer */\n#define SOI_S_DRAINING          0x4000  /* close waiting for blocked system calls to drain */\n\nstruct sockbuf_info {\n\tuint32_t                sbi_cc;\n\tuint32_t                sbi_hiwat;                      /* SO_RCVBUF, SO_SNDBUF */\n\tuint32_t                sbi_mbcnt;\n\tuint32_t                sbi_mbmax;\n\tuint32_t                sbi_lowat;\n\tshort                   sbi_flags;\n\tshort                   sbi_timeo;\n};\n\nenum {\n\tSOCKINFO_GENERIC        = 0,\n\tSOCKINFO_IN             = 1,\n\tSOCKINFO_TCP            = 2,\n\tSOCKINFO_UN             = 3,\n\tSOCKINFO_NDRV           = 4,\n\tSOCKINFO_KERN_EVENT     = 5,\n\tSOCKINFO_KERN_CTL       = 6,\n\tSOCKINFO_VSOCK          = 7,\n};\n\nstruct socket_info {\n\tstruct vinfo_stat                       soi_stat;\n\tuint64_t                                soi_so;         /* opaque handle of socket */\n\tuint64_t                                soi_pcb;        /* opaque handle of protocol control block */\n\tint                                     soi_type;\n\tint                                     soi_protocol;\n\tint                                     soi_family;\n\tshort                                   soi_options;\n\tshort                                   soi_linger;\n\tshort                                   soi_state;\n\tshort                                   soi_qlen;\n\tshort                                   soi_incqlen;\n\tshort                                   soi_qlimit;\n\tshort                                   soi_timeo;\n\tu_short                                 soi_error;\n\tuint32_t                                soi_oobmark;\n\tstruct sockbuf_info                     soi_rcv;\n\tstruct sockbuf_info                     soi_snd;\n\tint                                     soi_kind;\n\tuint32_t                                rfu_1;          /* reserved */\n\tunion {\n\t\tstruct in_sockinfo      pri_in;                 /* SOCKINFO_IN */\n\t\tstruct tcp_sockinfo     pri_tcp;                /* SOCKINFO_TCP */\n\t\tstruct un_sockinfo      pri_un;                 /* SOCKINFO_UN */\n\t\tstruct ndrv_info        pri_ndrv;               /* SOCKINFO_NDRV */\n\t\tstruct kern_event_info  pri_kern_event;         /* SOCKINFO_KERN_EVENT */\n\t\tstruct kern_ctl_info    pri_kern_ctl;           /* SOCKINFO_KERN_CTL */\n\t\tstruct vsock_sockinfo   pri_vsock;              /* SOCKINFO_VSOCK */\n\t}                                       soi_proto;\n};\n\nstruct socket_fdinfo {\n\tstruct proc_fileinfo    pfi;\n\tstruct socket_info      psi;\n};\n\n\n\nstruct psem_info {\n\tstruct vinfo_stat       psem_stat;\n\tchar                    psem_name[MAXPATHLEN];\n};\n\nstruct psem_fdinfo {\n\tstruct proc_fileinfo    pfi;\n\tstruct psem_info        pseminfo;\n};\n\n\n\nstruct pshm_info  {\n\tstruct vinfo_stat       pshm_stat;\n\tuint64_t                pshm_mappaddr;\n\tchar                    pshm_name[MAXPATHLEN];\n};\n\nstruct pshm_fdinfo {\n\tstruct proc_fileinfo    pfi;\n\tstruct pshm_info        pshminfo;\n};\n\n\nstruct pipe_info {\n\tstruct vinfo_stat       pipe_stat;\n\tuint64_t                pipe_handle;\n\tuint64_t                pipe_peerhandle;\n\tint                     pipe_status;\n\tint                     rfu_1;  /* reserved */\n};\n\nstruct pipe_fdinfo {\n\tstruct proc_fileinfo    pfi;\n\tstruct pipe_info        pipeinfo;\n};\n\n\nstruct kqueue_info {\n\tstruct vinfo_stat       kq_stat;\n\tuint32_t                kq_state;\n\tuint32_t                rfu_1;  /* reserved */\n};\n\nstruct kqueue_dyninfo {\n\tstruct kqueue_info kqdi_info;\n\tuint64_t kqdi_servicer;\n\tuint64_t kqdi_owner;\n\tuint32_t kqdi_sync_waiters;\n\tuint8_t  kqdi_sync_waiter_qos;\n\tuint8_t  kqdi_async_qos;\n\tuint16_t kqdi_request_state;\n\tuint8_t  kqdi_events_qos;\n\tuint8_t  kqdi_pri;\n\tuint8_t  kqdi_pol;\n\tuint8_t  kqdi_cpupercent;\n\tuint8_t  _kqdi_reserved0[4];\n\tuint64_t _kqdi_reserved1[4];\n};\n\n/* keep in sync with KQ_* in sys/eventvar.h */\n#define PROC_KQUEUE_SELECT      0x0001\n#define PROC_KQUEUE_SLEEP       0x0002\n#define PROC_KQUEUE_32          0x0008\n#define PROC_KQUEUE_64          0x0010\n#define PROC_KQUEUE_QOS         0x0020\n\nstruct kqueue_fdinfo {\n\tstruct proc_fileinfo    pfi;\n\tstruct kqueue_info      kqueueinfo;\n};\n\nstruct appletalk_info {\n\tstruct vinfo_stat       atalk_stat;\n};\n\nstruct appletalk_fdinfo {\n\tstruct proc_fileinfo    pfi;\n\tstruct appletalk_info   appletalkinfo;\n};\n\ntypedef uint64_t proc_info_udata_t;\n\n/* defns of process file desc type */\n#define PROX_FDTYPE_ATALK       0\n#define PROX_FDTYPE_VNODE       1\n#define PROX_FDTYPE_SOCKET      2\n#define PROX_FDTYPE_PSHM        3\n#define PROX_FDTYPE_PSEM        4\n#define PROX_FDTYPE_KQUEUE      5\n#define PROX_FDTYPE_PIPE        6\n#define PROX_FDTYPE_FSEVENTS    7\n#define PROX_FDTYPE_NETPOLICY   9\n\nstruct proc_fdinfo {\n\tint32_t                 proc_fd;\n\tuint32_t                proc_fdtype;\n};\n\nstruct proc_fileportinfo {\n\tuint32_t                proc_fileport;\n\tuint32_t                proc_fdtype;\n};\n\n\n/* Flavors for proc_pidinfo() */\n#define PROC_PIDLISTFDS                 1\n#define PROC_PIDLISTFD_SIZE             (sizeof(struct proc_fdinfo))\n\n#define PROC_PIDTASKALLINFO             2\n#define PROC_PIDTASKALLINFO_SIZE        (sizeof(struct proc_taskallinfo))\n\n#define PROC_PIDTBSDINFO                3\n#define PROC_PIDTBSDINFO_SIZE           (sizeof(struct proc_bsdinfo))\n\n#define PROC_PIDTASKINFO                4\n#define PROC_PIDTASKINFO_SIZE           (sizeof(struct proc_taskinfo))\n\n#define PROC_PIDTHREADINFO              5\n#define PROC_PIDTHREADINFO_SIZE         (sizeof(struct proc_threadinfo))\n\n#define PROC_PIDLISTTHREADS             6\n#define PROC_PIDLISTTHREADS_SIZE        (2* sizeof(uint32_t))\n\n#define PROC_PIDREGIONINFO              7\n#define PROC_PIDREGIONINFO_SIZE         (sizeof(struct proc_regioninfo))\n\n#define PROC_PIDREGIONPATHINFO          8\n#define PROC_PIDREGIONPATHINFO_SIZE     (sizeof(struct proc_regionwithpathinfo))\n\n#define PROC_PIDVNODEPATHINFO           9\n#define PROC_PIDVNODEPATHINFO_SIZE      (sizeof(struct proc_vnodepathinfo))\n\n#define PROC_PIDTHREADPATHINFO          10\n#define PROC_PIDTHREADPATHINFO_SIZE     (sizeof(struct proc_threadwithpathinfo))\n\n#define PROC_PIDPATHINFO                11\n#define PROC_PIDPATHINFO_SIZE           (MAXPATHLEN)\n#define PROC_PIDPATHINFO_MAXSIZE        (4*MAXPATHLEN)\n\n#define PROC_PIDWORKQUEUEINFO           12\n#define PROC_PIDWORKQUEUEINFO_SIZE      (sizeof(struct proc_workqueueinfo))\n\n#define PROC_PIDT_SHORTBSDINFO          13\n#define PROC_PIDT_SHORTBSDINFO_SIZE     (sizeof(struct proc_bsdshortinfo))\n\n#define PROC_PIDLISTFILEPORTS           14\n#define PROC_PIDLISTFILEPORTS_SIZE      (sizeof(struct proc_fileportinfo))\n\n#define PROC_PIDTHREADID64INFO          15\n#define PROC_PIDTHREADID64INFO_SIZE     (sizeof(struct proc_threadinfo))\n\n#define PROC_PID_RUSAGE                 16\n#define PROC_PID_RUSAGE_SIZE            0\n\n/* Flavors for proc_pidfdinfo */\n\n#define PROC_PIDFDVNODEINFO             1\n#define PROC_PIDFDVNODEINFO_SIZE        (sizeof(struct vnode_fdinfo))\n\n#define PROC_PIDFDVNODEPATHINFO         2\n#define PROC_PIDFDVNODEPATHINFO_SIZE    (sizeof(struct vnode_fdinfowithpath))\n\n#define PROC_PIDFDSOCKETINFO            3\n#define PROC_PIDFDSOCKETINFO_SIZE       (sizeof(struct socket_fdinfo))\n\n#define PROC_PIDFDPSEMINFO              4\n#define PROC_PIDFDPSEMINFO_SIZE         (sizeof(struct psem_fdinfo))\n\n#define PROC_PIDFDPSHMINFO              5\n#define PROC_PIDFDPSHMINFO_SIZE         (sizeof(struct pshm_fdinfo))\n\n#define PROC_PIDFDPIPEINFO              6\n#define PROC_PIDFDPIPEINFO_SIZE         (sizeof(struct pipe_fdinfo))\n\n#define PROC_PIDFDKQUEUEINFO            7\n#define PROC_PIDFDKQUEUEINFO_SIZE       (sizeof(struct kqueue_fdinfo))\n\n#define PROC_PIDFDATALKINFO             8\n#define PROC_PIDFDATALKINFO_SIZE        (sizeof(struct appletalk_fdinfo))\n\n\n\n/* Flavors for proc_pidfileportinfo */\n\n#define PROC_PIDFILEPORTVNODEPATHINFO   2       /* out: vnode_fdinfowithpath */\n#define PROC_PIDFILEPORTVNODEPATHINFO_SIZE      \\\n\t                                PROC_PIDFDVNODEPATHINFO_SIZE\n\n#define PROC_PIDFILEPORTSOCKETINFO      3       /* out: socket_fdinfo */\n#define PROC_PIDFILEPORTSOCKETINFO_SIZE PROC_PIDFDSOCKETINFO_SIZE\n\n#define PROC_PIDFILEPORTPSHMINFO        5       /* out: pshm_fdinfo */\n#define PROC_PIDFILEPORTPSHMINFO_SIZE   PROC_PIDFDPSHMINFO_SIZE\n\n#define PROC_PIDFILEPORTPIPEINFO        6       /* out: pipe_fdinfo */\n#define PROC_PIDFILEPORTPIPEINFO_SIZE   PROC_PIDFDPIPEINFO_SIZE\n\n/* used for proc_setcontrol */\n#define PROC_SELFSET_PCONTROL           1\n\n#define PROC_SELFSET_THREADNAME         2\n#define PROC_SELFSET_THREADNAME_SIZE    (MAXTHREADNAMESIZE -1)\n\n#define PROC_SELFSET_VMRSRCOWNER        3\n\n#define PROC_SELFSET_DELAYIDLESLEEP     4\n\n/* used for proc_dirtycontrol */\n#define PROC_DIRTYCONTROL_TRACK         1\n#define PROC_DIRTYCONTROL_SET           2\n#define PROC_DIRTYCONTROL_GET           3\n#define PROC_DIRTYCONTROL_CLEAR         4\n\n/* proc_track_dirty() flags */\n#define PROC_DIRTY_TRACK                0x1\n#define PROC_DIRTY_ALLOW_IDLE_EXIT      0x2\n#define PROC_DIRTY_DEFER                0x4\n#define PROC_DIRTY_LAUNCH_IN_PROGRESS   0x8\n#define PROC_DIRTY_DEFER_ALWAYS         0x10\n\n/* proc_get_dirty() flags */\n#define PROC_DIRTY_TRACKED              0x1\n#define PROC_DIRTY_ALLOWS_IDLE_EXIT     0x2\n#define PROC_DIRTY_IS_DIRTY             0x4\n#define PROC_DIRTY_LAUNCH_IS_IN_PROGRESS   0x8\n\n/* Flavors for proc_udata_info */\n#define PROC_UDATA_INFO_GET             1\n#define PROC_UDATA_INFO_SET             2\n\n\n\n\n__END_DECLS\n\n#endif /*_SYS_PROC_INFO_H */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/protosw.h",
    "content": "/*\n * Copyright (c) 2000-2019 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/* Copyright (c) 1998, 1999 Apple Computer, Inc. All Rights Reserved */\n/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */\n/*\n * Copyright (c) 1982, 1986, 1993\n *\tThe Regents of the University of California.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *\tThis product includes software developed by the University of\n *\tCalifornia, Berkeley and its contributors.\n * 4. Neither the name of the University nor the names of its contributors\n *    may be used to endorse or promote products derived from this software\n *    without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n *\t@(#)protosw.h\t8.1 (Berkeley) 6/2/93\n * $FreeBSD: src/sys/sys/protosw.h,v 1.28.2.2 2001/07/03 11:02:01 ume Exp $\n */\n\n#ifndef _SYS_PROTOSW_H_\n#define _SYS_PROTOSW_H_\n\n#include <sys/appleapiopts.h>\n#include <sys/cdefs.h>\n\n/* XXX: this will go away */\n#define PR_SLOWHZ       2               /* 2 slow timeouts per second */\n\n/*\n * The arguments to the ctlinput routine are\n *      (*protosw[].pr_ctlinput)(cmd, sa, arg);\n * where cmd is one of the commands below, sa is a pointer to a sockaddr,\n * and arg is a `void *' argument used within a protocol family.\n */\n#define PRC_IFDOWN              0       /* interface transition */\n#define PRC_ROUTEDEAD           1       /* select new route if possible ??? */\n#define PRC_IFUP                2       /* interface has come back up */\n#define PRC_QUENCH2             3       /* DEC congestion bit says slow down */\n#define PRC_QUENCH              4       /* some one said to slow down */\n#define PRC_MSGSIZE             5       /* message size forced drop */\n#define PRC_HOSTDEAD            6       /* host appears to be down */\n#define PRC_HOSTUNREACH         7       /* deprecated (use PRC_UNREACH_HOST) */\n#define PRC_UNREACH_NET         8       /* no route to network */\n#define PRC_UNREACH_HOST        9       /* no route to host */\n#define PRC_UNREACH_PROTOCOL    10      /* dst says bad protocol */\n#define PRC_UNREACH_PORT        11      /* bad port # */\n/* was PRC_UNREACH_NEEDFRAG\t12         (use PRC_MSGSIZE) */\n#define PRC_UNREACH_SRCFAIL     13      /* source route failed */\n#define PRC_REDIRECT_NET        14      /* net routing redirect */\n#define PRC_REDIRECT_HOST       15      /* host routing redirect */\n#define PRC_REDIRECT_TOSNET     16      /* redirect for type of service & net */\n#define PRC_REDIRECT_TOSHOST    17      /* redirect for tos & host */\n#define PRC_TIMXCEED_INTRANS    18      /* packet lifetime expired in transit */\n#define PRC_TIMXCEED_REASS      19      /* lifetime expired on reass q */\n#define PRC_PARAMPROB           20      /* header incorrect */\n#define PRC_UNREACH_ADMIN_PROHIB        21     /* packet administrativly prohibited */\n\n#define PRC_NCMDS               22\n\n#define PRC_IS_REDIRECT(cmd)    \\\n\t((cmd) >= PRC_REDIRECT_NET && (cmd) <= PRC_REDIRECT_TOSHOST)\n\n\n#endif  /* !_SYS_PROTOSW_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/ptrace.h",
    "content": "/*\n * Copyright (c) 2000-2005 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */\n/*-\n * Copyright (c) 1984, 1993\n *\tThe Regents of the University of California.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *\tThis product includes software developed by the University of\n *\tCalifornia, Berkeley and its contributors.\n * 4. Neither the name of the University nor the names of its contributors\n *    may be used to endorse or promote products derived from this software\n *    without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n *\t@(#)ptrace.h\t8.2 (Berkeley) 1/4/94\n */\n\n#ifndef _SYS_PTRACE_H_\n#define _SYS_PTRACE_H_\n\n#include <sys/appleapiopts.h>\n#include <sys/cdefs.h>\n#include <sys/types.h>\n\nenum {\n\tePtAttachDeprecated __deprecated_enum_msg(\"PT_ATTACH is deprecated. See PT_ATTACHEXC\") = 10\n};\n\n\n#define PT_TRACE_ME     0       /* child declares it's being traced */\n#define PT_READ_I       1       /* read word in child's I space */\n#define PT_READ_D       2       /* read word in child's D space */\n#define PT_READ_U       3       /* read word in child's user structure */\n#define PT_WRITE_I      4       /* write word in child's I space */\n#define PT_WRITE_D      5       /* write word in child's D space */\n#define PT_WRITE_U      6       /* write word in child's user structure */\n#define PT_CONTINUE     7       /* continue the child */\n#define PT_KILL         8       /* kill the child process */\n#define PT_STEP         9       /* single step the child */\n#define PT_ATTACH       ePtAttachDeprecated     /* trace some running process */\n#define PT_DETACH       11      /* stop tracing a process */\n#define PT_SIGEXC       12      /* signals as exceptions for current_proc */\n#define PT_THUPDATE     13      /* signal for thread# */\n#define PT_ATTACHEXC    14      /* attach to running process with signal exception */\n\n#define PT_FORCEQUOTA   30      /* Enforce quota for root */\n#define PT_DENY_ATTACH  31\n\n#define PT_FIRSTMACH    32      /* for machine-specific requests */\n\n__BEGIN_DECLS\n\n\nint     ptrace(int _request, pid_t _pid, caddr_t _addr, int _data);\n\n\n__END_DECLS\n\n#endif  /* !_SYS_PTRACE_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/qos.h",
    "content": "/*\n * Copyright (c) 2013-2014 Apple Inc. All rights reserved.\n *\n * @APPLE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this\n * file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_LICENSE_HEADER_END@\n */\n\n#ifndef _SYS_QOS_H\n#define _SYS_QOS_H\n\n#include <sys/cdefs.h>\n#include <Availability.h>\n\n/*!\n * @typedef qos_class_t\n *\n * @abstract\n * An abstract thread quality of service (QOS) classification.\n *\n * @discussion\n * Thread quality of service (QOS) classes are ordered abstract representations\n * of the nature of work that is expected to be performed by a pthread, dispatch\n * queue, or NSOperation. Each class specifies a maximum thread scheduling\n * priority for that band (which may be used in combination with a relative\n * priority offset within the band), as well as quality of service\n * characteristics for timer latency, CPU throughput, I/O throughput, network\n * socket traffic management behavior and more.\n *\n * A best effort is made to allocate available system resources to every QOS\n * class. Quality of service degredation only occurs during system resource\n * contention, proportionally to the QOS class. That said, QOS classes\n * representing user-initiated work attempt to achieve peak throughput while\n * QOS classes for other work attempt to achieve peak energy and thermal\n * efficiency, even in the absence of contention. Finally, the use of QOS\n * classes does not allow threads to supersede any limits that may be applied\n * to the overall process.\n */\n\n/*!\n * @constant QOS_CLASS_USER_INTERACTIVE\n * @abstract A QOS class which indicates work performed by this thread\n * is interactive with the user.\n * @discussion Such work is requested to run at high priority relative to other\n * work on the system. Specifying this QOS class is a request to run with\n * nearly all available system CPU and I/O bandwidth even under contention.\n * This is not an energy-efficient QOS class to use for large tasks. The use of\n * this QOS class should be limited to critical interaction with the user such\n * as handling events on the main event loop, view drawing, animation, etc.\n *\n * @constant QOS_CLASS_USER_INITIATED\n * @abstract A QOS class which indicates work performed by this thread\n * was initiated by the user and that the user is likely waiting for the\n * results.\n * @discussion Such work is requested to run at a priority below critical user-\n * interactive work, but relatively higher than other work on the system. This\n * is not an energy-efficient QOS class to use for large tasks. Its use\n * should be limited to operations of short enough duration that the user is\n * unlikely to switch tasks while waiting for the results. Typical\n * user-initiated work will have progress indicated by the display of\n * placeholder content or modal user interface.\n *\n * @constant QOS_CLASS_DEFAULT\n * @abstract A default QOS class used by the system in cases where more specific\n * QOS class information is not available.\n * @discussion Such work is requested to run at a priority below critical user-\n * interactive and user-initiated work, but relatively higher than utility and\n * background tasks. Threads created by pthread_create() without an attribute\n * specifying a QOS class will default to QOS_CLASS_DEFAULT. This QOS class\n * value is not intended to be used as a work classification, it should only be\n * set when propagating or restoring QOS class values provided by the system.\n *\n * @constant QOS_CLASS_UTILITY\n * @abstract A QOS class which indicates work performed by this thread\n * may or may not be initiated by the user and that the user is unlikely to be\n * immediately waiting for the results.\n * @discussion Such work is requested to run at a priority below critical user-\n * interactive and user-initiated work, but relatively higher than low-level\n * system maintenance tasks. The use of this QOS class indicates the work\n * should be run in an energy and thermally-efficient manner. The progress of\n * utility work may or may not be indicated to the user, but the effect of such\n * work is user-visible.\n *\n * @constant QOS_CLASS_BACKGROUND\n * @abstract A QOS class which indicates work performed by this thread was not\n * initiated by the user and that the user may be unaware of the results.\n * @discussion Such work is requested to run at a priority below other work.\n * The use of this QOS class indicates the work should be run in the most energy\n * and thermally-efficient manner.\n *\n * @constant QOS_CLASS_UNSPECIFIED\n * @abstract A QOS class value which indicates the absence or removal of QOS\n * class information.\n * @discussion As an API return value, may indicate that threads or pthread\n * attributes were configured with legacy API incompatible or in conflict with\n * the QOS class system.\n */\n\n#define __QOS_ENUM(name, type, ...) enum { __VA_ARGS__ }; typedef type name##_t\n#define __QOS_CLASS_AVAILABLE(...)\n\n#if defined(__cplusplus) || defined(__OBJC__) || __LP64__\n#if defined(__has_feature) && defined(__has_extension)\n#if __has_feature(objc_fixed_enum) || __has_extension(cxx_strong_enums)\n#undef __QOS_ENUM\n#define __QOS_ENUM(name, type, ...) typedef enum : type { __VA_ARGS__ } name##_t\n#endif\n#endif\n#if __has_feature(enumerator_attributes)\n#undef __QOS_CLASS_AVAILABLE\n#define __QOS_CLASS_AVAILABLE __API_AVAILABLE\n#endif\n#endif\n\n__QOS_ENUM(qos_class, unsigned int,\n\tQOS_CLASS_USER_INTERACTIVE\n\t\t\t__QOS_CLASS_AVAILABLE(macos(10.10), ios(8.0)) = 0x21,\n\tQOS_CLASS_USER_INITIATED\n\t\t\t__QOS_CLASS_AVAILABLE(macos(10.10), ios(8.0)) = 0x19,\n\tQOS_CLASS_DEFAULT\n\t\t\t__QOS_CLASS_AVAILABLE(macos(10.10), ios(8.0)) = 0x15,\n\tQOS_CLASS_UTILITY\n\t\t\t__QOS_CLASS_AVAILABLE(macos(10.10), ios(8.0)) = 0x11,\n\tQOS_CLASS_BACKGROUND\n\t\t\t__QOS_CLASS_AVAILABLE(macos(10.10), ios(8.0)) = 0x09,\n\tQOS_CLASS_UNSPECIFIED\n\t\t\t__QOS_CLASS_AVAILABLE(macos(10.10), ios(8.0)) = 0x00,\n);\n\n#undef __QOS_ENUM\n\n/*!\n * @constant QOS_MIN_RELATIVE_PRIORITY\n * @abstract The minimum relative priority that may be specified within a\n * QOS class. These priorities are relative only within a given QOS class\n * and meaningful only for the current process.\n */\n#define QOS_MIN_RELATIVE_PRIORITY (-15)\n\n/* Userspace (only) definitions */\n\n#ifndef KERNEL\n\n__BEGIN_DECLS\n\n/*!\n * @function qos_class_self\n *\n * @abstract\n * Returns the requested QOS class of the current thread.\n *\n * @return\n * One of the QOS class values in qos_class_t.\n */\n__API_AVAILABLE(macos(10.10), ios(8.0))\nqos_class_t\nqos_class_self(void);\n\n/*!\n * @function qos_class_main\n *\n * @abstract\n * Returns the initial requested QOS class of the main thread.\n *\n * @discussion\n * The QOS class that the main thread of a process is created with depends on\n * the type of process (e.g. application or daemon) and on how it has been\n * launched.\n *\n * This function returns that initial requested QOS class value chosen by the\n * system to enable propagation of that classification to matching work not\n * executing on the main thread.\n *\n * @return\n * One of the QOS class values in qos_class_t.\n */\n__API_AVAILABLE(macos(10.10), ios(8.0))\nqos_class_t\nqos_class_main(void);\n\n__END_DECLS\n\n#endif // KERNEL\n\n#endif // _SYS_QOS_H\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/queue.h",
    "content": "/*\n * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/*-\n * Copyright (c) 1991, 1993\n *\tThe Regents of the University of California.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 4. Neither the name of the University nor the names of its contributors\n *    may be used to endorse or promote products derived from this software\n *    without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n *\t@(#)queue.h\t8.5 (Berkeley) 8/20/94\n */\n\n#ifndef _SYS_QUEUE_H_\n#define _SYS_QUEUE_H_\n\n#ifndef __improbable\n#define __improbable(x) (x)             /* noop in userspace */\n#endif /* __improbable */\n\n/*\n * This file defines five types of data structures: singly-linked lists,\n * singly-linked tail queues, lists, tail queues, and circular queues.\n *\n * A singly-linked list is headed by a single forward pointer. The elements\n * are singly linked for minimum space and pointer manipulation overhead at\n * the expense of O(n) removal for arbitrary elements. New elements can be\n * added to the list after an existing element or at the head of the list.\n * Elements being removed from the head of the list should use the explicit\n * macro for this purpose for optimum efficiency. A singly-linked list may\n * only be traversed in the forward direction.  Singly-linked lists are ideal\n * for applications with large datasets and few or no removals or for\n * implementing a LIFO queue.\n *\n * A singly-linked tail queue is headed by a pair of pointers, one to the\n * head of the list and the other to the tail of the list. The elements are\n * singly linked for minimum space and pointer manipulation overhead at the\n * expense of O(n) removal for arbitrary elements. New elements can be added\n * to the list after an existing element, at the head of the list, or at the\n * end of the list. Elements being removed from the head of the tail queue\n * should use the explicit macro for this purpose for optimum efficiency.\n * A singly-linked tail queue may only be traversed in the forward direction.\n * Singly-linked tail queues are ideal for applications with large datasets\n * and few or no removals or for implementing a FIFO queue.\n *\n * A list is headed by a single forward pointer (or an array of forward\n * pointers for a hash table header). The elements are doubly linked\n * so that an arbitrary element can be removed without a need to\n * traverse the list. New elements can be added to the list before\n * or after an existing element or at the head of the list. A list\n * may only be traversed in the forward direction.\n *\n * A tail queue is headed by a pair of pointers, one to the head of the\n * list and the other to the tail of the list. The elements are doubly\n * linked so that an arbitrary element can be removed without a need to\n * traverse the list. New elements can be added to the list before or\n * after an existing element, at the head of the list, or at the end of\n * the list. A tail queue may be traversed in either direction.\n *\n * A circle queue is headed by a pair of pointers, one to the head of the\n * list and the other to the tail of the list. The elements are doubly\n * linked so that an arbitrary element can be removed without a need to\n * traverse the list. New elements can be added to the list before or after\n * an existing element, at the head of the list, or at the end of the list.\n * A circle queue may be traversed in either direction, but has a more\n * complex end of list detection.\n * Note that circle queues are deprecated, because, as the removal log\n * in FreeBSD states, \"CIRCLEQs are a disgrace to everything Knuth taught\n * us in Volume 1 Chapter 2. [...] Use TAILQ instead, it provides the same\n * functionality.\" Code using them will continue to compile, but they\n * are no longer documented on the man page.\n *\n * For details on the use of these macros, see the queue(3) manual page.\n *\n *\n *\t\t\t\tSLIST\tLIST\tSTAILQ\tTAILQ\tCIRCLEQ\n * _HEAD\t\t\t+\t+\t+\t+\t+\n * _HEAD_INITIALIZER\t\t+\t+\t+\t+\t-\n * _ENTRY\t\t\t+\t+\t+\t+\t+\n * _INIT\t\t\t+\t+\t+\t+\t+\n * _EMPTY\t\t\t+\t+\t+\t+\t+\n * _FIRST\t\t\t+\t+\t+\t+\t+\n * _NEXT\t\t\t+\t+\t+\t+\t+\n * _PREV\t\t\t-\t-\t-\t+\t+\n * _LAST\t\t\t-\t-\t+\t+\t+\n * _FOREACH\t\t\t+\t+\t+\t+\t+\n * _FOREACH_SAFE\t\t+\t+\t+\t+\t-\n * _FOREACH_REVERSE\t\t-\t-\t-\t+\t-\n * _FOREACH_REVERSE_SAFE\t-\t-\t-\t+\t-\n * _INSERT_HEAD\t\t\t+\t+\t+\t+\t+\n * _INSERT_BEFORE\t\t-\t+\t-\t+\t+\n * _INSERT_AFTER\t\t+\t+\t+\t+\t+\n * _INSERT_TAIL\t\t\t-\t-\t+\t+\t+\n * _CONCAT\t\t\t-\t-\t+\t+\t-\n * _REMOVE_AFTER\t\t+\t-\t+\t-\t-\n * _REMOVE_HEAD\t\t\t+\t-\t+\t-\t-\n * _REMOVE_HEAD_UNTIL\t\t-\t-\t+\t-\t-\n * _REMOVE\t\t\t+\t+\t+\t+\t+\n * _SWAP\t\t\t-\t+\t+\t+\t-\n *\n */\n#ifdef QUEUE_MACRO_DEBUG\n/* Store the last 2 places the queue element or head was altered */\nstruct qm_trace {\n\tchar * lastfile;\n\tint lastline;\n\tchar * prevfile;\n\tint prevline;\n};\n\n#define TRACEBUF        struct qm_trace trace;\n#define TRASHIT(x)      do {(x) = (void *)-1;} while (0)\n\n#define QMD_TRACE_HEAD(head) do {                                       \\\n\t(head)->trace.prevline = (head)->trace.lastline;                \\\n\t(head)->trace.prevfile = (head)->trace.lastfile;                \\\n\t(head)->trace.lastline = __LINE__;                              \\\n\t(head)->trace.lastfile = __FILE__;                              \\\n} while (0)\n\n#define QMD_TRACE_ELEM(elem) do {                                       \\\n\t(elem)->trace.prevline = (elem)->trace.lastline;                \\\n\t(elem)->trace.prevfile = (elem)->trace.lastfile;                \\\n\t(elem)->trace.lastline = __LINE__;                              \\\n\t(elem)->trace.lastfile = __FILE__;                              \\\n} while (0)\n\n#else\n#define QMD_TRACE_ELEM(elem)\n#define QMD_TRACE_HEAD(head)\n#define TRACEBUF\n#define TRASHIT(x)\n#endif  /* QUEUE_MACRO_DEBUG */\n\n/*\n * Horrible macros to enable use of code that was meant to be C-specific\n *   (and which push struct onto type) in C++; without these, C++ code\n *   that uses these macros in the context of a class will blow up\n *   due to \"struct\" being preprended to \"type\" by the macros, causing\n *   inconsistent use of tags.\n *\n * This approach is necessary because these are macros; we have to use\n *   these on a per-macro basis (because the queues are implemented as\n *   macros, disabling this warning in the scope of the header file is\n *   insufficient), whuch means we can't use #pragma, and have to use\n *   _Pragma.  We only need to use these for the queue macros that\n *   prepend \"struct\" to \"type\" and will cause C++ to blow up.\n */\n#if defined(__clang__) && defined(__cplusplus)\n#define __MISMATCH_TAGS_PUSH                                            \\\n\t_Pragma(\"clang diagnostic push\")                                \\\n\t_Pragma(\"clang diagnostic ignored \\\"-Wmismatched-tags\\\"\")\n#define __MISMATCH_TAGS_POP                                             \\\n\t_Pragma(\"clang diagnostic pop\")\n#else\n#define __MISMATCH_TAGS_PUSH\n#define __MISMATCH_TAGS_POP\n#endif\n\n/*!\n * Ensures that these macros can safely be used in structs when compiling with\n * clang. The macros do not allow for nullability attributes to be specified due\n * to how they are expanded. For example:\n *\n *     SLIST_HEAD(, foo _Nullable) bar;\n *\n * expands to\n *\n *     struct {\n *         struct foo _Nullable *slh_first;\n *     }\n *\n * which is not valid because the nullability specifier has to apply to the\n * pointer. So just ignore nullability completeness in all the places where this\n * is an issue.\n */\n#if defined(__clang__)\n#define __NULLABILITY_COMPLETENESS_PUSH \\\n\t_Pragma(\"clang diagnostic push\") \\\n\t_Pragma(\"clang diagnostic ignored \\\"-Wnullability-completeness\\\"\")\n#define __NULLABILITY_COMPLETENESS_POP \\\n\t_Pragma(\"clang diagnostic pop\")\n#else\n#define __NULLABILITY_COMPLETENESS_PUSH\n#define __NULLABILITY_COMPLETENESS_POP\n#endif\n\n/*\n * Singly-linked List declarations.\n */\n#define SLIST_HEAD(name, type)                                          \\\n__MISMATCH_TAGS_PUSH                                                    \\\n__NULLABILITY_COMPLETENESS_PUSH                                         \\\nstruct name {                                                           \\\n\tstruct type *slh_first; /* first element */                     \\\n}                                                                       \\\n__NULLABILITY_COMPLETENESS_POP                                          \\\n__MISMATCH_TAGS_POP\n\n#define SLIST_HEAD_INITIALIZER(head)                                    \\\n\t{ NULL }\n\n#define SLIST_ENTRY(type)                                               \\\n__MISMATCH_TAGS_PUSH                                                    \\\n__NULLABILITY_COMPLETENESS_PUSH                                         \\\nstruct {                                                                \\\n\tstruct type *sle_next;  /* next element */                      \\\n}                                                                       \\\n__NULLABILITY_COMPLETENESS_POP                                          \\\n__MISMATCH_TAGS_POP\n\n/*\n * Singly-linked List functions.\n */\n#define SLIST_EMPTY(head)       ((head)->slh_first == NULL)\n\n#define SLIST_FIRST(head)       ((head)->slh_first)\n\n#define SLIST_FOREACH(var, head, field)                                 \\\n\tfor ((var) = SLIST_FIRST((head));                               \\\n\t    (var);                                                      \\\n\t    (var) = SLIST_NEXT((var), field))\n\n#define SLIST_FOREACH_SAFE(var, head, field, tvar)                      \\\n\tfor ((var) = SLIST_FIRST((head));                               \\\n\t    (var) && ((tvar) = SLIST_NEXT((var), field), 1);            \\\n\t    (var) = (tvar))\n\n#define SLIST_FOREACH_PREVPTR(var, varp, head, field)                   \\\n\tfor ((varp) = &SLIST_FIRST((head));                             \\\n\t    ((var) = *(varp)) != NULL;                                  \\\n\t    (varp) = &SLIST_NEXT((var), field))\n\n#define SLIST_INIT(head) do {                                           \\\n\tSLIST_FIRST((head)) = NULL;                                     \\\n} while (0)\n\n#define SLIST_INSERT_AFTER(slistelm, elm, field) do {                   \\\n\tSLIST_NEXT((elm), field) = SLIST_NEXT((slistelm), field);       \\\n\tSLIST_NEXT((slistelm), field) = (elm);                          \\\n} while (0)\n\n#define SLIST_INSERT_HEAD(head, elm, field) do {                        \\\n\tSLIST_NEXT((elm), field) = SLIST_FIRST((head));                 \\\n\tSLIST_FIRST((head)) = (elm);                                    \\\n} while (0)\n\n#define SLIST_NEXT(elm, field)  ((elm)->field.sle_next)\n\n#define SLIST_REMOVE(head, elm, type, field)                            \\\n__MISMATCH_TAGS_PUSH                                                    \\\n__NULLABILITY_COMPLETENESS_PUSH                                         \\\ndo {                                                                    \\\n\tif (SLIST_FIRST((head)) == (elm)) {                             \\\n\t        SLIST_REMOVE_HEAD((head), field);                       \\\n\t}                                                               \\\n\telse {                                                          \\\n\t        struct type *curelm = SLIST_FIRST((head));              \\\n\t        while (SLIST_NEXT(curelm, field) != (elm))              \\\n\t                curelm = SLIST_NEXT(curelm, field);             \\\n\t        SLIST_REMOVE_AFTER(curelm, field);                      \\\n\t}                                                               \\\n\tTRASHIT((elm)->field.sle_next);                                 \\\n} while (0)                                                             \\\n__NULLABILITY_COMPLETENESS_POP                                      \\\n__MISMATCH_TAGS_POP\n\n#define SLIST_REMOVE_AFTER(elm, field) do {                             \\\n\tSLIST_NEXT(elm, field) =                                        \\\n\t    SLIST_NEXT(SLIST_NEXT(elm, field), field);                  \\\n} while (0)\n\n#define SLIST_REMOVE_HEAD(head, field) do {                             \\\n\tSLIST_FIRST((head)) = SLIST_NEXT(SLIST_FIRST((head)), field);   \\\n} while (0)\n\n/*\n * Singly-linked Tail queue declarations.\n */\n#define STAILQ_HEAD(name, type)                                         \\\n__MISMATCH_TAGS_PUSH                                                    \\\n__NULLABILITY_COMPLETENESS_PUSH                                         \\\nstruct name {                                                           \\\n\tstruct type *stqh_first;/* first element */                     \\\n\tstruct type **stqh_last;/* addr of last next element */         \\\n}                                                                       \\\n__NULLABILITY_COMPLETENESS_POP                                          \\\n__MISMATCH_TAGS_POP\n\n#define STAILQ_HEAD_INITIALIZER(head)                                   \\\n\t{ NULL, &(head).stqh_first }\n\n#define STAILQ_ENTRY(type)                                              \\\n__MISMATCH_TAGS_PUSH                                                    \\\n__NULLABILITY_COMPLETENESS_PUSH                                         \\\nstruct {                                                                \\\n\tstruct type *stqe_next; /* next element */                      \\\n}                                                                       \\\n__NULLABILITY_COMPLETENESS_POP                                         \\\n__MISMATCH_TAGS_POP\n\n/*\n * Singly-linked Tail queue functions.\n */\n#define STAILQ_CONCAT(head1, head2) do {                                \\\n\tif (!STAILQ_EMPTY((head2))) {                                   \\\n\t        *(head1)->stqh_last = (head2)->stqh_first;              \\\n\t        (head1)->stqh_last = (head2)->stqh_last;                \\\n\t        STAILQ_INIT((head2));                                   \\\n\t}                                                               \\\n} while (0)\n\n#define STAILQ_EMPTY(head)      ((head)->stqh_first == NULL)\n\n#define STAILQ_FIRST(head)      ((head)->stqh_first)\n\n#define STAILQ_FOREACH(var, head, field)                                \\\n\tfor((var) = STAILQ_FIRST((head));                               \\\n\t   (var);                                                       \\\n\t   (var) = STAILQ_NEXT((var), field))\n\n\n#define STAILQ_FOREACH_SAFE(var, head, field, tvar)                     \\\n\tfor ((var) = STAILQ_FIRST((head));                              \\\n\t    (var) && ((tvar) = STAILQ_NEXT((var), field), 1);           \\\n\t    (var) = (tvar))\n\n#define STAILQ_INIT(head) do {                                          \\\n\tSTAILQ_FIRST((head)) = NULL;                                    \\\n\t(head)->stqh_last = &STAILQ_FIRST((head));                      \\\n} while (0)\n\n#define STAILQ_INSERT_AFTER(head, tqelm, elm, field) do {               \\\n\tif ((STAILQ_NEXT((elm), field) = STAILQ_NEXT((tqelm), field)) == NULL)\\\n\t        (head)->stqh_last = &STAILQ_NEXT((elm), field);         \\\n\tSTAILQ_NEXT((tqelm), field) = (elm);                            \\\n} while (0)\n\n#define STAILQ_INSERT_HEAD(head, elm, field) do {                       \\\n\tif ((STAILQ_NEXT((elm), field) = STAILQ_FIRST((head))) == NULL) \\\n\t        (head)->stqh_last = &STAILQ_NEXT((elm), field);         \\\n\tSTAILQ_FIRST((head)) = (elm);                                   \\\n} while (0)\n\n#define STAILQ_INSERT_TAIL(head, elm, field) do {                       \\\n\tSTAILQ_NEXT((elm), field) = NULL;                               \\\n\t*(head)->stqh_last = (elm);                                     \\\n\t(head)->stqh_last = &STAILQ_NEXT((elm), field);                 \\\n} while (0)\n\n#define STAILQ_LAST(head, type, field)                                  \\\n__MISMATCH_TAGS_PUSH                                                    \\\n__NULLABILITY_COMPLETENESS_PUSH                                         \\\n\t(STAILQ_EMPTY((head)) ?                                         \\\n\t        NULL :                                                  \\\n\t        ((struct type *)(void *)                                \\\n\t        ((char *)((head)->stqh_last) - __offsetof(struct type, field))))\\\n__NULLABILITY_COMPLETENESS_POP                                         \\\n__MISMATCH_TAGS_POP\n\n#define STAILQ_NEXT(elm, field) ((elm)->field.stqe_next)\n\n#define STAILQ_REMOVE(head, elm, type, field)                           \\\n__MISMATCH_TAGS_PUSH                                                    \\\n__NULLABILITY_COMPLETENESS_PUSH                                         \\\ndo {                                                                    \\\n\tif (STAILQ_FIRST((head)) == (elm)) {                            \\\n\t        STAILQ_REMOVE_HEAD((head), field);                      \\\n\t}                                                               \\\n\telse {                                                          \\\n\t        struct type *curelm = STAILQ_FIRST((head));             \\\n\t        while (STAILQ_NEXT(curelm, field) != (elm))             \\\n\t                curelm = STAILQ_NEXT(curelm, field);            \\\n\t        STAILQ_REMOVE_AFTER(head, curelm, field);               \\\n\t}                                                               \\\n\tTRASHIT((elm)->field.stqe_next);                                \\\n} while (0)                                                             \\\n__NULLABILITY_COMPLETENESS_POP                                      \\\n__MISMATCH_TAGS_POP\n\n#define STAILQ_REMOVE_HEAD(head, field) do {                            \\\n\tif ((STAILQ_FIRST((head)) =                                     \\\n\t     STAILQ_NEXT(STAILQ_FIRST((head)), field)) == NULL)         \\\n\t        (head)->stqh_last = &STAILQ_FIRST((head));              \\\n} while (0)\n\n#define STAILQ_REMOVE_HEAD_UNTIL(head, elm, field) do {                 \\\n       if ((STAILQ_FIRST((head)) = STAILQ_NEXT((elm), field)) == NULL) \\\n\t       (head)->stqh_last = &STAILQ_FIRST((head));              \\\n} while (0)\n\n#define STAILQ_REMOVE_AFTER(head, elm, field) do {                      \\\n\tif ((STAILQ_NEXT(elm, field) =                                  \\\n\t     STAILQ_NEXT(STAILQ_NEXT(elm, field), field)) == NULL)      \\\n\t        (head)->stqh_last = &STAILQ_NEXT((elm), field);         \\\n} while (0)\n\n#define STAILQ_SWAP(head1, head2, type)                                 \\\n__MISMATCH_TAGS_PUSH                                                    \\\n__NULLABILITY_COMPLETENESS_PUSH                                         \\\ndo {                                                                    \\\n\tstruct type *swap_first = STAILQ_FIRST(head1);                  \\\n\tstruct type **swap_last = (head1)->stqh_last;                   \\\n\tSTAILQ_FIRST(head1) = STAILQ_FIRST(head2);                      \\\n\t(head1)->stqh_last = (head2)->stqh_last;                        \\\n\tSTAILQ_FIRST(head2) = swap_first;                               \\\n\t(head2)->stqh_last = swap_last;                                 \\\n\tif (STAILQ_EMPTY(head1))                                        \\\n\t        (head1)->stqh_last = &STAILQ_FIRST(head1);              \\\n\tif (STAILQ_EMPTY(head2))                                        \\\n\t        (head2)->stqh_last = &STAILQ_FIRST(head2);              \\\n} while (0)                                                             \\\n__NULLABILITY_COMPLETENESS_POP                                          \\\n__MISMATCH_TAGS_POP\n\n\n/*\n * List declarations.\n */\n#define LIST_HEAD(name, type)                                           \\\n__MISMATCH_TAGS_PUSH                                                    \\\n__NULLABILITY_COMPLETENESS_PUSH                                         \\\nstruct name {                                                           \\\n\tstruct type *lh_first;  /* first element */                     \\\n}                                                                       \\\n__NULLABILITY_COMPLETENESS_POP                                          \\\n__MISMATCH_TAGS_POP\n\n#define LIST_HEAD_INITIALIZER(head)                                     \\\n\t{ NULL }\n\n#define LIST_ENTRY(type)                                                \\\n__MISMATCH_TAGS_PUSH                                                    \\\n__NULLABILITY_COMPLETENESS_PUSH                                         \\\nstruct {                                                                \\\n\tstruct type *le_next;   /* next element */                      \\\n\tstruct type **le_prev;  /* address of previous next element */  \\\n}                                                                       \\\n__NULLABILITY_COMPLETENESS_POP                                          \\\n__MISMATCH_TAGS_POP\n\n/*\n * List functions.\n */\n\n#define LIST_CHECK_HEAD(head, field)\n#define LIST_CHECK_NEXT(elm, field)\n#define LIST_CHECK_PREV(elm, field)\n\n#define LIST_EMPTY(head)        ((head)->lh_first == NULL)\n\n#define LIST_FIRST(head)        ((head)->lh_first)\n\n#define LIST_FOREACH(var, head, field)                                  \\\n\tfor ((var) = LIST_FIRST((head));                                \\\n\t    (var);                                                      \\\n\t    (var) = LIST_NEXT((var), field))\n\n#define LIST_FOREACH_SAFE(var, head, field, tvar)                       \\\n\tfor ((var) = LIST_FIRST((head));                                \\\n\t    (var) && ((tvar) = LIST_NEXT((var), field), 1);             \\\n\t    (var) = (tvar))\n\n#define LIST_INIT(head) do {                                            \\\n\tLIST_FIRST((head)) = NULL;                                      \\\n} while (0)\n\n#define LIST_INSERT_AFTER(listelm, elm, field) do {                     \\\n\tLIST_CHECK_NEXT(listelm, field);                                \\\n\tif ((LIST_NEXT((elm), field) = LIST_NEXT((listelm), field)) != NULL)\\\n\t        LIST_NEXT((listelm), field)->field.le_prev =            \\\n\t            &LIST_NEXT((elm), field);                           \\\n\tLIST_NEXT((listelm), field) = (elm);                            \\\n\t(elm)->field.le_prev = &LIST_NEXT((listelm), field);            \\\n} while (0)\n\n#define LIST_INSERT_BEFORE(listelm, elm, field) do {                    \\\n\tLIST_CHECK_PREV(listelm, field);                                \\\n\t(elm)->field.le_prev = (listelm)->field.le_prev;                \\\n\tLIST_NEXT((elm), field) = (listelm);                            \\\n\t*(listelm)->field.le_prev = (elm);                              \\\n\t(listelm)->field.le_prev = &LIST_NEXT((elm), field);            \\\n} while (0)\n\n#define LIST_INSERT_HEAD(head, elm, field) do {                         \\\n\tLIST_CHECK_HEAD((head), field);                         \\\n\tif ((LIST_NEXT((elm), field) = LIST_FIRST((head))) != NULL)     \\\n\t        LIST_FIRST((head))->field.le_prev = &LIST_NEXT((elm), field);\\\n\tLIST_FIRST((head)) = (elm);                                     \\\n\t(elm)->field.le_prev = &LIST_FIRST((head));                     \\\n} while (0)\n\n#define LIST_NEXT(elm, field)   ((elm)->field.le_next)\n\n#define LIST_REMOVE(elm, field) do {                                    \\\n\tLIST_CHECK_NEXT(elm, field);                            \\\n\tLIST_CHECK_PREV(elm, field);                            \\\n\tif (LIST_NEXT((elm), field) != NULL)                            \\\n\t        LIST_NEXT((elm), field)->field.le_prev =                \\\n\t            (elm)->field.le_prev;                               \\\n\t*(elm)->field.le_prev = LIST_NEXT((elm), field);                \\\n\tTRASHIT((elm)->field.le_next);                                  \\\n\tTRASHIT((elm)->field.le_prev);                                  \\\n} while (0)\n\n#define LIST_SWAP(head1, head2, type, field)                            \\\n__MISMATCH_TAGS_PUSH                                                    \\\n__NULLABILITY_COMPLETENESS_PUSH                                         \\\ndo {                                                                    \\\n\tstruct type *swap_tmp = LIST_FIRST((head1));                    \\\n\tLIST_FIRST((head1)) = LIST_FIRST((head2));                      \\\n\tLIST_FIRST((head2)) = swap_tmp;                                 \\\n\tif ((swap_tmp = LIST_FIRST((head1))) != NULL)                   \\\n\t        swap_tmp->field.le_prev = &LIST_FIRST((head1));         \\\n\tif ((swap_tmp = LIST_FIRST((head2))) != NULL)                   \\\n\t        swap_tmp->field.le_prev = &LIST_FIRST((head2));         \\\n} while (0)                                                             \\\n__NULLABILITY_COMPLETENESS_POP                                          \\\n__MISMATCH_TAGS_POP\n\n/*\n * Tail queue declarations.\n */\n#define TAILQ_HEAD(name, type)                                          \\\n__MISMATCH_TAGS_PUSH                                                    \\\n__NULLABILITY_COMPLETENESS_PUSH                                         \\\nstruct name {                                                           \\\n\tstruct type *tqh_first; /* first element */                     \\\n\tstruct type **tqh_last; /* addr of last next element */         \\\n\tTRACEBUF                                                        \\\n}                                                                       \\\n__NULLABILITY_COMPLETENESS_POP                                          \\\n__MISMATCH_TAGS_POP\n\n#define TAILQ_HEAD_INITIALIZER(head)                                    \\\n\t{ NULL, &(head).tqh_first }\n\n#define TAILQ_ENTRY(type)                                               \\\n__MISMATCH_TAGS_PUSH                                                    \\\n__NULLABILITY_COMPLETENESS_PUSH                                         \\\nstruct {                                                                \\\n\tstruct type *tqe_next;  /* next element */                      \\\n\tstruct type **tqe_prev; /* address of previous next element */  \\\n\tTRACEBUF                                                        \\\n}                                                                       \\\n__NULLABILITY_COMPLETENESS_POP                                          \\\n__MISMATCH_TAGS_POP\n\n/*\n * Tail queue functions.\n */\n#define TAILQ_CHECK_HEAD(head, field)\n#define TAILQ_CHECK_NEXT(elm, field)\n#define TAILQ_CHECK_PREV(elm, field)\n\n#define TAILQ_CONCAT(head1, head2, field) do {                          \\\n\tif (!TAILQ_EMPTY(head2)) {                                      \\\n\t        *(head1)->tqh_last = (head2)->tqh_first;                \\\n\t        (head2)->tqh_first->field.tqe_prev = (head1)->tqh_last; \\\n\t        (head1)->tqh_last = (head2)->tqh_last;                  \\\n\t        TAILQ_INIT((head2));                                    \\\n\t        QMD_TRACE_HEAD(head1);                                  \\\n\t        QMD_TRACE_HEAD(head2);                                  \\\n\t}                                                               \\\n} while (0)\n\n#define TAILQ_EMPTY(head)       ((head)->tqh_first == NULL)\n\n#define TAILQ_FIRST(head)       ((head)->tqh_first)\n\n#define TAILQ_FOREACH(var, head, field)                                 \\\n\tfor ((var) = TAILQ_FIRST((head));                               \\\n\t    (var);                                                      \\\n\t    (var) = TAILQ_NEXT((var), field))\n\n#define TAILQ_FOREACH_SAFE(var, head, field, tvar)                      \\\n\tfor ((var) = TAILQ_FIRST((head));                               \\\n\t    (var) && ((tvar) = TAILQ_NEXT((var), field), 1);            \\\n\t    (var) = (tvar))\n\n#define TAILQ_FOREACH_REVERSE(var, head, headname, field)               \\\n\tfor ((var) = TAILQ_LAST((head), headname);                      \\\n\t    (var);                                                      \\\n\t    (var) = TAILQ_PREV((var), headname, field))\n\n#define TAILQ_FOREACH_REVERSE_SAFE(var, head, headname, field, tvar)    \\\n\tfor ((var) = TAILQ_LAST((head), headname);                      \\\n\t    (var) && ((tvar) = TAILQ_PREV((var), headname, field), 1);  \\\n\t    (var) = (tvar))\n\n\n#define TAILQ_INIT(head) do {                                           \\\n\tTAILQ_FIRST((head)) = NULL;                                     \\\n\t(head)->tqh_last = &TAILQ_FIRST((head));                        \\\n\tQMD_TRACE_HEAD(head);                                           \\\n} while (0)\n\n\n#define TAILQ_INSERT_AFTER(head, listelm, elm, field) do {              \\\n\tTAILQ_CHECK_NEXT(listelm, field);                               \\\n\tif ((TAILQ_NEXT((elm), field) = TAILQ_NEXT((listelm), field)) != NULL)\\\n\t        TAILQ_NEXT((elm), field)->field.tqe_prev =              \\\n\t            &TAILQ_NEXT((elm), field);                          \\\n\telse {                                                          \\\n\t        (head)->tqh_last = &TAILQ_NEXT((elm), field);           \\\n\t        QMD_TRACE_HEAD(head);                                   \\\n\t}                                                               \\\n\tTAILQ_NEXT((listelm), field) = (elm);                           \\\n\t(elm)->field.tqe_prev = &TAILQ_NEXT((listelm), field);          \\\n\tQMD_TRACE_ELEM(&(elm)->field);                                  \\\n\tQMD_TRACE_ELEM(&listelm->field);                                \\\n} while (0)\n\n#define TAILQ_INSERT_BEFORE(listelm, elm, field) do {                   \\\n\tTAILQ_CHECK_PREV(listelm, field);                               \\\n\t(elm)->field.tqe_prev = (listelm)->field.tqe_prev;              \\\n\tTAILQ_NEXT((elm), field) = (listelm);                           \\\n\t*(listelm)->field.tqe_prev = (elm);                             \\\n\t(listelm)->field.tqe_prev = &TAILQ_NEXT((elm), field);          \\\n\tQMD_TRACE_ELEM(&(elm)->field);                                  \\\n\tQMD_TRACE_ELEM(&listelm->field);                                \\\n} while (0)\n\n#define TAILQ_INSERT_HEAD(head, elm, field) do {                        \\\n\tTAILQ_CHECK_HEAD(head, field);                                  \\\n\tif ((TAILQ_NEXT((elm), field) = TAILQ_FIRST((head))) != NULL)   \\\n\t        TAILQ_FIRST((head))->field.tqe_prev =                   \\\n\t            &TAILQ_NEXT((elm), field);                          \\\n\telse                                                            \\\n\t        (head)->tqh_last = &TAILQ_NEXT((elm), field);           \\\n\tTAILQ_FIRST((head)) = (elm);                                    \\\n\t(elm)->field.tqe_prev = &TAILQ_FIRST((head));                   \\\n\tQMD_TRACE_HEAD(head);                                           \\\n\tQMD_TRACE_ELEM(&(elm)->field);                                  \\\n} while (0)\n\n#define TAILQ_INSERT_TAIL(head, elm, field) do {                        \\\n\tTAILQ_NEXT((elm), field) = NULL;                                \\\n\t(elm)->field.tqe_prev = (head)->tqh_last;                       \\\n\t*(head)->tqh_last = (elm);                                      \\\n\t(head)->tqh_last = &TAILQ_NEXT((elm), field);                   \\\n\tQMD_TRACE_HEAD(head);                                           \\\n\tQMD_TRACE_ELEM(&(elm)->field);                                  \\\n} while (0)\n\n#define TAILQ_LAST(head, headname)                                      \\\n__MISMATCH_TAGS_PUSH                                                    \\\n__NULLABILITY_COMPLETENESS_PUSH                                         \\\n\t(*(((struct headname *)((head)->tqh_last))->tqh_last))          \\\n__NULLABILITY_COMPLETENESS_POP                                          \\\n__MISMATCH_TAGS_POP\n\n#define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next)\n\n#define TAILQ_PREV(elm, headname, field)                                \\\n__MISMATCH_TAGS_PUSH                                                    \\\n__NULLABILITY_COMPLETENESS_PUSH                                         \\\n\t(*(((struct headname *)((elm)->field.tqe_prev))->tqh_last))     \\\n__NULLABILITY_COMPLETENESS_POP                                          \\\n__MISMATCH_TAGS_POP\n\n#define TAILQ_REMOVE(head, elm, field) do {                             \\\n\tTAILQ_CHECK_NEXT(elm, field);                                   \\\n\tTAILQ_CHECK_PREV(elm, field);                                   \\\n\tif ((TAILQ_NEXT((elm), field)) != NULL)                         \\\n\t        TAILQ_NEXT((elm), field)->field.tqe_prev =              \\\n\t            (elm)->field.tqe_prev;                              \\\n\telse {                                                          \\\n\t        (head)->tqh_last = (elm)->field.tqe_prev;               \\\n\t        QMD_TRACE_HEAD(head);                                   \\\n\t}                                                               \\\n\t*(elm)->field.tqe_prev = TAILQ_NEXT((elm), field);              \\\n\tTRASHIT((elm)->field.tqe_next);                                 \\\n\tTRASHIT((elm)->field.tqe_prev);                                 \\\n\tQMD_TRACE_ELEM(&(elm)->field);                                  \\\n} while (0)\n\n/*\n * Why did they switch to spaces for this one macro?\n */\n#define TAILQ_SWAP(head1, head2, type, field)                           \\\n__MISMATCH_TAGS_PUSH                                                    \\\n__NULLABILITY_COMPLETENESS_PUSH                                         \\\ndo {                                                                    \\\n\tstruct type *swap_first = (head1)->tqh_first;                   \\\n\tstruct type **swap_last = (head1)->tqh_last;                    \\\n\t(head1)->tqh_first = (head2)->tqh_first;                        \\\n\t(head1)->tqh_last = (head2)->tqh_last;                          \\\n\t(head2)->tqh_first = swap_first;                                \\\n\t(head2)->tqh_last = swap_last;                                  \\\n\tif ((swap_first = (head1)->tqh_first) != NULL)                  \\\n\t        swap_first->field.tqe_prev = &(head1)->tqh_first;       \\\n\telse                                                            \\\n\t        (head1)->tqh_last = &(head1)->tqh_first;                \\\n\tif ((swap_first = (head2)->tqh_first) != NULL)                  \\\n\t        swap_first->field.tqe_prev = &(head2)->tqh_first;       \\\n\telse                                                            \\\n\t        (head2)->tqh_last = &(head2)->tqh_first;                \\\n} while (0)                                                             \\\n__NULLABILITY_COMPLETENESS_POP                                          \\\n__MISMATCH_TAGS_POP\n\n/*\n * Circular queue definitions.\n */\n#define CIRCLEQ_HEAD(name, type)                                        \\\n__MISMATCH_TAGS_PUSH                                                    \\\n__NULLABILITY_COMPLETENESS_PUSH                                         \\\nstruct name {                                                           \\\n\tstruct type *cqh_first;         /* first element */             \\\n\tstruct type *cqh_last;          /* last element */              \\\n}                                                                       \\\n__NULLABILITY_COMPLETENESS_POP                                          \\\n__MISMATCH_TAGS_POP\n\n#define CIRCLEQ_ENTRY(type)                                             \\\n__MISMATCH_TAGS_PUSH                                                    \\\n__NULLABILITY_COMPLETENESS_PUSH                                         \\\nstruct {                                                                \\\n\tstruct type *cqe_next;          /* next element */              \\\n\tstruct type *cqe_prev;          /* previous element */          \\\n}                                                                       \\\n__NULLABILITY_COMPLETENESS_POP                                         \\\n__MISMATCH_TAGS_POP\n\n/*\n * Circular queue functions.\n */\n#define CIRCLEQ_CHECK_HEAD(head, field)\n#define CIRCLEQ_CHECK_NEXT(head, elm, field)\n#define CIRCLEQ_CHECK_PREV(head, elm, field)\n\n#define CIRCLEQ_EMPTY(head) ((head)->cqh_first == (void *)(head))\n\n#define CIRCLEQ_FIRST(head) ((head)->cqh_first)\n\n#define CIRCLEQ_FOREACH(var, head, field)                               \\\n\tfor((var) = (head)->cqh_first;                                  \\\n\t    (var) != (void *)(head);                                    \\\n\t    (var) = (var)->field.cqe_next)\n\n#define CIRCLEQ_INIT(head) do {                                         \\\n\t(head)->cqh_first = (void *)(head);                             \\\n\t(head)->cqh_last = (void *)(head);                              \\\n} while (0)\n\n#define CIRCLEQ_INSERT_AFTER(head, listelm, elm, field) do {            \\\n\tCIRCLEQ_CHECK_NEXT(head, listelm, field);                       \\\n\t(elm)->field.cqe_next = (listelm)->field.cqe_next;              \\\n\t(elm)->field.cqe_prev = (listelm);                              \\\n\tif ((listelm)->field.cqe_next == (void *)(head))                \\\n\t        (head)->cqh_last = (elm);                               \\\n\telse                                                            \\\n\t        (listelm)->field.cqe_next->field.cqe_prev = (elm);      \\\n\t(listelm)->field.cqe_next = (elm);                              \\\n} while (0)\n\n#define CIRCLEQ_INSERT_BEFORE(head, listelm, elm, field) do {           \\\n\tCIRCLEQ_CHECK_PREV(head, listelm, field);                       \\\n\t(elm)->field.cqe_next = (listelm);                              \\\n\t(elm)->field.cqe_prev = (listelm)->field.cqe_prev;              \\\n\tif ((listelm)->field.cqe_prev == (void *)(head))                \\\n\t        (head)->cqh_first = (elm);                              \\\n\telse                                                            \\\n\t        (listelm)->field.cqe_prev->field.cqe_next = (elm);      \\\n\t(listelm)->field.cqe_prev = (elm);                              \\\n} while (0)\n\n#define CIRCLEQ_INSERT_HEAD(head, elm, field) do {                      \\\n\tCIRCLEQ_CHECK_HEAD(head, field);                                \\\n\t(elm)->field.cqe_next = (head)->cqh_first;                      \\\n\t(elm)->field.cqe_prev = (void *)(head);                         \\\n\tif ((head)->cqh_last == (void *)(head))                         \\\n\t        (head)->cqh_last = (elm);                               \\\n\telse                                                            \\\n\t        (head)->cqh_first->field.cqe_prev = (elm);              \\\n\t(head)->cqh_first = (elm);                                      \\\n} while (0)\n\n#define CIRCLEQ_INSERT_TAIL(head, elm, field) do {                      \\\n\t(elm)->field.cqe_next = (void *)(head);                         \\\n\t(elm)->field.cqe_prev = (head)->cqh_last;                       \\\n\tif ((head)->cqh_first == (void *)(head))                        \\\n\t        (head)->cqh_first = (elm);                              \\\n\telse                                                            \\\n\t        (head)->cqh_last->field.cqe_next = (elm);               \\\n\t(head)->cqh_last = (elm);                                       \\\n} while (0)\n\n#define CIRCLEQ_LAST(head) ((head)->cqh_last)\n\n#define CIRCLEQ_NEXT(elm, field) ((elm)->field.cqe_next)\n\n#define CIRCLEQ_PREV(elm, field) ((elm)->field.cqe_prev)\n\n#define CIRCLEQ_REMOVE(head, elm, field) do {                           \\\n\tCIRCLEQ_CHECK_NEXT(head, elm, field);                           \\\n\tCIRCLEQ_CHECK_PREV(head, elm, field);                           \\\n\tif ((elm)->field.cqe_next == (void *)(head))                    \\\n\t        (head)->cqh_last = (elm)->field.cqe_prev;               \\\n\telse                                                            \\\n\t        (elm)->field.cqe_next->field.cqe_prev =                 \\\n\t            (elm)->field.cqe_prev;                              \\\n\tif ((elm)->field.cqe_prev == (void *)(head))                    \\\n\t        (head)->cqh_first = (elm)->field.cqe_next;              \\\n\telse                                                            \\\n\t        (elm)->field.cqe_prev->field.cqe_next =                 \\\n\t            (elm)->field.cqe_next;                              \\\n} while (0)\n\n#ifdef _KERNEL\n\n#if NOTFB31\n\n/*\n * XXX insque() and remque() are an old way of handling certain queues.\n * They bogusly assumes that all queue heads look alike.\n */\n\nstruct quehead {\n\tstruct quehead *qh_link;\n\tstruct quehead *qh_rlink;\n};\n\n#ifdef __GNUC__\n#define chkquenext(a)\n#define chkqueprev(a)\n\nstatic __inline void\ninsque(void *a, void *b)\n{\n\tstruct quehead *element = (struct quehead *)a,\n\t    *head = (struct quehead *)b;\n\tchkquenext(head);\n\n\telement->qh_link = head->qh_link;\n\telement->qh_rlink = head;\n\thead->qh_link = element;\n\telement->qh_link->qh_rlink = element;\n}\n\nstatic __inline void\nremque(void *a)\n{\n\tstruct quehead *element = (struct quehead *)a;\n\tchkquenext(element);\n\tchkqueprev(element);\n\n\telement->qh_link->qh_rlink = element->qh_rlink;\n\telement->qh_rlink->qh_link = element->qh_link;\n\telement->qh_rlink = 0;\n}\n\n#else /* !__GNUC__ */\n\nvoid    insque(void *a, void *b);\nvoid    remque(void *a);\n\n#endif /* __GNUC__ */\n\n#endif /* NOTFB31 */\n#endif /* _KERNEL */\n\n#endif /* !_SYS_QUEUE_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/quota.h",
    "content": "/*\n * Copyright (c) 2000-2019 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/*\n * Copyright (c) 1982, 1986, 1993\n *\tThe Regents of the University of California.  All rights reserved.\n *\n * This code is derived from software contributed to Berkeley by\n * Robert Elz at The University of Melbourne.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *\tThis product includes software developed by the University of\n *\tCalifornia, Berkeley and its contributors.\n * 4. Neither the name of the University nor the names of its contributors\n *    may be used to endorse or promote products derived from this software\n *    without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n *\t@(#)quota.h\n *\tderived from @(#)ufs/ufs/quota.h\t8.3 (Berkeley) 8/19/94\n */\n\n#ifndef _SYS_QUOTA_H\n#define _SYS_QUOTA_H\n\n#include <sys/appleapiopts.h>\n#include <sys/cdefs.h>\n#include <sys/types.h> /* u_int32_t */\n\n#include <mach/boolean.h>\n\n#ifdef __APPLE_API_UNSTABLE\n/*\n * Definitions for disk quotas imposed on the average user\n * (big brother finally hits UNIX).\n *\n * The following constants define the amount of time given a user before the\n * soft limits are treated as hard limits (usually resulting in an allocation\n * failure). The timer is started when the user crosses their soft limit, it\n * is reset when they go below their soft limit.\n */\n#define MAX_IQ_TIME     (7*24*60*60)    /* seconds in 1 week */\n#define MAX_DQ_TIME     (7*24*60*60)    /* seconds in 1 week */\n\n/*\n * The following constants define the usage of the quota file array in the\n * file system mount structure and dquot array in the inode structure.  The semantics\n * of the elements of these arrays are defined in the routine getinoquota;\n * the remainder of the quota code treats them generically and need not be\n * inspected when changing the size of the array.\n */\n#define MAXQUOTAS       2\n#define USRQUOTA        0       /* element used for user quotas */\n#define GRPQUOTA        1       /* element used for group quotas */\n\n/*\n * Definitions for the default names of the quotas files.\n */\n#define INITQFNAMES { \\\n\t\"user\",         /* USRQUOTA */ \\\n\t\"group\",        /* GRPQUOTA */ \\\n\t\"undefined\", \\\n};\n#define QUOTAFILENAME   \".quota\"\n#define QUOTAOPSNAME    \".quota.ops\"\n#define QUOTAGROUP      \"operator\"\n\n/*\n * Command definitions for the 'quotactl' system call.  The commands are\n * broken into a main command defined below and a subcommand that is used\n * to convey the type of quota that is being manipulated (see above).\n */\n#define SUBCMDMASK      0x00ff\n#define SUBCMDSHIFT     8\n#define QCMD(cmd, type) (((cmd) << SUBCMDSHIFT) | ((type) & SUBCMDMASK))\n\n#define Q_QUOTAON       0x0100  /* enable quotas */\n#define Q_QUOTAOFF      0x0200  /* disable quotas */\n#define Q_GETQUOTA      0x0300  /* get limits and usage */\n#define Q_SETQUOTA      0x0400  /* set limits and usage */\n#define Q_SETUSE        0x0500  /* set usage */\n#define Q_SYNC          0x0600  /* sync disk copy of a filesystems quotas */\n#define Q_QUOTASTAT     0x0700  /* get quota on/off status */\n\n/*\n * The following two structures define the format of the disk\n * quota file (as it appears on disk) - the file contains a\n * header followed by a hash table of dqblk entries.  To find\n * a particular entry, the user or group number (id) is first\n * converted to an index into this table by means of the hash\n * function dqhash1.  If there is a collision at that index\n * location then a second hash value is computed which using\n * dqhash2.  This second hash value is then used as an offset\n * to the next location to probe.  ID = 0 is used to indicate\n * an empty (unused) entry.  So there can never be an entry in\n * the quota file for user 0 or group 0 (which is OK since disk\n * quotas are never enforced for user 0).\n *\n * The setquota system call establishes the vnode for each quota\n * file (a pointer is retained in the filesystem  mount structure).\n */\nstruct dqfilehdr {\n\tu_int32_t dqh_magic;\n\tu_int32_t dqh_version;          /* == QF_VERSION */\n\tu_int32_t dqh_maxentries;       /* must be a power of 2 */\n\tu_int32_t dqh_entrycnt;         /* count of active entries */\n\tu_int32_t dqh_flags;            /* reserved for now (0) */\n\tu_int32_t dqh_chktime;          /* time of last quota check */\n\tu_int32_t dqh_btime;            /* time limit for excessive disk use */\n\tu_int32_t dqh_itime;            /* time limit for excessive files */\n\tchar      dqh_string[16];       /* tag string */\n\tu_int32_t dqh_spare[4];         /* pad struct to power of 2 */\n};\n\nstruct dqblk {\n\tu_int64_t dqb_bhardlimit;       /* absolute limit on disk bytes alloc */\n\tu_int64_t dqb_bsoftlimit;       /* preferred limit on disk bytes */\n\tu_int64_t dqb_curbytes;         /* current byte count */\n\tu_int32_t dqb_ihardlimit;       /* maximum # allocated inodes + 1 */\n\tu_int32_t dqb_isoftlimit;       /* preferred inode limit */\n\tu_int32_t dqb_curinodes;        /* current # allocated inodes */\n\tu_int32_t dqb_btime;            /* time limit for excessive disk use */\n\tu_int32_t dqb_itime;            /* time limit for excessive files */\n\tu_int32_t dqb_id;               /* identifier (0 for empty entries) */\n\tu_int32_t dqb_spare[4];         /* pad struct to power of 2 */\n};\n\n\n#define INITQMAGICS { \\\n\t0xff31ff35,     /* USRQUOTA */ \\\n\t0xff31ff27,     /* GRPQUOTA */ \\\n}\n\n#define QF_VERSION          1\n#define QF_STRING_TAG       \"QUOTA HASH FILE\"\n\n#define QF_USERS_PER_GB     256\n#define QF_MIN_USERS        2048\n#define QF_MAX_USERS       (2048*1024)\n\n#define QF_GROUPS_PER_GB    32\n#define QF_MIN_GROUPS       2048\n#define QF_MAX_GROUPS       (256*1024)\n\n\n/*\n * The primary and secondary multiplicative hash functions are\n * derived from Knuth (vol. 3). They use a prime that is in\n * golden ratio to the machine's word size.\n */\n#define dqhash1(id, shift, mask)  \\\n\t((((id) * 2654435761U) >> (shift)) & (mask))\n\n#define dqhash2(id, mask)  \\\n\t(dqhash1((id), 11, (mask)>>1) | 1)\n\n/*\n * Compute a disk offset into a quota file.\n */\n#define dqoffset(index)  \\\n\t(sizeof (struct dqfilehdr) + ((index) * sizeof (struct dqblk)))\n/*\n * Compute the hash shift value.\n * It is the word size, in bits, minus the hash table size, in bits.\n */\nstatic __inline int dqhashshift(u_int32_t);\n\nstatic __inline int\ndqhashshift(u_int32_t size)\n{\n\tint shift;\n\n\tfor (shift = 32; size > 1; size >>= 1, --shift) {\n\t\tcontinue;\n\t}\n\treturn shift;\n}\n\n\n__BEGIN_DECLS\nint quotactl(const char *, int, int, caddr_t);\n__END_DECLS\n\n\n#endif /* __APPLE_API_UNSTABLE */\n\n#endif /* !_SYS_QUOTA_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/random.h",
    "content": "/*\n * Copyright (c) 1999, 2000-2005 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n\n#ifndef __SYS_RANDOM_H__\n#define __SYS_RANDOM_H__\n\n#include <Availability.h>\n#include <stddef.h>\n#include <sys/appleapiopts.h>\n#include <sys/cdefs.h>\n\n__BEGIN_DECLS\nint getentropy(void* buffer, size_t size) __OSX_AVAILABLE(10.12) __IOS_AVAILABLE(10.0) __TVOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0);\n__END_DECLS\n\n#endif /* __SYS_RANDOM_H__ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/rbtree.h",
    "content": "/*\t$NetBSD: rbtree.h,v 1.2 2012/02/17 08:20:55 yamt Exp $\t*/\n\n/*-\n * Copyright (c) 2001 The NetBSD Foundation, Inc.\n * All rights reserved.\n *\n * Portions Copyright (c) 2012 Apple Inc. All rights reserved.\n *\n * This code is derived from software contributed to The NetBSD Foundation\n * by Matt Thomas <matt@3am-software.com>.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS\n * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED\n * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS\n * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n\n#ifndef _SYS_RBTREE_H_\n#define\t_SYS_RBTREE_H_\n\n#include <Availability.h>\n\n#include <sys/types.h>\n#include <stdbool.h>\n#include <inttypes.h>\n#include <sys/queue.h>\n\n__BEGIN_DECLS\n\n\n#define\tRB_DIR_LEFT\t\t0\n#define\tRB_DIR_RIGHT\t\t1\n\n#define RB_TREE_MIN(T) rb_tree_iterate((T), NULL, RB_DIR_RIGHT)\n#define RB_TREE_MAX(T) rb_tree_iterate((T), NULL, RB_DIR_LEFT)\n#define RB_TREE_FOREACH(N, T) \\\n    for ((N) = RB_TREE_MIN(T); (N); \\\n\t(N) = rb_tree_iterate((T), (N), RB_DIR_RIGHT))\n#define RB_TREE_FOREACH_SAFE(N, T, TVAR) \\\n    for ((N) = RB_TREE_MIN(T); (N) && ((TVAR) = rb_tree_iterate((T), (N), RB_DIR_RIGHT), 1); \\\n\t(N) = (TVAR))\n#define RB_TREE_FOREACH_REVERSE(N, T) \\\n    for ((N) = RB_TREE_MAX(T); (N); \\\n\t(N) = rb_tree_iterate((T), (N), RB_DIR_LEFT))\n#define RB_TREE_FOREACH_REVERSE_SAFE(N, T, TVAR) \\\n    for ((N) = RB_TREE_MAX(T); (N) && ((TVAR) = rb_tree_iterate((T), (N), RB_DIR_LEFT), 1); \\\n\t(N) = (TVAR))\n\n\n/*\n * rbto_compare_nodes_fn:\n *\treturn a positive value if the first node > the second node.\n *\treturn a negative value if the first node < the second node.\n *\treturn 0 if they are considered same.\n *\n * rbto_compare_key_fn:\n *\treturn a positive value if the node > the key.\n *\treturn a negative value if the node < the key.\n *\treturn 0 if they are considered same.\n */\n\ntypedef signed int (*rbto_compare_nodes_fn)(void *, const void *, const void *);\ntypedef signed int (*rbto_compare_key_fn)(void *, const void *, const void *);\n\ntypedef struct {\n\trbto_compare_nodes_fn rbto_compare_nodes;\n\trbto_compare_key_fn rbto_compare_key;\n\tsize_t rbto_node_offset;\n\tvoid *rbto_context;\n} rb_tree_ops_t;\n\ntypedef struct rb_node { void * opaque[3]; } rb_node_t;\ntypedef struct rb_tree { void *opaque[8]; } rb_tree_t;\n\n#define _rb_availability __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0);\nvoid\trb_tree_init(rb_tree_t *, const rb_tree_ops_t *) _rb_availability;\nvoid *\trb_tree_insert_node(rb_tree_t *, void *) _rb_availability;\nvoid *\trb_tree_find_node(rb_tree_t *, const void *) _rb_availability;\nvoid *\trb_tree_find_node_geq(rb_tree_t *, const void *) _rb_availability;\nvoid *\trb_tree_find_node_leq(rb_tree_t *, const void *) _rb_availability;\nvoid\trb_tree_remove_node(rb_tree_t *, void *) _rb_availability;\nvoid *\trb_tree_iterate(rb_tree_t *, void *, const unsigned int) _rb_availability;\nsize_t  rb_tree_count(rb_tree_t *) _rb_availability;\n#undef _rb_availability\n\n__END_DECLS\n\n#endif\t/* _SYS_RBTREE_H_*/\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/reboot.h",
    "content": "/*\n * Copyright (c) 2000-2006 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */\n/*\n * Copyright (c) 1982, 1986, 1988, 1993, 1994\n *\tThe Regents of the University of California.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *\tThis product includes software developed by the University of\n *\tCalifornia, Berkeley and its contributors.\n * 4. Neither the name of the University nor the names of its contributors\n *    may be used to endorse or promote products derived from this software\n *    without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n *\t@(#)reboot.h\t8.3 (Berkeley) 12/13/94\n */\n\n#ifndef _SYS_REBOOT_H_\n#define _SYS_REBOOT_H_\n\n#include <sys/appleapiopts.h>\n#include <sys/cdefs.h>\n#include <stdint.h>\n\n/*\n * Arguments to reboot system call.\n */\n\n#ifdef __APPLE_API_PRIVATE\n#define RB_AUTOBOOT     0       /* flags for system auto-booting itself */\n\n#define RB_ASKNAME      0x01    /* ask for file name to reboot from */\n#define RB_SINGLE       0x02    /* reboot to single user only */\n#define RB_NOSYNC       0x04    /* dont sync before reboot */\n#define RB_HALT         0x08    /* don't reboot, just halt */\n#define RB_INITNAME     0x10    /* name given for /etc/init */\n#define RB_DFLTROOT     0x20    /* use compiled-in rootdev */\n#define RB_ALTBOOT      0x40    /* use /boot.old vs /boot */\n#define RB_UNIPROC      0x80    /* don't start slaves */\n#define RB_SAFEBOOT     0x100   /* booting safe */\n#define RB_UPSDELAY 0x200   /* Delays restart by 5 minutes */\n#define RB_QUICK        0x400   /* quick and ungraceful reboot with file system caches flushed*/\n#define RB_PANIC        0x800   /* panic the kernel */\n#define RB_PANIC_ZPRINT 0x1000   /* add zprint info to panic string */\n\n__BEGIN_DECLS\n/* userspace reboot control */\nint usrctl(uint32_t flags);\n/* The normal reboot syscall. */\nint reboot(int howto);\n/* Used with RB_PANIC to panic the kernel from userspace with a message.\n * Requires an entitlement on Release. */\nint reboot_np(int howto, const char *message);\n__END_DECLS\n\n#endif /* __APPLE_API_PRIVATE */\n\n#ifdef __APPLE_API_OBSOLETE\n/*\n * Constants for converting boot-style device number to type,\n * adaptor (uba, mba, etc), unit number and partition number.\n * Type (== major device number) is in the low byte\n * for backward compatibility.  Except for that of the \"magic\n * number\", each mask applies to the shifted value.\n * Format:\n *\t (4) (4) (4) (4)  (8)     (8)\n *\t--------------------------------\n *\t|MA | AD| CT| UN| PART  | TYPE |\n *\t--------------------------------\n */\n#define B_ADAPTORSHIFT  24\n#define B_ADAPTORMASK   0x0f\n#define B_ADAPTOR(val)          (((val) >> B_ADAPTORSHIFT) & B_ADAPTORMASK)\n#define B_CONTROLLERSHIFT       20\n#define B_CONTROLLERMASK        0xf\n#define B_CONTROLLER(val)       (((val)>>B_CONTROLLERSHIFT) & B_CONTROLLERMASK)\n#define B_UNITSHIFT     16\n#define B_UNITMASK      0xff\n#define B_UNIT(val)             (((val) >> B_UNITSHIFT) & B_UNITMASK)\n#define B_PARTITIONSHIFT 8\n#define B_PARTITIONMASK 0xff\n#define B_PARTITION(val)        (((val) >> B_PARTITIONSHIFT) & B_PARTITIONMASK)\n#define B_TYPESHIFT     0\n#define B_TYPEMASK      0xff\n#define B_TYPE(val)             (((val) >> B_TYPESHIFT) & B_TYPEMASK)\n#define B_MAGICMASK     0xf0000000\n#define B_DEVMAGIC      0xa0000000\n\n#define MAKEBOOTDEV(type, adaptor, controller, unit, partition) \\\n\t(((type) << B_TYPESHIFT) | ((adaptor) << B_ADAPTORSHIFT) | \\\n\t((controller) << B_CONTROLLERSHIFT) | ((unit) << B_UNITSHIFT) | \\\n\t((partition) << B_PARTITIONSHIFT) | B_DEVMAGIC)\n\n#endif /* __APPLE_API_OBSOLETE */\n\n\n\n#endif  /* _SYS_REBOOT_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/resource.h",
    "content": "/*\n * Copyright (c) 2000-2018 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */\n/*\n * Copyright (c) 1982, 1986, 1993\n *\tThe Regents of the University of California.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *\tThis product includes software developed by the University of\n *\tCalifornia, Berkeley and its contributors.\n * 4. Neither the name of the University nor the names of its contributors\n *    may be used to endorse or promote products derived from this software\n *    without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n *\t@(#)resource.h\t8.2 (Berkeley) 1/4/94\n */\n\n#ifndef _SYS_RESOURCE_H_\n#define _SYS_RESOURCE_H_\n\n#include <sys/appleapiopts.h>\n#include <sys/cdefs.h>\n#include <sys/_types.h>\n\n#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL\n#include <stdint.h>\n#endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */\n\n#include <Availability.h>\n\n/* [XSI] The timeval structure shall be defined as described in\n * <sys/time.h>\n */\n#include <sys/_types/_timeval.h>\n\n/* The id_t type shall be defined as described in <sys/types.h> */\n#include <sys/_types/_id_t.h>\n\n\n/*\n * Resource limit type (low 63 bits, excluding the sign bit)\n */\ntypedef __uint64_t      rlim_t;\n\n\n/*****\n * PRIORITY\n */\n\n/*\n * Possible values of the first parameter to getpriority()/setpriority(),\n * used to indicate the type of the second parameter.\n */\n#define PRIO_PROCESS    0               /* Second argument is a PID */\n#define PRIO_PGRP       1               /* Second argument is a GID */\n#define PRIO_USER       2               /* Second argument is a UID */\n\n#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL\n#define PRIO_DARWIN_THREAD      3               /* Second argument is always 0 (current thread) */\n#define PRIO_DARWIN_PROCESS     4               /* Second argument is a PID */\n\n\n/*\n * Range limitations for the value of the third parameter to setpriority().\n */\n#define PRIO_MIN        -20\n#define PRIO_MAX        20\n\n/*\n * use PRIO_DARWIN_BG to set the current thread into \"background\" state\n * which lowers CPU, disk IO, and networking priorites until thread terminates\n * or \"background\" state is revoked\n */\n#define PRIO_DARWIN_BG 0x1000\n\n/*\n * use PRIO_DARWIN_NONUI to restrict a process's ability to make calls to\n * the GPU. (deprecated)\n */\n#define PRIO_DARWIN_NONUI 0x1001\n\n#endif  /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */\n\n\n\n/*****\n * RESOURCE USAGE\n */\n\n/*\n * Possible values of the first parameter to getrusage(), used to indicate\n * the scope of the information to be returned.\n */\n#define RUSAGE_SELF     0               /* Current process information */\n#define RUSAGE_CHILDREN -1              /* Current process' children */\n\n/*\n * A structure representing an accounting of resource utilization.  The\n * address of an instance of this structure is the second parameter to\n * getrusage().\n *\n * Note: All values other than ru_utime and ru_stime are implementaiton\n *       defined and subject to change in a future release.  Their use\n *       is discouraged for standards compliant programs.\n */\nstruct  rusage {\n\tstruct timeval ru_utime;        /* user time used (PL) */\n\tstruct timeval ru_stime;        /* system time used (PL) */\n#if __DARWIN_C_LEVEL < __DARWIN_C_FULL\n\tlong    ru_opaque[14];          /* implementation defined */\n#else\n\t/*\n\t * Informational aliases for source compatibility with programs\n\t * that need more information than that provided by standards,\n\t * and which do not mind being OS-dependent.\n\t */\n\tlong    ru_maxrss;              /* max resident set size (PL) */\n#define ru_first        ru_ixrss        /* internal: ruadd() range start */\n\tlong    ru_ixrss;               /* integral shared memory size (NU) */\n\tlong    ru_idrss;               /* integral unshared data (NU)  */\n\tlong    ru_isrss;               /* integral unshared stack (NU) */\n\tlong    ru_minflt;              /* page reclaims (NU) */\n\tlong    ru_majflt;              /* page faults (NU) */\n\tlong    ru_nswap;               /* swaps (NU) */\n\tlong    ru_inblock;             /* block input operations (atomic) */\n\tlong    ru_oublock;             /* block output operations (atomic) */\n\tlong    ru_msgsnd;              /* messages sent (atomic) */\n\tlong    ru_msgrcv;              /* messages received (atomic) */\n\tlong    ru_nsignals;            /* signals received (atomic) */\n\tlong    ru_nvcsw;               /* voluntary context switches (atomic) */\n\tlong    ru_nivcsw;              /* involuntary \" */\n#define ru_last         ru_nivcsw       /* internal: ruadd() range end */\n#endif  /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */\n};\n\n#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL\n/*\n * Flavors for proc_pid_rusage().\n */\n#define RUSAGE_INFO_V0  0\n#define RUSAGE_INFO_V1  1\n#define RUSAGE_INFO_V2  2\n#define RUSAGE_INFO_V3  3\n#define RUSAGE_INFO_V4  4\n#define RUSAGE_INFO_V5  5\n#define RUSAGE_INFO_CURRENT     RUSAGE_INFO_V5\n\n/*\n * Flags for RUSAGE_INFO_V5\n */\n#define RU_PROC_RUNS_RESLIDE    0x00000001      /* proc has reslid shared cache */\n\ntypedef void *rusage_info_t;\n\nstruct rusage_info_v0 {\n\tuint8_t  ri_uuid[16];\n\tuint64_t ri_user_time;\n\tuint64_t ri_system_time;\n\tuint64_t ri_pkg_idle_wkups;\n\tuint64_t ri_interrupt_wkups;\n\tuint64_t ri_pageins;\n\tuint64_t ri_wired_size;\n\tuint64_t ri_resident_size;\n\tuint64_t ri_phys_footprint;\n\tuint64_t ri_proc_start_abstime;\n\tuint64_t ri_proc_exit_abstime;\n};\n\nstruct rusage_info_v1 {\n\tuint8_t  ri_uuid[16];\n\tuint64_t ri_user_time;\n\tuint64_t ri_system_time;\n\tuint64_t ri_pkg_idle_wkups;\n\tuint64_t ri_interrupt_wkups;\n\tuint64_t ri_pageins;\n\tuint64_t ri_wired_size;\n\tuint64_t ri_resident_size;\n\tuint64_t ri_phys_footprint;\n\tuint64_t ri_proc_start_abstime;\n\tuint64_t ri_proc_exit_abstime;\n\tuint64_t ri_child_user_time;\n\tuint64_t ri_child_system_time;\n\tuint64_t ri_child_pkg_idle_wkups;\n\tuint64_t ri_child_interrupt_wkups;\n\tuint64_t ri_child_pageins;\n\tuint64_t ri_child_elapsed_abstime;\n};\n\nstruct rusage_info_v2 {\n\tuint8_t  ri_uuid[16];\n\tuint64_t ri_user_time;\n\tuint64_t ri_system_time;\n\tuint64_t ri_pkg_idle_wkups;\n\tuint64_t ri_interrupt_wkups;\n\tuint64_t ri_pageins;\n\tuint64_t ri_wired_size;\n\tuint64_t ri_resident_size;\n\tuint64_t ri_phys_footprint;\n\tuint64_t ri_proc_start_abstime;\n\tuint64_t ri_proc_exit_abstime;\n\tuint64_t ri_child_user_time;\n\tuint64_t ri_child_system_time;\n\tuint64_t ri_child_pkg_idle_wkups;\n\tuint64_t ri_child_interrupt_wkups;\n\tuint64_t ri_child_pageins;\n\tuint64_t ri_child_elapsed_abstime;\n\tuint64_t ri_diskio_bytesread;\n\tuint64_t ri_diskio_byteswritten;\n};\n\nstruct rusage_info_v3 {\n\tuint8_t  ri_uuid[16];\n\tuint64_t ri_user_time;\n\tuint64_t ri_system_time;\n\tuint64_t ri_pkg_idle_wkups;\n\tuint64_t ri_interrupt_wkups;\n\tuint64_t ri_pageins;\n\tuint64_t ri_wired_size;\n\tuint64_t ri_resident_size;\n\tuint64_t ri_phys_footprint;\n\tuint64_t ri_proc_start_abstime;\n\tuint64_t ri_proc_exit_abstime;\n\tuint64_t ri_child_user_time;\n\tuint64_t ri_child_system_time;\n\tuint64_t ri_child_pkg_idle_wkups;\n\tuint64_t ri_child_interrupt_wkups;\n\tuint64_t ri_child_pageins;\n\tuint64_t ri_child_elapsed_abstime;\n\tuint64_t ri_diskio_bytesread;\n\tuint64_t ri_diskio_byteswritten;\n\tuint64_t ri_cpu_time_qos_default;\n\tuint64_t ri_cpu_time_qos_maintenance;\n\tuint64_t ri_cpu_time_qos_background;\n\tuint64_t ri_cpu_time_qos_utility;\n\tuint64_t ri_cpu_time_qos_legacy;\n\tuint64_t ri_cpu_time_qos_user_initiated;\n\tuint64_t ri_cpu_time_qos_user_interactive;\n\tuint64_t ri_billed_system_time;\n\tuint64_t ri_serviced_system_time;\n};\n\nstruct rusage_info_v4 {\n\tuint8_t  ri_uuid[16];\n\tuint64_t ri_user_time;\n\tuint64_t ri_system_time;\n\tuint64_t ri_pkg_idle_wkups;\n\tuint64_t ri_interrupt_wkups;\n\tuint64_t ri_pageins;\n\tuint64_t ri_wired_size;\n\tuint64_t ri_resident_size;\n\tuint64_t ri_phys_footprint;\n\tuint64_t ri_proc_start_abstime;\n\tuint64_t ri_proc_exit_abstime;\n\tuint64_t ri_child_user_time;\n\tuint64_t ri_child_system_time;\n\tuint64_t ri_child_pkg_idle_wkups;\n\tuint64_t ri_child_interrupt_wkups;\n\tuint64_t ri_child_pageins;\n\tuint64_t ri_child_elapsed_abstime;\n\tuint64_t ri_diskio_bytesread;\n\tuint64_t ri_diskio_byteswritten;\n\tuint64_t ri_cpu_time_qos_default;\n\tuint64_t ri_cpu_time_qos_maintenance;\n\tuint64_t ri_cpu_time_qos_background;\n\tuint64_t ri_cpu_time_qos_utility;\n\tuint64_t ri_cpu_time_qos_legacy;\n\tuint64_t ri_cpu_time_qos_user_initiated;\n\tuint64_t ri_cpu_time_qos_user_interactive;\n\tuint64_t ri_billed_system_time;\n\tuint64_t ri_serviced_system_time;\n\tuint64_t ri_logical_writes;\n\tuint64_t ri_lifetime_max_phys_footprint;\n\tuint64_t ri_instructions;\n\tuint64_t ri_cycles;\n\tuint64_t ri_billed_energy;\n\tuint64_t ri_serviced_energy;\n\tuint64_t ri_interval_max_phys_footprint;\n\tuint64_t ri_runnable_time;\n};\n\nstruct rusage_info_v5 {\n\tuint8_t  ri_uuid[16];\n\tuint64_t ri_user_time;\n\tuint64_t ri_system_time;\n\tuint64_t ri_pkg_idle_wkups;\n\tuint64_t ri_interrupt_wkups;\n\tuint64_t ri_pageins;\n\tuint64_t ri_wired_size;\n\tuint64_t ri_resident_size;\n\tuint64_t ri_phys_footprint;\n\tuint64_t ri_proc_start_abstime;\n\tuint64_t ri_proc_exit_abstime;\n\tuint64_t ri_child_user_time;\n\tuint64_t ri_child_system_time;\n\tuint64_t ri_child_pkg_idle_wkups;\n\tuint64_t ri_child_interrupt_wkups;\n\tuint64_t ri_child_pageins;\n\tuint64_t ri_child_elapsed_abstime;\n\tuint64_t ri_diskio_bytesread;\n\tuint64_t ri_diskio_byteswritten;\n\tuint64_t ri_cpu_time_qos_default;\n\tuint64_t ri_cpu_time_qos_maintenance;\n\tuint64_t ri_cpu_time_qos_background;\n\tuint64_t ri_cpu_time_qos_utility;\n\tuint64_t ri_cpu_time_qos_legacy;\n\tuint64_t ri_cpu_time_qos_user_initiated;\n\tuint64_t ri_cpu_time_qos_user_interactive;\n\tuint64_t ri_billed_system_time;\n\tuint64_t ri_serviced_system_time;\n\tuint64_t ri_logical_writes;\n\tuint64_t ri_lifetime_max_phys_footprint;\n\tuint64_t ri_instructions;\n\tuint64_t ri_cycles;\n\tuint64_t ri_billed_energy;\n\tuint64_t ri_serviced_energy;\n\tuint64_t ri_interval_max_phys_footprint;\n\tuint64_t ri_runnable_time;\n\tuint64_t ri_flags;\n};\n\ntypedef struct rusage_info_v5 rusage_info_current;\n\n#endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */\n\n\n\n/*****\n * RESOURCE LIMITS\n */\n\n/*\n * Symbolic constants for resource limits; since all limits are representable\n * as a type rlim_t, we are permitted to define RLIM_SAVED_* in terms of\n * RLIM_INFINITY.\n */\n#define RLIM_INFINITY   (((__uint64_t)1 << 63) - 1)     /* no limit */\n#define RLIM_SAVED_MAX  RLIM_INFINITY   /* Unrepresentable hard limit */\n#define RLIM_SAVED_CUR  RLIM_INFINITY   /* Unrepresentable soft limit */\n\n/*\n * Possible values of the first parameter to getrlimit()/setrlimit(), to\n * indicate for which resource the operation is being performed.\n */\n#define RLIMIT_CPU      0               /* cpu time per process */\n#define RLIMIT_FSIZE    1               /* file size */\n#define RLIMIT_DATA     2               /* data segment size */\n#define RLIMIT_STACK    3               /* stack size */\n#define RLIMIT_CORE     4               /* core file size */\n#define RLIMIT_AS       5               /* address space (resident set size) */\n#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL\n#define RLIMIT_RSS      RLIMIT_AS       /* source compatibility alias */\n#define RLIMIT_MEMLOCK  6               /* locked-in-memory address space */\n#define RLIMIT_NPROC    7               /* number of processes */\n#endif  /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */\n#define RLIMIT_NOFILE   8               /* number of open files */\n#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL\n#define RLIM_NLIMITS    9               /* total number of resource limits */\n#endif  /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */\n#define _RLIMIT_POSIX_FLAG      0x1000  /* Set bit for strict POSIX */\n\n/*\n * A structure representing a resource limit.  The address of an instance\n * of this structure is the second parameter to getrlimit()/setrlimit().\n */\nstruct rlimit {\n\trlim_t  rlim_cur;               /* current (soft) limit */\n\trlim_t  rlim_max;               /* maximum value for rlim_cur */\n};\n\n#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL\n/*\n * proc_rlimit_control()\n *\n * Resource limit flavors\n */\n#define RLIMIT_WAKEUPS_MONITOR          0x1 /* Configure the wakeups monitor. */\n#define RLIMIT_CPU_USAGE_MONITOR        0x2 /* Configure the CPU usage monitor. */\n#define RLIMIT_THREAD_CPULIMITS         0x3 /* Configure a blocking, per-thread, CPU limits. */\n#define RLIMIT_FOOTPRINT_INTERVAL       0x4 /* Configure memory footprint interval tracking */\n\n/*\n * Flags for wakeups monitor control.\n */\n#define WAKEMON_ENABLE                  0x01\n#define WAKEMON_DISABLE                 0x02\n#define WAKEMON_GET_PARAMS              0x04\n#define WAKEMON_SET_DEFAULTS            0x08\n#define WAKEMON_MAKE_FATAL              0x10 /* Configure the task so that violations are fatal. */\n\n/*\n * Flags for CPU usage monitor control.\n */\n#define CPUMON_MAKE_FATAL               0x1000\n\n/*\n * Flags for memory footprint interval tracking.\n */\n#define FOOTPRINT_INTERVAL_RESET        0x1 /* Reset the footprint interval counter to zero */\n\nstruct proc_rlimit_control_wakeupmon {\n\tuint32_t wm_flags;\n\tint32_t wm_rate;\n};\n\n\n\n/* I/O type */\n#define IOPOL_TYPE_DISK 0\n#define IOPOL_TYPE_VFS_ATIME_UPDATES 2\n#define IOPOL_TYPE_VFS_MATERIALIZE_DATALESS_FILES 3\n#define IOPOL_TYPE_VFS_STATFS_NO_DATA_VOLUME 4\n#define IOPOL_TYPE_VFS_TRIGGER_RESOLVE 5\n#define IOPOL_TYPE_VFS_IGNORE_CONTENT_PROTECTION 6\n#define IOPOL_TYPE_VFS_IGNORE_PERMISSIONS 7\n#define IOPOL_TYPE_VFS_SKIP_MTIME_UPDATE 8\n#define IOPOL_TYPE_VFS_ALLOW_LOW_SPACE_WRITES 9\n\n/* scope */\n#define IOPOL_SCOPE_PROCESS   0\n#define IOPOL_SCOPE_THREAD    1\n#define IOPOL_SCOPE_DARWIN_BG 2\n\n/* I/O Priority */\n#define IOPOL_DEFAULT           0\n#define IOPOL_IMPORTANT         1\n#define IOPOL_PASSIVE           2\n#define IOPOL_THROTTLE          3\n#define IOPOL_UTILITY           4\n#define IOPOL_STANDARD          5\n\n/* compatibility with older names */\n#define IOPOL_APPLICATION       IOPOL_STANDARD\n#define IOPOL_NORMAL            IOPOL_IMPORTANT\n\n\n#define IOPOL_ATIME_UPDATES_DEFAULT     0\n#define IOPOL_ATIME_UPDATES_OFF         1\n\n#define IOPOL_MATERIALIZE_DATALESS_FILES_DEFAULT 0\n#define IOPOL_MATERIALIZE_DATALESS_FILES_OFF     1\n#define IOPOL_MATERIALIZE_DATALESS_FILES_ON      2\n\n#define IOPOL_VFS_STATFS_NO_DATA_VOLUME_DEFAULT 0\n#define IOPOL_VFS_STATFS_FORCE_NO_DATA_VOLUME   1\n\n#define IOPOL_VFS_TRIGGER_RESOLVE_DEFAULT 0\n#define IOPOL_VFS_TRIGGER_RESOLVE_OFF     1\n\n#define IOPOL_VFS_CONTENT_PROTECTION_DEFAULT 0\n#define IOPOL_VFS_CONTENT_PROTECTION_IGNORE  1\n\n#define IOPOL_VFS_IGNORE_PERMISSIONS_OFF 0\n#define IOPOL_VFS_IGNORE_PERMISSIONS_ON  1\n\n#define IOPOL_VFS_SKIP_MTIME_UPDATE_OFF 0\n#define IOPOL_VFS_SKIP_MTIME_UPDATE_ON 1\n\n#define IOPOL_VFS_ALLOW_LOW_SPACE_WRITES_OFF 0\n#define IOPOL_VFS_ALLOW_LOW_SPACE_WRITES_ON 1\n\n#endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */\n\n\n__BEGIN_DECLS\nint     getpriority(int, id_t);\n#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL\nint     getiopolicy_np(int, int) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);\n#endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */\nint     getrlimit(int, struct rlimit *) __DARWIN_ALIAS(getrlimit);\nint     getrusage(int, struct rusage *);\nint     setpriority(int, id_t, int);\n#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL\nint     setiopolicy_np(int, int, int) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);\n#endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */\nint     setrlimit(int, const struct rlimit *) __DARWIN_ALIAS(setrlimit);\n__END_DECLS\n\n#endif  /* !_SYS_RESOURCE_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/resourcevar.h",
    "content": "/*\n * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/* Copyright (c) 1995, 1997 Apple Computer, Inc. All Rights Reserved */\n/*\n * Copyright (c) 1991, 1993\n *\tThe Regents of the University of California.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *\tThis product includes software developed by the University of\n *\tCalifornia, Berkeley and its contributors.\n * 4. Neither the name of the University nor the names of its contributors\n *    may be used to endorse or promote products derived from this software\n *    without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n *\t@(#)resourcevar.h\t8.4 (Berkeley) 1/9/95\n */\n\n#ifndef _SYS_RESOURCEVAR_H_\n#define _SYS_RESOURCEVAR_H_\n\n#include <sys/appleapiopts.h>\n#include <sys/resource.h>\n#include <sys/_types/_caddr_t.h>\n\n/*\n * Kernel per-process accounting / statistics\n * (not necessarily resident except when running).\n */\nstruct pstats {\n\tstruct  rusage            p_ru;         /* stats for this proc */\n\tstruct  rusage            p_cru;        /* (PL) sum of stats for reaped children */\n\n\tstruct uprof {                  /* profile arguments */\n\t\tstruct uprof *pr_next;  /* multiple prof buffers allowed */\n\t\tcaddr_t pr_base;        /* buffer base */\n\t\tu_int32_t       pr_size;        /* buffer size */\n\t\tu_int32_t       pr_off;         /* pc offset */\n\t\tu_int32_t       pr_scale;       /* pc scaling */\n\t\tu_int32_t       pr_addr;        /* temp storage for addr until AST */\n\t\tu_int32_t       pr_ticks;       /* temp storage for ticks until AST */\n\t} p_prof;\n\n\tuint64_t ps_start;              /* starting time ; compat only */\n};\n\n#endif  /* !_SYS_RESOURCEVAR_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/sbuf.h",
    "content": "/*-\n * Copyright (c) 2000 Poul-Henning Kamp and Dag-Erling Coïdan Smørgrav\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer\n *    in this position and unchanged.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. The name of the author may not be used to endorse or promote products\n *    derived from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,\n * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\n * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *\n *      $FreeBSD: /repoman/r/ncvs/src/sys/sys/sbuf.h,v 1.14 2004/07/09 11:35:30 des Exp $\n */\n\n#ifndef _SYS_SBUF_H_\n#define _SYS_SBUF_H_\n\n#include <sys/_types.h>\n#include <stdarg.h>\n#include <stddef.h>\n\n/*\n * Structure definition\n */\nstruct sbuf {\n\tchar            *s_buf;         /* storage buffer */\n\tvoid            *s_unused;      /* binary compatibility. */\n\tint              s_size;        /* size of storage buffer */\n\tint              s_len;         /* current length of string */\n#define SBUF_FIXEDLEN   0x00000000      /* fixed length buffer (default) */\n#define SBUF_AUTOEXTEND 0x00000001      /* automatically extend buffer */\n#define SBUF_USRFLAGMSK 0x0000ffff      /* mask of flags the user may specify */\n#define SBUF_DYNAMIC    0x00010000      /* s_buf must be freed */\n#define SBUF_FINISHED   0x00020000      /* set by sbuf_finish() */\n#define SBUF_OVERFLOWED 0x00040000      /* sbuf overflowed */\n#define SBUF_DYNSTRUCT  0x00080000      /* sbuf must be freed */\n\tint              s_flags;       /* flags */\n};\n\n__BEGIN_DECLS\n\n__END_DECLS\n\n#endif\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/sdt.h",
    "content": "/*\n * CDDL HEADER START\n *\n * The contents of this file are subject to the terms of the\n * Common Development and Distribution License, Version 1.0 only\n * (the \"License\").  You may not use this file except in compliance\n * with the License.\n *\n * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE\n * or http://www.opensolaris.org/os/licensing.\n * See the License for the specific language governing permissions\n * and limitations under the License.\n *\n * When distributing Covered Code, include this CDDL HEADER in each\n * file and include the License file at usr/src/OPENSOLARIS.LICENSE.\n * If applicable, add the following below this CDDL HEADER, with the\n * fields enclosed by brackets \"[]\" replaced with your own identifying\n * information: Portions Copyright [yyyy] [name of copyright owner]\n *\n * CDDL HEADER END\n */\n/*\n * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.\n * Use is subject to license terms.\n */\n\n#ifndef _SYS_SDT_H\n#define _SYS_SDT_H\n\n/*\n * This is a wrapper header that wraps the mach visible sdt.h header so that\n * the header file ends up visible where software expects it to be.  We also\n * do the C/C++ symbol wrapping here, since Mach headers are technically C\n * interfaces.\n *\n * Note:  The process of adding USDT probes to code is slightly different\n * than documented in the \"Solaris Dynamic Tracing Guide\".\n * The DTRACE_PROBE*() macros are not supported on Mac OS X -- instead see\n * \"BUILDING CODE CONTAINING USDT PROBES\" in the dtrace(1) manpage\n *\n */\n#include <sys/cdefs.h>\n__BEGIN_DECLS\n#include <mach/sdt.h>\n__END_DECLS\n\n#endif  /* _SYS_SDT_H */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/select.h",
    "content": "/*\n * Copyright (c) 2000-2005 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/*\n * Copyright (c) 1992, 1993\n *\tThe Regents of the University of California.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *\tThis product includes software developed by the University of\n *\tCalifornia, Berkeley and its contributors.\n * 4. Neither the name of the University nor the names of its contributors\n *    may be used to endorse or promote products derived from this software\n *    without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n *\t@(#)select.h\t8.2 (Berkeley) 1/4/94\n */\n\n#ifndef _SYS_SELECT_H_\n#define _SYS_SELECT_H_\n\n#include <sys/appleapiopts.h>\n#include <sys/cdefs.h>\n#include <sys/_types.h>\n\n/*\n * [XSI] The <sys/select.h> header shall define the fd_set type as a structure.\n * The timespec structure shall be defined as described in <time.h>\n * The <sys/select.h> header shall define the timeval structure.\n */\n#include <sys/_types/_fd_def.h>\n#include <sys/_types/_timespec.h>\n#include <sys/_types/_timeval.h>\n\n/*\n * The time_t and suseconds_t types shall be defined as described in\n * <sys/types.h>\n * The sigset_t type shall be defined as described in <signal.h>\n */\n#include <sys/_types/_time_t.h>\n#include <sys/_types/_suseconds_t.h>\n#include <sys/_types/_sigset_t.h>\n\n/*\n * [XSI] FD_CLR, FD_ISSET, FD_SET, FD_ZERO may be declared as a function, or\n *\t defined as a macro, or both\n * [XSI] FD_SETSIZE shall be defined as a macro\n */\n\n/*\n * Select uses bit masks of file descriptors in longs.  These macros\n * manipulate such bit fields (the filesystem macros use chars).  The\n * extra protection here is to permit application redefinition above\n * the default size.\n */\n#include <sys/_types/_fd_setsize.h>\n#include <sys/_types/_fd_set.h>\n#include <sys/_types/_fd_clr.h>\n#include <sys/_types/_fd_isset.h>\n#include <sys/_types/_fd_zero.h>\n\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n#include <sys/_types/_fd_copy.h>\n#endif  /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */\n\n\n__BEGIN_DECLS\n\n#ifndef  __MWERKS__\nint      pselect(int, fd_set * __restrict, fd_set * __restrict,\n    fd_set * __restrict, const struct timespec * __restrict,\n    const sigset_t * __restrict)\n#if defined(_DARWIN_C_SOURCE) || defined(_DARWIN_UNLIMITED_SELECT)\n__DARWIN_EXTSN_C(pselect)\n#else /* !_DARWIN_C_SOURCE && !_DARWIN_UNLIMITED_SELECT */\n#  if defined(__LP64__) && !__DARWIN_NON_CANCELABLE\n__DARWIN_1050(pselect)\n#  else /* !__LP64__ || __DARWIN_NON_CANCELABLE */\n__DARWIN_ALIAS_C(pselect)\n#  endif /* __LP64__ && !__DARWIN_NON_CANCELABLE */\n#endif /* _DARWIN_C_SOURCE || _DARWIN_UNLIMITED_SELECT */\n;\n#endif /* __MWERKS__ */\n\n#include <sys/_select.h>        /* select() prototype */\n\n__END_DECLS\n\n\n#endif /* !_SYS_SELECT_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/sem.h",
    "content": "/*\n * Copyright (c) 2000-2007 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/*\t$NetBSD: sem.h,v 1.5 1994/06/29 06:45:15 cgd Exp $\t*/\n\n/*\n * SVID compatible sem.h file\n *\n * Author:  Daniel Boulet\n * John Bellardo modified the implementation for Darwin. 12/2000\n */\n\n#ifndef _SYS_SEM_H_\n#define _SYS_SEM_H_\n\n\n#include <sys/cdefs.h>\n#include <sys/_types.h>\n#include <machine/types.h> /* __int32_t */\n\n/*\n * [XSI]\tAll of the symbols from <sys/ipc.h> SHALL be defined\n *\t\twhen this header is included\n */\n#include <sys/ipc.h>\n\n\n/*\n * [XSI] The pid_t, time_t, key_t, and size_t types shall be defined as\n * described in <sys/types.h>.\n *\n * NOTE:\tThe definition of the key_t type is implicit from the\n *\t\tinclusion of <sys/ipc.h>\n */\n#include <sys/_types/_pid_t.h>\n#include <sys/_types/_time_t.h>\n#include <sys/_types/_size_t.h>\n\n/*\n * Technically, we should force all code references to the new structure\n * definition, not in just the standards conformance case, and leave the\n * legacy interface there for binary compatibility only.  Currently, we\n * are only forcing this for programs requesting standards conformance.\n */\n#if __DARWIN_UNIX03 || defined(KERNEL)\n#pragma pack(4)\n/*\n * Structure used internally.\n *\n * This structure is exposed because standards dictate that it is used as\n * the semun union member 'buf' as the fourth argment to semctl() when the\n * third argument is IPC_STAT or IPC_SET.\n *\n * Note: only the fields sem_perm, sem_nsems, sem_otime, and sem_ctime\n * are meaningful in user space.\n */\n#if (defined(_POSIX_C_SOURCE) && !defined(_DARWIN_C_SOURCE))\nstruct semid_ds\n#else\n#define semid_ds        __semid_ds_new\nstruct __semid_ds_new\n#endif\n{\n\tstruct __ipc_perm_new sem_perm; /* [XSI] operation permission struct */\n\t__int32_t       sem_base;       /* 32 bit base ptr for semaphore set */\n\tunsigned short  sem_nsems;      /* [XSI] number of sems in set */\n\ttime_t          sem_otime;      /* [XSI] last operation time */\n\t__int32_t       sem_pad1;       /* RESERVED: DO NOT USE! */\n\ttime_t          sem_ctime;      /* [XSI] last change time */\n\t                                /* Times measured in secs since */\n\t                                /* 00:00:00 GMT, Jan. 1, 1970 */\n\t__int32_t       sem_pad2;       /* RESERVED: DO NOT USE! */\n\t__int32_t       sem_pad3[4];    /* RESERVED: DO NOT USE! */\n};\n#pragma pack()\n#else   /* !__DARWIN_UNIX03 */\n#define semid_ds        __semid_ds_old\n#endif  /* __DARWIN_UNIX03 */\n\n#if !__DARWIN_UNIX03\nstruct __semid_ds_old {\n\tstruct __ipc_perm_old sem_perm; /* [XSI] operation permission struct */\n\t__int32_t       sem_base;       /* 32 bit base ptr for semaphore set */\n\tunsigned short  sem_nsems;      /* [XSI] number of sems in set */\n\ttime_t          sem_otime;      /* [XSI] last operation time */\n\t__int32_t       sem_pad1;       /* RESERVED: DO NOT USE! */\n\ttime_t          sem_ctime;      /* [XSI] last change time */\n\t                                /* Times measured in secs since */\n\t                                /* 00:00:00 GMT, Jan. 1, 1970 */\n\t__int32_t       sem_pad2;       /* RESERVED: DO NOT USE! */\n\t__int32_t       sem_pad3[4];    /* RESERVED: DO NOT USE! */\n};\n#endif  /* !__DARWIN_UNIX03 */\n\n/*\n * Possible values for the third argument to semctl()\n */\n#define GETNCNT 3       /* [XSI] Return the value of semncnt {READ} */\n#define GETPID  4       /* [XSI] Return the value of sempid {READ} */\n#define GETVAL  5       /* [XSI] Return the value of semval {READ} */\n#define GETALL  6       /* [XSI] Return semvals into arg.array {READ} */\n#define GETZCNT 7       /* [XSI] Return the value of semzcnt {READ} */\n#define SETVAL  8       /* [XSI] Set the value of semval to arg.val {ALTER} */\n#define SETALL  9       /* [XSI] Set semvals from arg.array {ALTER} */\n\n\n/* A semaphore; this is an anonymous structure, not for external use */\nstruct sem {\n\tunsigned short  semval;         /* semaphore value */\n\tpid_t           sempid;         /* pid of last operation */\n\tunsigned short  semncnt;        /* # awaiting semval > cval */\n\tunsigned short  semzcnt;        /* # awaiting semval == 0 */\n};\n\n\n/*\n * Structure of array element for second argument to semop()\n */\nstruct sembuf {\n\tunsigned short  sem_num;        /* [XSI] semaphore # */\n\tshort           sem_op;         /* [XSI] semaphore operation */\n\tshort           sem_flg;        /* [XSI] operation flags */\n};\n\n/*\n * Possible flag values for sem_flg\n */\n#define SEM_UNDO        010000          /* [XSI] Set up adjust on exit entry */\n\n\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n\n/*\n * Union used as the fourth argment to semctl() in all cases.  Specific\n * member values are used for different values of the third parameter:\n *\n * Command\t\t\t\t\tMember\n * -------------------------------------------\t------\n * GETALL, SETALL\t\t\t\tarray\n * SETVAL\t\t\t\t\tval\n * IPC_STAT, IPC_SET\t\t\t\tbuf\n *\n * The union definition is intended to be defined by the user application\n * in conforming applications; it is provided here for two reasons:\n *\n * 1)\tHistorical source compatability for non-conforming applications\n *\texpecting this header to declare the union type on their behalf\n *\n * 2)\tDocumentation; specifically, 64 bit applications that do not pass\n *\tthis structure for 'val', or, alternately, a 64 bit type, will\n *\tnot function correctly\n */\nunion semun {\n\tint             val;            /* value for SETVAL */\n\tstruct semid_ds *buf;           /* buffer for IPC_STAT & IPC_SET */\n\tunsigned short  *array;         /* array for GETALL & SETALL */\n};\ntypedef union semun semun_t;\n\n\n/*\n * Permissions\n */\n#define SEM_A           0200    /* alter permission */\n#define SEM_R           0400    /* read permission */\n\n#endif  /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */\n\n\n\n\n__BEGIN_DECLS\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\nint     semsys(int, ...);\n#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */\nint     semctl(int, int, int, ...) __DARWIN_ALIAS(semctl);\nint     semget(key_t, int, int);\nint     semop(int, struct sembuf *, size_t);\n__END_DECLS\n\n\n#endif /* !_SEM_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/semaphore.h",
    "content": "/*\n * Copyright (c) 2000-2006 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/*\t@(#)semaphore.h\t1.0\t2/29/00\t\t*/\n\n\n\n/*\n * semaphore.h - POSIX semaphores\n *\n * HISTORY\n * 29-Feb-00\tA.Ramesh at Apple\n *\tCreated for Mac OS X\n */\n\n#ifndef _SYS_SEMAPHORE_H_\n#define _SYS_SEMAPHORE_H_\n\ntypedef int sem_t;\n\n/* this should go in limits.h> */\n#define SEM_VALUE_MAX 32767\n#define SEM_FAILED ((sem_t *)-1)\n\n#include <sys/cdefs.h>\n\n__BEGIN_DECLS\nint sem_close(sem_t *);\nint sem_destroy(sem_t *) __deprecated;\nint sem_getvalue(sem_t * __restrict, int * __restrict) __deprecated;\nint sem_init(sem_t *, int, unsigned int) __deprecated;\nsem_t * sem_open(const char *, int, ...);\nint sem_post(sem_t *);\nint sem_trywait(sem_t *);\nint sem_unlink(const char *);\nint sem_wait(sem_t *) __DARWIN_ALIAS_C(sem_wait);\n__END_DECLS\n\n\n#endif  /* _SYS_SEMAPHORE_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/shm.h",
    "content": "/*\n * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/*\t$NetBSD: shm.h,v 1.15 1994/06/29 06:45:17 cgd Exp $\t*/\n\n/*\n * Copyright (c) 1994 Adam Glass\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *      This product includes software developed by Adam Glass.\n * 4. The name of the author may not be used to endorse or promote products\n *    derived from this software without specific prior written permission\n *\n * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,\n * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\n * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * As defined+described in \"X/Open System Interfaces and Headers\"\n *                         Issue 4, p. XXX\n */\n\n#ifndef _SYS_SHM_H_\n#define _SYS_SHM_H_\n\n#include <sys/cdefs.h>\n#include <sys/_types.h>\n\n/*\n * [XSI]\tAll of the symbols from <sys/ipc.h> SHALL be defined\n *\t\twhen this header is included\n */\n#include <sys/ipc.h>\n\n/*\n * [XSI] The pid_t, time_t, key_t, and size_t types shall be defined as\n * described in <sys/types.h>.\n *\n * NOTE:\tThe definition of the key_t type is implicit from the\n *\t\tinclusion of <sys/ipc.h>\n */\n#include <sys/_types/_pid_t.h>\n#include <sys/_types/_time_t.h>\n#include <sys/_types/_size_t.h>\n\n/*\n * [XSI] The unsigned integer type used for the number of current attaches\n * that MUST be able to store values at least as large as a type unsigned\n * short.\n */\ntypedef unsigned short  shmatt_t;\n\n\n/*\n * Possible flag values which may be OR'ed into the third argument to\n * shmat()\n */\n#define SHM_RDONLY      010000  /* [XSI] Attach read-only (else read-write) */\n#define SHM_RND         020000  /* [XSI] Round attach address to SHMLBA */\n\n/*\n * This value is symbolic, and generally not expected to be sed by user\n * programs directly, although such ise is permitted by the standard.  Its\n * value in our implementation is equal to the number of bytes per page.\n *\n * NOTE:\tWe DO NOT obtain this value from the appropriate system\n *\t\theaders at this time, to avoid the resulting namespace\n *\t\tpollution, which is why we discourages its use.\n */\n#if __arm64__\n#define SHMLBA      (16*1024)   /* [XSI] Segment low boundary address multiple*/\n#else /* __arm64__ */\n#define SHMLBA      4096        /* [XSI] Segment low boundary address multiple*/\n#endif /* __arm64__ */\n\n/* \"official\" access mode definitions; somewhat braindead since you have\n *  to specify (SHM_* >> 3) for group and (SHM_* >> 6) for world permissions */\n#define SHM_R       (IPC_R)\n#define SHM_W       (IPC_W)\n\n#pragma pack(4)\n\n/*\n * Technically, we should force all code references to the new structure\n * definition, not in just the standards conformance case, and leave the\n * legacy interface there for binary compatibility only.  Currently, we\n * are only forcing this for programs requesting standards conformance.\n */\n#if __DARWIN_UNIX03 || defined(KERNEL)\n/*\n * Structure used internally.\n *\n * This structure is exposed because standards dictate that it is used as\n * the third argment to shmctl().\n *\n * NOTE:\tThe field shm_internal is not meaningful in user space,\n *\t\tand must not be used there.\n */\n#if (defined(_POSIX_C_SOURCE) && !defined(_DARWIN_C_SOURCE))\nstruct shmid_ds\n#else\n#define shmid_ds        __shmid_ds_new\nstruct __shmid_ds_new\n#endif\n{\n\tstruct __ipc_perm_new shm_perm; /* [XSI] Operation permission value */\n\tsize_t          shm_segsz;      /* [XSI] Size of segment in bytes */\n\tpid_t           shm_lpid;       /* [XSI] PID of last shared memory op */\n\tpid_t           shm_cpid;       /* [XSI] PID of creator */\n\tshmatt_t        shm_nattch;     /* [XSI] Number of current attaches */\n\ttime_t          shm_atime;      /* [XSI] Time of last shmat() */\n\ttime_t          shm_dtime;      /* [XSI] Time of last shmdt() */\n\ttime_t          shm_ctime;      /* [XSI] Time of last shmctl() change */\n\tvoid            *shm_internal;  /* reserved for kernel use */\n};\n#else   /* !__DARWIN_UNIX03 */\n#define shmid_ds        __shmid_ds_old\n#endif  /* !__DARWIN_UNIX03 */\n\n#if !__DARWIN_UNIX03\nstruct __shmid_ds_old {\n\tstruct __ipc_perm_old shm_perm; /* [XSI] Operation permission value */\n\tsize_t          shm_segsz;      /* [XSI] Size of segment in bytes */\n\tpid_t           shm_lpid;       /* [XSI] PID of last shared memory op */\n\tpid_t           shm_cpid;       /* [XSI] PID of creator */\n\tshmatt_t        shm_nattch;     /* [XSI] Number of current attaches */\n\ttime_t          shm_atime;      /* [XSI] Time of last shmat() */\n\ttime_t          shm_dtime;      /* [XSI] Time of last shmdt() */\n\ttime_t          shm_ctime;      /* [XSI] Time of last shmctl() change */\n\tvoid            *shm_internal;  /* reserved for kernel use */\n};\n#endif  /* !__DARWIN_UNIX03 */\n\n#pragma pack()\n\n\n__BEGIN_DECLS\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\nint     shmsys(int, ...);\n#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */\nvoid    *shmat(int, const void *, int);\nint     shmctl(int, int, struct shmid_ds *) __DARWIN_ALIAS(shmctl);\nint     shmdt(const void *);\nint     shmget(key_t, size_t, int);\n__END_DECLS\n\n\n#endif /* !_SYS_SHM_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/signal.h",
    "content": "/*\n * Copyright (c) 2000-2006 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */\n/*\n * Copyright (c) 1982, 1986, 1989, 1991, 1993\n *\tThe Regents of the University of California.  All rights reserved.\n * (c) UNIX System Laboratories, Inc.\n * All or some portions of this file are derived from material licensed\n * to the University of California by American Telephone and Telegraph\n * Co. or Unix System Laboratories, Inc. and are reproduced herein with\n * the permission of UNIX System Laboratories, Inc.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *\tThis product includes software developed by the University of\n *\tCalifornia, Berkeley and its contributors.\n * 4. Neither the name of the University nor the names of its contributors\n *    may be used to endorse or promote products derived from this software\n *    without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n *\t@(#)signal.h\t8.2 (Berkeley) 1/21/94\n */\n\n#ifndef _SYS_SIGNAL_H_\n#define _SYS_SIGNAL_H_\n\n#include <sys/cdefs.h>\n#include <sys/appleapiopts.h>\n#include <Availability.h>\n\n#define __DARWIN_NSIG   32      /* counting 0; could be 33 (mask is 1-32) */\n\n#if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))\n#define NSIG    __DARWIN_NSIG\n#endif\n\n#include <machine/signal.h>     /* sigcontext; codes for SIGILL, SIGFPE */\n\n#define SIGHUP  1       /* hangup */\n#define SIGINT  2       /* interrupt */\n#define SIGQUIT 3       /* quit */\n#define SIGILL  4       /* illegal instruction (not reset when caught) */\n#define SIGTRAP 5       /* trace trap (not reset when caught) */\n#define SIGABRT 6       /* abort() */\n#if  (defined(_POSIX_C_SOURCE) && !defined(_DARWIN_C_SOURCE))\n#define SIGPOLL 7       /* pollable event ([XSR] generated, not supported) */\n#else   /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */\n#define SIGIOT  SIGABRT /* compatibility */\n#define SIGEMT  7       /* EMT instruction */\n#endif  /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */\n#define SIGFPE  8       /* floating point exception */\n#define SIGKILL 9       /* kill (cannot be caught or ignored) */\n#define SIGBUS  10      /* bus error */\n#define SIGSEGV 11      /* segmentation violation */\n#define SIGSYS  12      /* bad argument to system call */\n#define SIGPIPE 13      /* write on a pipe with no one to read it */\n#define SIGALRM 14      /* alarm clock */\n#define SIGTERM 15      /* software termination signal from kill */\n#define SIGURG  16      /* urgent condition on IO channel */\n#define SIGSTOP 17      /* sendable stop signal not from tty */\n#define SIGTSTP 18      /* stop signal from tty */\n#define SIGCONT 19      /* continue a stopped process */\n#define SIGCHLD 20      /* to parent on child stop or exit */\n#define SIGTTIN 21      /* to readers pgrp upon background tty read */\n#define SIGTTOU 22      /* like TTIN for output if (tp->t_local&LTOSTOP) */\n#if  (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))\n#define SIGIO   23      /* input/output possible signal */\n#endif\n#define SIGXCPU 24      /* exceeded CPU time limit */\n#define SIGXFSZ 25      /* exceeded file size limit */\n#define SIGVTALRM 26    /* virtual time alarm */\n#define SIGPROF 27      /* profiling time alarm */\n#if  (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))\n#define SIGWINCH 28     /* window size changes */\n#define SIGINFO 29      /* information request */\n#endif\n#define SIGUSR1 30      /* user defined signal 1 */\n#define SIGUSR2 31      /* user defined signal 2 */\n\n#if defined(_ANSI_SOURCE) || __DARWIN_UNIX03 || defined(__cplusplus)\n/*\n * Language spec sez we must list exactly one parameter, even though we\n * actually supply three.  Ugh!\n * SIG_HOLD is chosen to avoid KERN_SIG_* values in <sys/signalvar.h>\n */\n#define SIG_DFL         (void (*)(int))0\n#define SIG_IGN         (void (*)(int))1\n#define SIG_HOLD        (void (*)(int))5\n#define SIG_ERR         ((void (*)(int))-1)\n#else\n/* DO NOT REMOVE THE COMMENTED OUT int: fixincludes needs to see them */\n#define SIG_DFL         (void (*)( /*int*/ ))0\n#define SIG_IGN         (void (*)( /*int*/ ))1\n#define SIG_HOLD        (void (*)( /*int*/ ))5\n#define SIG_ERR         ((void (*)( /*int*/ ))-1)\n#endif\n\n#ifndef _ANSI_SOURCE\n#include <sys/_types.h>\n\n#include <machine/_mcontext.h>\n\n#include <sys/_pthread/_pthread_attr_t.h>\n\n#include <sys/_types/_sigaltstack.h>\n#include <sys/_types/_ucontext.h>\n\n#include <sys/_types/_pid_t.h>\n#include <sys/_types/_sigset_t.h>\n#include <sys/_types/_size_t.h>\n#include <sys/_types/_uid_t.h>\n\nunion sigval {\n\t/* Members as suggested by Annex C of POSIX 1003.1b. */\n\tint     sival_int;\n\tvoid    *sival_ptr;\n};\n\n#define SIGEV_NONE      0       /* No async notification */\n#define SIGEV_SIGNAL    1       /* aio - completion notification */\n#define SIGEV_THREAD    3       /* [NOTIMP] [RTS] call notification function */\n\nstruct sigevent {\n\tint                             sigev_notify;                           /* Notification type */\n\tint                             sigev_signo;                            /* Signal number */\n\tunion sigval    sigev_value;                            /* Signal value */\n\tvoid                    (*sigev_notify_function)(union sigval);   /* Notification function */\n\tpthread_attr_t  *sigev_notify_attributes;       /* Notification attributes */\n};\n\n\ntypedef struct __siginfo {\n\tint     si_signo;               /* signal number */\n\tint     si_errno;               /* errno association */\n\tint     si_code;                /* signal code */\n\tpid_t   si_pid;                 /* sending process */\n\tuid_t   si_uid;                 /* sender's ruid */\n\tint     si_status;              /* exit value */\n\tvoid    *si_addr;               /* faulting instruction */\n\tunion sigval si_value;          /* signal value */\n\tlong    si_band;                /* band event for SIGPOLL */\n\tunsigned long   __pad[7];       /* Reserved for Future Use */\n} siginfo_t;\n\n\n/*\n * When the signal is SIGILL or SIGFPE, si_addr contains the address of\n * the faulting instruction.\n * When the signal is SIGSEGV or SIGBUS, si_addr contains the address of\n * the faulting memory reference. Although for x86 there are cases of SIGSEGV\n * for which si_addr cannot be determined and is NULL.\n * If the signal is SIGCHLD, the si_pid field will contain the child process ID,\n *  si_status contains the exit value or signal and\n *  si_uid contains the real user ID of the process that sent the signal.\n */\n\n/* Values for si_code */\n\n/* Codes for SIGILL */\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n#define ILL_NOOP        0       /* if only I knew... */\n#endif\n#define ILL_ILLOPC      1       /* [XSI] illegal opcode */\n#define ILL_ILLTRP      2       /* [XSI] illegal trap */\n#define ILL_PRVOPC      3       /* [XSI] privileged opcode */\n#define ILL_ILLOPN      4       /* [XSI] illegal operand -NOTIMP */\n#define ILL_ILLADR      5       /* [XSI] illegal addressing mode -NOTIMP */\n#define ILL_PRVREG      6       /* [XSI] privileged register -NOTIMP */\n#define ILL_COPROC      7       /* [XSI] coprocessor error -NOTIMP */\n#define ILL_BADSTK      8       /* [XSI] internal stack error -NOTIMP */\n\n/* Codes for SIGFPE */\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n#define FPE_NOOP        0       /* if only I knew... */\n#endif\n#define FPE_FLTDIV      1       /* [XSI] floating point divide by zero */\n#define FPE_FLTOVF      2       /* [XSI] floating point overflow */\n#define FPE_FLTUND      3       /* [XSI] floating point underflow */\n#define FPE_FLTRES      4       /* [XSI] floating point inexact result */\n#define FPE_FLTINV      5       /* [XSI] invalid floating point operation */\n#define FPE_FLTSUB      6       /* [XSI] subscript out of range -NOTIMP */\n#define FPE_INTDIV      7       /* [XSI] integer divide by zero */\n#define FPE_INTOVF      8       /* [XSI] integer overflow */\n\n/* Codes for SIGSEGV */\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n#define SEGV_NOOP       0       /* if only I knew... */\n#endif\n#define SEGV_MAPERR     1       /* [XSI] address not mapped to object */\n#define SEGV_ACCERR     2       /* [XSI] invalid permission for mapped object */\n\n/* Codes for SIGBUS */\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n#define BUS_NOOP        0       /* if only I knew... */\n#endif\n#define BUS_ADRALN      1       /* [XSI] Invalid address alignment */\n#define BUS_ADRERR      2       /* [XSI] Nonexistent physical address -NOTIMP */\n#define BUS_OBJERR      3       /* [XSI] Object-specific HW error - NOTIMP */\n\n/* Codes for SIGTRAP */\n#define TRAP_BRKPT      1       /* [XSI] Process breakpoint -NOTIMP */\n#define TRAP_TRACE      2       /* [XSI] Process trace trap -NOTIMP */\n\n/* Codes for SIGCHLD */\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n#define CLD_NOOP        0       /* if only I knew... */\n#endif\n#define CLD_EXITED      1       /* [XSI] child has exited */\n#define CLD_KILLED      2       /* [XSI] terminated abnormally, no core file */\n#define CLD_DUMPED      3       /* [XSI] terminated abnormally, core file */\n#define CLD_TRAPPED     4       /* [XSI] traced child has trapped */\n#define CLD_STOPPED     5       /* [XSI] child has stopped */\n#define CLD_CONTINUED   6       /* [XSI] stopped child has continued */\n\n/* Codes for SIGPOLL */\n#define POLL_IN         1       /* [XSR] Data input available */\n#define POLL_OUT        2       /* [XSR] Output buffers available */\n#define POLL_MSG        3       /* [XSR] Input message available */\n#define POLL_ERR        4       /* [XSR] I/O error */\n#define POLL_PRI        5       /* [XSR] High priority input available */\n#define POLL_HUP        6       /* [XSR] Device disconnected */\n\n/* union for signal handlers */\nunion __sigaction_u {\n\tvoid    (*__sa_handler)(int);\n\tvoid    (*__sa_sigaction)(int, struct __siginfo *,\n\t    void *);\n};\n\n/* Signal vector template for Kernel user boundary */\nstruct  __sigaction {\n\tunion __sigaction_u __sigaction_u;  /* signal handler */\n\tvoid    (*sa_tramp)(void *, int, int, siginfo_t *, void *);\n\tsigset_t sa_mask;               /* signal mask to apply */\n\tint     sa_flags;               /* see signal options below */\n};\n\n/*\n * Signal vector \"template\" used in sigaction call.\n */\nstruct  sigaction {\n\tunion __sigaction_u __sigaction_u;  /* signal handler */\n\tsigset_t sa_mask;               /* signal mask to apply */\n\tint     sa_flags;               /* see signal options below */\n};\n\n\n\n/* if SA_SIGINFO is set, sa_sigaction is to be used instead of sa_handler. */\n#define sa_handler      __sigaction_u.__sa_handler\n#define sa_sigaction    __sigaction_u.__sa_sigaction\n\n#define SA_ONSTACK      0x0001  /* take signal on signal stack */\n#define SA_RESTART      0x0002  /* restart system on signal return */\n#define SA_RESETHAND    0x0004  /* reset to SIG_DFL when taking signal */\n#define SA_NOCLDSTOP    0x0008  /* do not generate SIGCHLD on child stop */\n#define SA_NODEFER      0x0010  /* don't mask the signal we're delivering */\n#define SA_NOCLDWAIT    0x0020  /* don't keep zombies around */\n#define SA_SIGINFO      0x0040  /* signal handler with SA_SIGINFO args */\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n#define SA_USERTRAMP    0x0100  /* do not bounce off kernel's sigtramp */\n/* This will provide 64bit register set in a 32bit user address space */\n#define SA_64REGSET     0x0200  /* signal handler with SA_SIGINFO args with 64bit regs information */\n#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */\n\n/* the following are the only bits we support from user space, the\n * rest are for kernel use only.\n */\n#define SA_USERSPACE_MASK (SA_ONSTACK | SA_RESTART | SA_RESETHAND | SA_NOCLDSTOP | SA_NODEFER | SA_NOCLDWAIT | SA_SIGINFO)\n\n/*\n * Flags for sigprocmask:\n */\n#define SIG_BLOCK       1       /* block specified signal set */\n#define SIG_UNBLOCK     2       /* unblock specified signal set */\n#define SIG_SETMASK     3       /* set specified signal set */\n\n/* POSIX 1003.1b required values. */\n#define SI_USER         0x10001 /* [CX] signal from kill() */\n#define SI_QUEUE        0x10002 /* [CX] signal from sigqueue() */\n#define SI_TIMER        0x10003 /* [CX] timer expiration */\n#define SI_ASYNCIO      0x10004 /* [CX] aio request completion */\n#define SI_MESGQ        0x10005 /* [CX]\tfrom message arrival on empty queue */\n\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\ntypedef void (*sig_t)(int);     /* type of signal function */\n#endif\n\n/*\n * Structure used in sigaltstack call.\n */\n\n#define SS_ONSTACK      0x0001  /* take signal on signal stack */\n#define SS_DISABLE      0x0004  /* disable taking signals on alternate stack */\n#define MINSIGSTKSZ     32768   /* (32K)minimum allowable stack */\n#define SIGSTKSZ        131072  /* (128K)recommended stack size */\n\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n/*\n * 4.3 compatibility:\n * Signal vector \"template\" used in sigvec call.\n */\nstruct  sigvec {\n\tvoid    (*sv_handler)(int);     /* signal handler */\n\tint     sv_mask;                /* signal mask to apply */\n\tint     sv_flags;               /* see signal options below */\n};\n\n#define SV_ONSTACK      SA_ONSTACK\n#define SV_INTERRUPT    SA_RESTART      /* same bit, opposite sense */\n#define SV_RESETHAND    SA_RESETHAND\n#define SV_NODEFER      SA_NODEFER\n#define SV_NOCLDSTOP    SA_NOCLDSTOP\n#define SV_SIGINFO      SA_SIGINFO\n\n#define sv_onstack sv_flags     /* isn't compatibility wonderful! */\n#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */\n\n/*\n * Structure used in sigstack call.\n */\nstruct  sigstack {\n\tchar    *ss_sp;                 /* signal stack pointer */\n\tint     ss_onstack;             /* current status */\n};\n\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n/*\n * Macro for converting signal number to a mask suitable for\n * sigblock().\n */\n#define sigmask(m)      (1 << ((m)-1))\n\n\n#define BADSIG          SIG_ERR\n\n#endif  /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */\n#endif  /* !_ANSI_SOURCE */\n\n/*\n * For historical reasons; programs expect signal's return value to be\n * defined by <sys/signal.h>.\n */\n__BEGIN_DECLS\n    void(*signal(int, void (*)(int)))(int);\n__END_DECLS\n#endif  /* !_SYS_SIGNAL_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/signalvar.h",
    "content": "/*\n * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */\n/*\n * Copyright (c) 1991, 1993\n *\tThe Regents of the University of California.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *\tThis product includes software developed by the University of\n *\tCalifornia, Berkeley and its contributors.\n * 4. Neither the name of the University nor the names of its contributors\n *    may be used to endorse or promote products derived from this software\n *    without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n *\t@(#)signalvar.h\t8.3 (Berkeley) 1/4/94\n */\n\n#ifndef _SYS_SIGNALVAR_H_               /* tmp for user.h */\n#define _SYS_SIGNALVAR_H_\n\n#include <sys/appleapiopts.h>\n\n\n\n\n\n#endif  /* !_SYS_SIGNALVAR_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/snapshot.h",
    "content": "/*\n * Copyright (c) 2016 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n\n#ifndef _SYS_SNAPSHOT_H_\n#define _SYS_SNAPSHOT_H_\n\n\n#include <sys/cdefs.h>\n#include <machine/_types.h>\n#include <sys/_types/_size_t.h>\n#include <_types/_uint32_t.h>\n#include <sys/attr.h>\n#include <Availability.h>\n\n__BEGIN_DECLS\n\nint fs_snapshot_create(int, const char *, uint32_t) __OSX_AVAILABLE(10.12) __IOS_AVAILABLE(10.0) __TVOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0);\n\nint fs_snapshot_list(int, struct attrlist  *, void *, size_t, uint32_t) __OSX_AVAILABLE(10.12) __IOS_AVAILABLE(10.0) __TVOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0);\n\nint fs_snapshot_delete(int, const char *, uint32_t) __OSX_AVAILABLE(10.12) __IOS_AVAILABLE(10.0) __TVOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0);\n\nint fs_snapshot_rename(int, const char *, const char *, uint32_t) __OSX_AVAILABLE(10.12) __IOS_AVAILABLE(10.0) __TVOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0);\n\nint fs_snapshot_mount(int, const char *, const char *, uint32_t) __OSX_AVAILABLE(10.12) __IOS_AVAILABLE(10.0)       __TVOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0);\n\nint fs_snapshot_revert(int, const char *, uint32_t) __OSX_AVAILABLE(10.12) __IOS_AVAILABLE(10.0) __TVOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0);\n\n\n__END_DECLS\n\n\n\n#endif /* !_SYS_SNAPSHOT_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/socket.h",
    "content": "/*\n * Copyright (c) 2000-2019 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/* Copyright (c) 1998, 1999 Apple Computer, Inc. All Rights Reserved */\n/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */\n/*\n * Copyright (c) 1982, 1985, 1986, 1988, 1993, 1994\n *\tThe Regents of the University of California.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *\tThis product includes software developed by the University of\n *\tCalifornia, Berkeley and its contributors.\n * 4. Neither the name of the University nor the names of its contributors\n *    may be used to endorse or promote products derived from this software\n *    without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n *\t@(#)socket.h\t8.4 (Berkeley) 2/21/94\n * $FreeBSD: src/sys/sys/socket.h,v 1.39.2.7 2001/07/03 11:02:01 ume Exp $\n */\n/*\n * NOTICE: This file was modified by SPARTA, Inc. in 2005 to introduce\n * support for mandatory and extensible security protections.  This notice\n * is included in support of clause 2.2 (b) of the Apple Public License,\n * Version 2.0.\n */\n\n#ifndef _SYS_SOCKET_H_\n#define _SYS_SOCKET_H_\n\n#include <sys/types.h>\n#include <sys/cdefs.h>\n#include <machine/_param.h>\n#include <net/net_kev.h>\n\n\n\n#include <Availability.h>\n\n/*\n * Definitions related to sockets: types, address families, options.\n */\n\n/*\n * Data types.\n */\n\n#include <sys/_types/_gid_t.h>\n#include <sys/_types/_off_t.h>\n#include <sys/_types/_pid_t.h>\n#include <sys/_types/_sa_family_t.h>\n#include <sys/_types/_socklen_t.h>\n\n/* XXX Not explicitly defined by POSIX, but function return types are */\n#include <sys/_types/_size_t.h>\n\n/* XXX Not explicitly defined by POSIX, but function return types are */\n#include <sys/_types/_ssize_t.h>\n\n/*\n * [XSI] The iovec structure shall be defined as described in <sys/uio.h>.\n */\n#include <sys/_types/_iovec_t.h>\n\n/*\n * Types\n */\n#define SOCK_STREAM     1               /* stream socket */\n#define SOCK_DGRAM      2               /* datagram socket */\n#define SOCK_RAW        3               /* raw-protocol interface */\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n#define SOCK_RDM        4               /* reliably-delivered message */\n#endif  /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */\n#define SOCK_SEQPACKET  5               /* sequenced packet stream */\n\n/*\n * Option flags per-socket.\n */\n#define SO_DEBUG        0x0001          /* turn on debugging info recording */\n#define SO_ACCEPTCONN   0x0002          /* socket has had listen() */\n#define SO_REUSEADDR    0x0004          /* allow local address reuse */\n#define SO_KEEPALIVE    0x0008          /* keep connections alive */\n#define SO_DONTROUTE    0x0010          /* just use interface addresses */\n#define SO_BROADCAST    0x0020          /* permit sending of broadcast msgs */\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n#define SO_USELOOPBACK  0x0040          /* bypass hardware when possible */\n#define SO_LINGER       0x0080          /* linger on close if data present (in ticks) */\n#else\n#define SO_LINGER       0x1080          /* linger on close if data present (in seconds) */\n#endif  /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */\n#define SO_OOBINLINE    0x0100          /* leave received OOB data in line */\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n#define SO_REUSEPORT    0x0200          /* allow local address & port reuse */\n#define SO_TIMESTAMP    0x0400          /* timestamp received dgram traffic */\n#define SO_TIMESTAMP_MONOTONIC  0x0800  /* Monotonically increasing timestamp on rcvd dgram */\n#ifndef __APPLE__\n#define SO_ACCEPTFILTER 0x1000          /* there is an accept filter */\n#else\n#define SO_DONTTRUNC    0x2000          /* APPLE: Retain unread data */\n                                        /*  (ATOMIC proto) */\n#define SO_WANTMORE     0x4000          /* APPLE: Give hint when more data ready */\n#define SO_WANTOOBFLAG  0x8000          /* APPLE: Want OOB in MSG_FLAG on receive */\n\n\n#endif  /* (!__APPLE__) */\n#endif  /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */\n\n/*\n * Additional options, not kept in so_options.\n */\n#define SO_SNDBUF       0x1001          /* send buffer size */\n#define SO_RCVBUF       0x1002          /* receive buffer size */\n#define SO_SNDLOWAT     0x1003          /* send low-water mark */\n#define SO_RCVLOWAT     0x1004          /* receive low-water mark */\n#define SO_SNDTIMEO     0x1005          /* send timeout */\n#define SO_RCVTIMEO     0x1006          /* receive timeout */\n#define SO_ERROR        0x1007          /* get error status and clear */\n#define SO_TYPE         0x1008          /* get socket type */\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n#define SO_LABEL        0x1010          /* deprecated */\n#define SO_PEERLABEL    0x1011          /* deprecated */\n#ifdef __APPLE__\n#define SO_NREAD        0x1020          /* APPLE: get 1st-packet byte count */\n#define SO_NKE          0x1021          /* APPLE: Install socket-level NKE */\n#define SO_NOSIGPIPE    0x1022          /* APPLE: No SIGPIPE on EPIPE */\n#define SO_NOADDRERR    0x1023          /* APPLE: Returns EADDRNOTAVAIL when src is not available anymore */\n#define SO_NWRITE       0x1024          /* APPLE: Get number of bytes currently in send socket buffer */\n#define SO_REUSESHAREUID        0x1025          /* APPLE: Allow reuse of port/socket by different userids */\n#ifdef __APPLE_API_PRIVATE\n#define SO_NOTIFYCONFLICT       0x1026  /* APPLE: send notification if there is a bind on a port which is already in use */\n#define SO_UPCALLCLOSEWAIT      0x1027  /* APPLE: block on close until an upcall returns */\n#endif\n#define SO_LINGER_SEC   0x1080          /* linger on close if data present (in seconds) */\n#define SO_RANDOMPORT   0x1082  /* APPLE: request local port randomization */\n#define SO_NP_EXTENSIONS        0x1083  /* To turn off some POSIX behavior */\n#endif\n\n#define SO_NUMRCVPKT            0x1112  /* number of datagrams in receive socket buffer */\n#define SO_NET_SERVICE_TYPE     0x1116  /* Network service type */\n\n\n#define SO_NETSVC_MARKING_LEVEL    0x1119  /* Get QoS marking in effect for socket */\n\n\n/* When adding new socket-options, you need to make sure MPTCP supports these as well! */\n\n/*\n * Network Service Type for option SO_NET_SERVICE_TYPE\n *\n * The vast majority of sockets should use Best Effort that is the default\n * Network Service Type. Other Network Service Types have to be used only if\n * the traffic actually matches the description of the Network Service Type.\n *\n * Network Service Types do not represent priorities but rather describe\n * different categories of delay, jitter and loss parameters.\n * Those parameters may influence protocols from layer 4 protocols like TCP\n * to layer 2 protocols like Wi-Fi. The Network Service Type can determine\n * how the traffic is queued and scheduled by the host networking stack and\n * by other entities on the network like switches and routers. For example\n * for Wi-Fi, the Network Service Type can select the marking of the\n * layer 2 packet with the appropriate WMM Access Category.\n *\n * There is no point in attempting to game the system and use\n * a Network Service Type that does not correspond to the actual\n * traffic characteristic but one that seems to have a higher precedence.\n * The reason is that for service classes that have lower tolerance\n * for delay and jitter, the queues size is lower than for service\n * classes that are more tolerant to delay and jitter.\n *\n * For example using a voice service type for bulk data transfer will lead\n * to disastrous results as soon as congestion happens because the voice\n * queue overflows and packets get dropped. This is not only bad for the bulk\n * data transfer but it is also bad for VoIP apps that legitimately are using\n * the voice  service type.\n *\n * The characteristics of the Network Service Types are based on the service\n * classes defined in RFC 4594 \"Configuration Guidelines for DiffServ Service\n * Classes\"\n *\n * When system detects the outgoing interface belongs to a DiffServ domain\n * that follows the recommendation of the IETF draft \"Guidelines for DiffServ to\n * IEEE 802.11 Mapping\", the packet will marked at layer 3 with a DSCP value\n * that corresponds to Network Service Type.\n *\n * NET_SERVICE_TYPE_BE\n *\t\"Best Effort\", unclassified/standard.  This is the default service\n *\tclass and cover the majority of the traffic.\n *\n * NET_SERVICE_TYPE_BK\n *\t\"Background\", high delay tolerant, loss tolerant. elastic flow,\n *\tvariable size & long-lived. E.g: non-interactive network bulk transfer\n *\tlike synching or backup.\n *\n * NET_SERVICE_TYPE_RD\n *\t\"Responsive Data\", a notch higher than \"Best Effort\", medium delay\n *\ttolerant, elastic & inelastic flow, bursty, long-lived. E.g. email,\n *\tinstant messaging, for which there is a sense of interactivity and\n *\turgency (user waiting for output).\n *\n * NET_SERVICE_TYPE_OAM\n *\t\"Operations, Administration, and Management\", medium delay tolerant,\n *\tlow-medium loss tolerant, elastic & inelastic flows, variable size.\n *\tE.g. VPN tunnels.\n *\n * NET_SERVICE_TYPE_AV\n *\t\"Multimedia Audio/Video Streaming\", medium delay tolerant, low-medium\n *\tloss tolerant, elastic flow, constant packet interval, variable rate\n *\tand size. E.g. video and audio playback with buffering.\n *\n * NET_SERVICE_TYPE_RV\n *\t\"Responsive Multimedia Audio/Video\", low delay tolerant, low-medium\n *\tloss tolerant, elastic flow, variable packet interval, rate and size.\n *\tE.g. screen sharing.\n *\n * NET_SERVICE_TYPE_VI\n *\t\"Interactive Video\", low delay tolerant, low-medium loss tolerant,\n *\telastic flow, constant packet interval, variable rate & size. E.g.\n *\tvideo telephony.\n *\n * NET_SERVICE_TYPE_SIG\n *\t\"Signaling\", low delay tolerant, low loss tolerant, inelastic flow,\n *\tjitter tolerant, rate is bursty but short, variable size. E.g. SIP.\n *\n * NET_SERVICE_TYPE_VO\n *\t\"Interactive Voice\", very low delay tolerant, very low loss tolerant,\n *\tinelastic flow, constant packet rate, somewhat fixed size.\n *\tE.g. VoIP.\n */\n\n#define NET_SERVICE_TYPE_BE     0 /* Best effort */\n#define NET_SERVICE_TYPE_BK     1 /* Background system initiated */\n#define NET_SERVICE_TYPE_SIG    2 /* Signaling */\n#define NET_SERVICE_TYPE_VI     3 /* Interactive Video */\n#define NET_SERVICE_TYPE_VO     4 /* Interactive Voice */\n#define NET_SERVICE_TYPE_RV     5 /* Responsive Multimedia Audio/Video */\n#define NET_SERVICE_TYPE_AV     6 /* Multimedia Audio/Video Streaming */\n#define NET_SERVICE_TYPE_OAM    7 /* Operations, Administration, and Management */\n#define NET_SERVICE_TYPE_RD     8 /* Responsive Data */\n\n\n/* These are supported values for SO_NETSVC_MARKING_LEVEL */\n#define NETSVC_MRKNG_UNKNOWN            0       /* The outgoing network interface is not known */\n#define NETSVC_MRKNG_LVL_L2             1       /* Default marking at layer 2 (for example Wi-Fi WMM) */\n#define NETSVC_MRKNG_LVL_L3L2_ALL       2       /* Layer 3 DSCP marking and layer 2 marking for all Network Service Types */\n#define NETSVC_MRKNG_LVL_L3L2_BK        3       /* The system policy limits layer 3 DSCP marking and layer 2 marking\n\t                                         * to background Network Service Types */\n\n\ntypedef __uint32_t sae_associd_t;\n#define SAE_ASSOCID_ANY 0\n#define SAE_ASSOCID_ALL ((sae_associd_t)(-1ULL))\n\ntypedef __uint32_t sae_connid_t;\n#define SAE_CONNID_ANY  0\n#define SAE_CONNID_ALL  ((sae_connid_t)(-1ULL))\n\n/* connectx() flag parameters */\n#define CONNECT_RESUME_ON_READ_WRITE    0x1 /* resume connect() on read/write */\n#define CONNECT_DATA_IDEMPOTENT         0x2 /* data is idempotent */\n#define CONNECT_DATA_AUTHENTICATED      0x4 /* data includes security that replaces the TFO-cookie */\n\n/* sockaddr endpoints */\ntypedef struct sa_endpoints {\n\tunsigned int            sae_srcif;      /* optional source interface */\n\tconst struct sockaddr   *sae_srcaddr;   /* optional source address */\n\tsocklen_t               sae_srcaddrlen; /* size of source address */\n\tconst struct sockaddr   *sae_dstaddr;   /* destination address */\n\tsocklen_t               sae_dstaddrlen; /* size of destination address */\n} sa_endpoints_t;\n#endif  /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */\n\n/*\n * Structure used for manipulating linger option.\n */\nstruct  linger {\n\tint     l_onoff;                /* option on/off */\n\tint     l_linger;               /* linger time */\n};\n\n#ifndef __APPLE__\nstruct  accept_filter_arg {\n\tchar    af_name[16];\n\tchar    af_arg[256 - 16];\n};\n#endif\n\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n#ifdef __APPLE__\n\n/*\n * Structure to control non-portable Sockets extension to POSIX\n */\nstruct so_np_extensions {\n\tu_int32_t       npx_flags;\n\tu_int32_t       npx_mask;\n};\n\n#define SONPX_SETOPTSHUT        0x000000001     /* flag for allowing setsockopt after shutdown */\n\n\n\n#endif\n#endif\n\n/*\n * Level number for (get/set)sockopt() to apply to socket itself.\n */\n#define SOL_SOCKET      0xffff          /* options for socket level */\n\n\n/*\n * Address families.\n */\n#define AF_UNSPEC       0               /* unspecified */\n#define AF_UNIX         1               /* local to host (pipes) */\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n#define AF_LOCAL        AF_UNIX         /* backward compatibility */\n#endif  /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */\n#define AF_INET         2               /* internetwork: UDP, TCP, etc. */\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n#define AF_IMPLINK      3               /* arpanet imp addresses */\n#define AF_PUP          4               /* pup protocols: e.g. BSP */\n#define AF_CHAOS        5               /* mit CHAOS protocols */\n#define AF_NS           6               /* XEROX NS protocols */\n#define AF_ISO          7               /* ISO protocols */\n#define AF_OSI          AF_ISO\n#define AF_ECMA         8               /* European computer manufacturers */\n#define AF_DATAKIT      9               /* datakit protocols */\n#define AF_CCITT        10              /* CCITT protocols, X.25 etc */\n#define AF_SNA          11              /* IBM SNA */\n#define AF_DECnet       12              /* DECnet */\n#define AF_DLI          13              /* DEC Direct data link interface */\n#define AF_LAT          14              /* LAT */\n#define AF_HYLINK       15              /* NSC Hyperchannel */\n#define AF_APPLETALK    16              /* Apple Talk */\n#define AF_ROUTE        17              /* Internal Routing Protocol */\n#define AF_LINK         18              /* Link layer interface */\n#define pseudo_AF_XTP   19              /* eXpress Transfer Protocol (no AF) */\n#define AF_COIP         20              /* connection-oriented IP, aka ST II */\n#define AF_CNT          21              /* Computer Network Technology */\n#define pseudo_AF_RTIP  22              /* Help Identify RTIP packets */\n#define AF_IPX          23              /* Novell Internet Protocol */\n#define AF_SIP          24              /* Simple Internet Protocol */\n#define pseudo_AF_PIP   25              /* Help Identify PIP packets */\n#define AF_NDRV         27              /* Network Driver 'raw' access */\n#define AF_ISDN         28              /* Integrated Services Digital Network */\n#define AF_E164         AF_ISDN         /* CCITT E.164 recommendation */\n#define pseudo_AF_KEY   29              /* Internal key-management function */\n#endif  /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */\n#define AF_INET6        30              /* IPv6 */\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n#define AF_NATM         31              /* native ATM access */\n#define AF_SYSTEM       32              /* Kernel event messages */\n#define AF_NETBIOS      33              /* NetBIOS */\n#define AF_PPP          34              /* PPP communication protocol */\n#define pseudo_AF_HDRCMPLT 35           /* Used by BPF to not rewrite headers\n\t                                 *  in interface output routine */\n#define AF_RESERVED_36  36              /* Reserved for internal usage */\n#define AF_IEEE80211    37              /* IEEE 802.11 protocol */\n#define AF_UTUN         38\n#define AF_VSOCK        40              /* VM Sockets */\n#define AF_MAX          41\n#endif  /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */\n\n/*\n * [XSI] Structure used by kernel to store most addresses.\n */\nstruct sockaddr {\n\t__uint8_t       sa_len;         /* total length */\n\tsa_family_t     sa_family;      /* [XSI] address family */\n\tchar            sa_data[14];    /* [XSI] addr value (actually larger) */\n};\n\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n#define SOCK_MAXADDRLEN 255             /* longest possible addresses */\n\n/*\n * Structure used by kernel to pass protocol\n * information in raw sockets.\n */\nstruct sockproto {\n\t__uint16_t      sp_family;              /* address family */\n\t__uint16_t      sp_protocol;            /* protocol */\n};\n#endif  /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */\n\n/*\n * RFC 2553: protocol-independent placeholder for socket addresses\n */\n#define _SS_MAXSIZE     128\n#define _SS_ALIGNSIZE   (sizeof(__int64_t))\n#define _SS_PAD1SIZE    \\\n\t        (_SS_ALIGNSIZE - sizeof(__uint8_t) - sizeof(sa_family_t))\n#define _SS_PAD2SIZE    \\\n\t        (_SS_MAXSIZE - sizeof(__uint8_t) - sizeof(sa_family_t) - \\\n\t                        _SS_PAD1SIZE - _SS_ALIGNSIZE)\n\n/*\n * [XSI] sockaddr_storage\n */\nstruct sockaddr_storage {\n\t__uint8_t       ss_len;         /* address length */\n\tsa_family_t     ss_family;      /* [XSI] address family */\n\tchar                    __ss_pad1[_SS_PAD1SIZE];\n\t__int64_t       __ss_align;     /* force structure storage alignment */\n\tchar                    __ss_pad2[_SS_PAD2SIZE];\n};\n\n/*\n * Protocol families, same as address families for now.\n */\n#define PF_UNSPEC       AF_UNSPEC\n#define PF_LOCAL        AF_LOCAL\n#define PF_UNIX         PF_LOCAL        /* backward compatibility */\n#define PF_INET         AF_INET\n#define PF_IMPLINK      AF_IMPLINK\n#define PF_PUP          AF_PUP\n#define PF_CHAOS        AF_CHAOS\n#define PF_NS           AF_NS\n#define PF_ISO          AF_ISO\n#define PF_OSI          AF_ISO\n#define PF_ECMA         AF_ECMA\n#define PF_DATAKIT      AF_DATAKIT\n#define PF_CCITT        AF_CCITT\n#define PF_SNA          AF_SNA\n#define PF_DECnet       AF_DECnet\n#define PF_DLI          AF_DLI\n#define PF_LAT          AF_LAT\n#define PF_HYLINK       AF_HYLINK\n#define PF_APPLETALK    AF_APPLETALK\n#define PF_ROUTE        AF_ROUTE\n#define PF_LINK         AF_LINK\n#define PF_XTP          pseudo_AF_XTP   /* really just proto family, no AF */\n#define PF_COIP         AF_COIP\n#define PF_CNT          AF_CNT\n#define PF_SIP          AF_SIP\n#define PF_IPX          AF_IPX          /* same format as AF_NS */\n#define PF_RTIP         pseudo_AF_RTIP  /* same format as AF_INET */\n#define PF_PIP          pseudo_AF_PIP\n#define PF_NDRV         AF_NDRV\n#define PF_ISDN         AF_ISDN\n#define PF_KEY          pseudo_AF_KEY\n#define PF_INET6        AF_INET6\n#define PF_NATM         AF_NATM\n#define PF_SYSTEM       AF_SYSTEM\n#define PF_NETBIOS      AF_NETBIOS\n#define PF_PPP          AF_PPP\n#define PF_RESERVED_36  AF_RESERVED_36\n#define PF_UTUN         AF_UTUN\n#define PF_VSOCK        AF_VSOCK\n#define PF_MAX          AF_MAX\n\n/*\n * These do not have socket-layer support:\n */\n#define PF_VLAN         ((uint32_t)0x766c616e)  /* 'vlan' */\n#define PF_BOND         ((uint32_t)0x626f6e64)  /* 'bond' */\n\n/*\n * Definitions for network related sysctl, CTL_NET.\n *\n * Second level is protocol family.\n * Third level is protocol number.\n *\n * Further levels are defined by the individual families below.\n */\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n#define NET_MAXID       AF_MAX\n#endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */\n\n\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n/*\n * PF_ROUTE - Routing table\n *\n * Three additional levels are defined:\n *\tFourth: address family, 0 is wildcard\n *\tFifth: type of info, defined below\n *\tSixth: flag(s) to mask with for NET_RT_FLAGS\n */\n#define NET_RT_DUMP             1       /* dump; may limit to a.f. */\n#define NET_RT_FLAGS            2       /* by flags, e.g. RESOLVING */\n#define NET_RT_IFLIST           3       /* survey interface list */\n#define NET_RT_STAT             4       /* routing statistics */\n#define NET_RT_TRASH            5       /* routes not in table but not freed */\n#define NET_RT_IFLIST2          6       /* interface list with addresses */\n#define NET_RT_DUMP2            7       /* dump; may limit to a.f. */\n/*\n * Allows read access non-local host's MAC address\n * if the process has neighbor cache entitlement.\n */\n#define NET_RT_FLAGS_PRIV       10\n#define NET_RT_MAXID            11\n#endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */\n\n\n\n\n/*\n * Maximum queue length specifiable by listen.\n */\n#define SOMAXCONN       128\n\n/*\n * [XSI] Message header for recvmsg and sendmsg calls.\n * Used value-result for recvmsg, value only for sendmsg.\n */\nstruct msghdr {\n\tvoid            *msg_name;      /* [XSI] optional address */\n\tsocklen_t       msg_namelen;    /* [XSI] size of address */\n\tstruct          iovec *msg_iov; /* [XSI] scatter/gather array */\n\tint             msg_iovlen;     /* [XSI] # elements in msg_iov */\n\tvoid            *msg_control;   /* [XSI] ancillary data, see below */\n\tsocklen_t       msg_controllen; /* [XSI] ancillary data buffer len */\n\tint             msg_flags;      /* [XSI] flags on received message */\n};\n\n\n\n#define MSG_OOB         0x1             /* process out-of-band data */\n#define MSG_PEEK        0x2             /* peek at incoming message */\n#define MSG_DONTROUTE   0x4             /* send without using routing tables */\n#define MSG_EOR         0x8             /* data completes record */\n#define MSG_TRUNC       0x10            /* data discarded before delivery */\n#define MSG_CTRUNC      0x20            /* control data lost before delivery */\n#define MSG_WAITALL     0x40            /* wait for full request or error */\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n#define MSG_DONTWAIT    0x80            /* this message should be nonblocking */\n#define MSG_EOF         0x100           /* data completes connection */\n#ifdef __APPLE__\n#ifdef __APPLE_API_OBSOLETE\n#define MSG_WAITSTREAM  0x200           /* wait up to full request.. may return partial */\n#endif\n#define MSG_FLUSH       0x400           /* Start of 'hold' seq; dump so_temp, deprecated */\n#define MSG_HOLD        0x800           /* Hold frag in so_temp, deprecated */\n#define MSG_SEND        0x1000          /* Send the packet in so_temp, deprecated */\n#define MSG_HAVEMORE    0x2000          /* Data ready to be read */\n#define MSG_RCVMORE     0x4000          /* Data remains in current pkt */\n#endif\n#define MSG_NEEDSA      0x10000         /* Fail receive if socket address cannot be allocated */\n#endif  /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */\n\n#if __DARWIN_C_LEVEL >= 200809L\n#define MSG_NOSIGNAL    0x80000         /* do not generate SIGPIPE on EOF */\n#endif /* __DARWIN_C_LEVEL */\n\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n#endif  /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */\n\n/*\n * Header for ancillary data objects in msg_control buffer.\n * Used for additional information with/about a datagram\n * not expressible by flags.  The format is a sequence\n * of message elements headed by cmsghdr structures.\n */\nstruct cmsghdr {\n\tsocklen_t       cmsg_len;       /* [XSI] data byte count, including hdr */\n\tint             cmsg_level;     /* [XSI] originating protocol */\n\tint             cmsg_type;      /* [XSI] protocol-specific type */\n/* followed by\tunsigned char  cmsg_data[]; */\n};\n\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n#ifndef __APPLE__\n/*\n * While we may have more groups than this, the cmsgcred struct must\n * be able to fit in an mbuf, and NGROUPS_MAX is too large to allow\n * this.\n */\n#define CMGROUP_MAX 16\n\n/*\n * Credentials structure, used to verify the identity of a peer\n * process that has sent us a message. This is allocated by the\n * peer process but filled in by the kernel. This prevents the\n * peer from lying about its identity. (Note that cmcred_groups[0]\n * is the effective GID.)\n */\nstruct cmsgcred {\n\tpid_t   cmcred_pid;             /* PID of sending process */\n\tuid_t   cmcred_uid;             /* real UID of sending process */\n\tuid_t   cmcred_euid;            /* effective UID of sending process */\n\tgid_t   cmcred_gid;             /* real GID of sending process */\n\tshort   cmcred_ngroups;         /* number or groups */\n\tgid_t   cmcred_groups[CMGROUP_MAX];     /* groups */\n};\n#endif\n#endif  /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */\n\n/* given pointer to struct cmsghdr, return pointer to data */\n#define CMSG_DATA(cmsg)         ((unsigned char *)(cmsg) + \\\n\t__DARWIN_ALIGN32(sizeof(struct cmsghdr)))\n\n/*\n * RFC 2292 requires to check msg_controllen, in case that the kernel returns\n * an empty list for some reasons.\n */\n#define CMSG_FIRSTHDR(mhdr) \\\n\t((mhdr)->msg_controllen >= sizeof(struct cmsghdr) ? \\\n\t    (struct cmsghdr *)(mhdr)->msg_control : \\\n\t    (struct cmsghdr *)0L)\n\n\n/*\n * Given pointer to struct cmsghdr, return pointer to next cmsghdr\n * RFC 2292 says that CMSG_NXTHDR(mhdr, NULL) is equivalent to CMSG_FIRSTHDR(mhdr)\n */\n#define CMSG_NXTHDR(mhdr, cmsg)                                         \\\n\t((char *)(cmsg) == (char *)0L ? CMSG_FIRSTHDR(mhdr) :           \\\n\t    ((((unsigned char *)(cmsg) +                                \\\n\t    __DARWIN_ALIGN32((__uint32_t)(cmsg)->cmsg_len) +            \\\n\t    __DARWIN_ALIGN32(sizeof(struct cmsghdr))) >                 \\\n\t    ((unsigned char *)(mhdr)->msg_control +                     \\\n\t    (mhdr)->msg_controllen)) ?                                  \\\n\t        (struct cmsghdr *)0L /* NULL */ :                       \\\n\t        (struct cmsghdr *)(void *)((unsigned char *)(cmsg) +    \\\n\t            __DARWIN_ALIGN32((__uint32_t)(cmsg)->cmsg_len))))\n\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n/* RFC 2292 additions */\n#define CMSG_SPACE(l)           (__DARWIN_ALIGN32(sizeof(struct cmsghdr)) + __DARWIN_ALIGN32(l))\n#define CMSG_LEN(l)             (__DARWIN_ALIGN32(sizeof(struct cmsghdr)) + (l))\n\n#endif  /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */\n\n/* \"Socket\"-level control message types: */\n#define SCM_RIGHTS                      0x01    /* access rights (array of int) */\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n#define SCM_TIMESTAMP                   0x02    /* timestamp (struct timeval) */\n#define SCM_CREDS                       0x03    /* process creds (struct cmsgcred) */\n#define SCM_TIMESTAMP_MONOTONIC         0x04    /* timestamp (uint64_t) */\n\n\n#endif  /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */\n\n/*\n * howto arguments for shutdown(2), specified by Posix.1g.\n */\n#define SHUT_RD         0               /* shut down the reading side */\n#define SHUT_WR         1               /* shut down the writing side */\n#define SHUT_RDWR       2               /* shut down both sides */\n\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n/*\n * sendfile(2) header/trailer struct\n */\nstruct sf_hdtr {\n\tstruct iovec *headers;  /* pointer to an array of header struct iovec's */\n\tint hdr_cnt;            /* number of header iovec's */\n\tstruct iovec *trailers; /* pointer to an array of trailer struct iovec's */\n\tint trl_cnt;            /* number of trailer iovec's */\n};\n\n\n#endif  /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */\n\n\n__BEGIN_DECLS\n\nint     accept(int, struct sockaddr * __restrict, socklen_t * __restrict)\n__DARWIN_ALIAS_C(accept);\nint     bind(int, const struct sockaddr *, socklen_t) __DARWIN_ALIAS(bind);\nint     connect(int, const struct sockaddr *, socklen_t) __DARWIN_ALIAS_C(connect);\nint     getpeername(int, struct sockaddr * __restrict, socklen_t * __restrict)\n__DARWIN_ALIAS(getpeername);\nint     getsockname(int, struct sockaddr * __restrict, socklen_t * __restrict)\n__DARWIN_ALIAS(getsockname);\nint     getsockopt(int, int, int, void * __restrict, socklen_t * __restrict);\nint     listen(int, int) __DARWIN_ALIAS(listen);\nssize_t recv(int, void *, size_t, int) __DARWIN_ALIAS_C(recv);\nssize_t recvfrom(int, void *, size_t, int, struct sockaddr * __restrict,\n    socklen_t * __restrict) __DARWIN_ALIAS_C(recvfrom);\nssize_t recvmsg(int, struct msghdr *, int) __DARWIN_ALIAS_C(recvmsg);\nssize_t send(int, const void *, size_t, int) __DARWIN_ALIAS_C(send);\nssize_t sendmsg(int, const struct msghdr *, int) __DARWIN_ALIAS_C(sendmsg);\nssize_t sendto(int, const void *, size_t,\n    int, const struct sockaddr *, socklen_t) __DARWIN_ALIAS_C(sendto);\nint     setsockopt(int, int, int, const void *, socklen_t);\nint     shutdown(int, int);\nint     sockatmark(int) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);\nint     socket(int, int, int);\nint     socketpair(int, int, int, int *) __DARWIN_ALIAS(socketpair);\n\n#if !defined(_POSIX_C_SOURCE)\nint     sendfile(int, int, off_t, off_t *, struct sf_hdtr *, int);\n#endif  /* !_POSIX_C_SOURCE */\n\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\nvoid    pfctlinput(int, struct sockaddr *);\n\n__API_AVAILABLE(macosx(10.11), ios(9.0), tvos(9.0), watchos(2.0))\nint connectx(int, const sa_endpoints_t *, sae_associd_t, unsigned int,\n    const struct iovec *, unsigned int, size_t *, sae_connid_t *);\n\n__API_AVAILABLE(macosx(10.11), ios(9.0), tvos(9.0), watchos(2.0))\nint disconnectx(int, sae_associd_t, sae_connid_t);\n#endif  /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */\n__END_DECLS\n\n\n#endif /* !_SYS_SOCKET_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/socketvar.h",
    "content": "/*\n * Copyright (c) 2000-2020 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/* Copyright (c) 1998, 1999 Apple Computer, Inc. All Rights Reserved */\n/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */\n/*\n * Copyright (c) 1982, 1986, 1990, 1993\n *\tThe Regents of the University of California.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *\tThis product includes software developed by the University of\n *\tCalifornia, Berkeley and its contributors.\n * 4. Neither the name of the University nor the names of its contributors\n *    may be used to endorse or promote products derived from this software\n *    without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n *\t@(#)socketvar.h\t8.3 (Berkeley) 2/19/95\n * $FreeBSD: src/sys/sys/socketvar.h,v 1.46.2.6 2001/08/31 13:45:49 jlemon Exp $\n */\n/*\n * NOTICE: This file was modified by SPARTA, Inc. in 2005 to introduce\n * support for mandatory and extensible security protections.  This notice\n * is included in support of clause 2.2 (b) of the Apple Public License,\n * Version 2.0.\n */\n\n#ifndef _SYS_SOCKETVAR_H_\n#define _SYS_SOCKETVAR_H_\n\n#include <sys/appleapiopts.h>\n#include <sys/cdefs.h>\n#include <sys/types.h> /* u_quad_t */\n#include <TargetConditionals.h>\n#include <uuid/uuid.h>\n\ntypedef u_quad_t so_gen_t;\n\n\n\n\n#if defined(__LP64__)\n#define _XSOCKET_PTR(x)         u_int32_t\n#else\n#define _XSOCKET_PTR(x)         x\n#endif\n\n\n#pragma pack(4)\n\nstruct xsockbuf {\n\tu_int32_t       sb_cc;\n\tu_int32_t       sb_hiwat;\n\tu_int32_t       sb_mbcnt;\n\tu_int32_t       sb_mbmax;\n\tint32_t         sb_lowat;\n\tshort           sb_flags;\n\tshort           sb_timeo;\n};\n\n/*\n * Externalized form of struct socket used by the sysctl(3) interface.\n */\nstruct  xsocket {\n\tu_int32_t               xso_len;        /* length of this structure */\n\t_XSOCKET_PTR(struct socket *) xso_so;   /* makes a convenient handle */\n\tshort                   so_type;\n\tshort                   so_options;\n\tshort                   so_linger;\n\tshort                   so_state;\n\t_XSOCKET_PTR(caddr_t)   so_pcb;         /* another convenient handle */\n\tint                     xso_protocol;\n\tint                     xso_family;\n\tshort                   so_qlen;\n\tshort                   so_incqlen;\n\tshort                   so_qlimit;\n\tshort                   so_timeo;\n\tu_short                 so_error;\n\tpid_t                   so_pgid;\n\tu_int32_t               so_oobmark;\n\tstruct xsockbuf         so_rcv;\n\tstruct xsockbuf         so_snd;\n\tuid_t                   so_uid;         /* XXX */\n};\n\n#if XNU_TARGET_OS_OSX || KERNEL || !(TARGET_OS_IPHONE && !TARGET_OS_SIMULATOR)\nstruct  xsocket64 {\n\tu_int32_t               xso_len;        /* length of this structure */\n\tu_int64_t               xso_so;         /* makes a convenient handle */\n\tshort                   so_type;\n\tshort                   so_options;\n\tshort                   so_linger;\n\tshort                   so_state;\n\tu_int64_t               so_pcb;         /* another convenient handle */\n\tint                     xso_protocol;\n\tint                     xso_family;\n\tshort                   so_qlen;\n\tshort                   so_incqlen;\n\tshort                   so_qlimit;\n\tshort                   so_timeo;\n\tu_short                 so_error;\n\tpid_t                   so_pgid;\n\tu_int32_t               so_oobmark;\n\tstruct xsockbuf         so_rcv;\n\tstruct xsockbuf         so_snd;\n\tuid_t                   so_uid;         /* XXX */\n};\n#endif /* XNU_TARGET_OS_OSX || KERNEL || !(TARGET_OS_IPHONE && !TARGET_OS_SIMULATOR) */\n\n\n#pragma pack()\n\n\n// Tracker actions\nenum so_tracker_action {\n\tSO_TRACKER_ACTION_INVALID = 0,\n\tSO_TRACKER_ACTION_ADD = 1,\n\tSO_TRACKER_ACTION_DUMP_BY_APP = 2,\n\tSO_TRACKER_ACTION_DUMP_ALL = 3,\n\tSO_TRACKER_ACTION_DUMP_MAX,\n};\n\n// Tracker TLV attributes\nenum so_tracker_attribute {\n\tSO_TRACKER_ATTRIBUTE_INVALID = 0,\n\tSO_TRACKER_ATTRIBUTE_ADDRESS_FAMILY = 1,\n\tSO_TRACKER_ATTRIBUTE_ADDRESS  = 2,\n\tSO_TRACKER_ATTRIBUTE_APP_UUID = 3,\n\tSO_TRACKER_ATTRIBUTE_DOMAIN = 4,\n\tSO_TRACKER_ATTRIBUTE_DOMAIN_OWNER = 5,\n\tSO_TRACKER_ATTRIBUTE_FLAGS = 6,\n\tSO_TRACKER_ATTRIBUTE_DUMP_ENTRY = 7,\n\tSO_TRACKER_ATTRIBUTE_MEMORY_USED = 8,\n\tSO_TRACKER_ATTRIBUTE_MAX,\n};\n\n// Tracker flags\n#define SO_TRACKER_ATTRIBUTE_FLAGS_APP_APPROVED     0x00000001\n#define SO_TRACKER_ATTRIBUTE_FLAGS_TRACKER          0x00000002\n#define SO_TRACKER_ATTRIBUTE_FLAGS_DOMAIN_SHORT     0x00000004\n\n#define SO_TRACKER_TRANSPARENCY_VERSION         3\nextern int tracker_action(int action, char *buffer, size_t buffer_size);\n\n#endif /* !_SYS_SOCKETVAR_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/sockio.h",
    "content": "/*\n * Copyright (c) 2000-2021 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */\n/*-\n * Copyright (c) 1982, 1986, 1990, 1993, 1994\n *\tThe Regents of the University of California.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *\tThis product includes software developed by the University of\n *\tCalifornia, Berkeley and its contributors.\n * 4. Neither the name of the University nor the names of its contributors\n *    may be used to endorse or promote products derived from this software\n *    without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n *\t@(#)sockio.h\t8.1 (Berkeley) 3/28/94\n */\n\n#ifndef _SYS_SOCKIO_H_\n#define _SYS_SOCKIO_H_\n\n#include <sys/appleapiopts.h>\n\n#include <sys/ioccom.h>\n\n/* Socket ioctl's. */\n#define SIOCSHIWAT       _IOW('s',  0, int)             /* set high watermark */\n#define SIOCGHIWAT       _IOR('s',  1, int)             /* get high watermark */\n#define SIOCSLOWAT       _IOW('s',  2, int)             /* set low watermark */\n#define SIOCGLOWAT       _IOR('s',  3, int)             /* get low watermark */\n#define SIOCATMARK       _IOR('s',  7, int)             /* at oob mark? */\n#define SIOCSPGRP        _IOW('s',  8, int)             /* set process group */\n#define SIOCGPGRP        _IOR('s',  9, int)             /* get process group */\n\n/*\n * OSIOCGIF* ioctls are deprecated; they are kept for binary compatibility.\n */\n#define SIOCSIFADDR     _IOW('i', 12, struct ifreq)     /* set ifnet address */\n#define SIOCSIFDSTADDR   _IOW('i', 14, struct ifreq)    /* set p-p address */\n#define SIOCSIFFLAGS     _IOW('i', 16, struct ifreq)    /* set ifnet flags */\n#define SIOCGIFFLAGS    _IOWR('i', 17, struct ifreq)    /* get ifnet flags */\n#define SIOCSIFBRDADDR   _IOW('i', 19, struct ifreq)    /* set broadcast addr */\n#define SIOCSIFNETMASK   _IOW('i', 22, struct ifreq)    /* set net addr mask */\n#define SIOCGIFMETRIC   _IOWR('i', 23, struct ifreq)    /* get IF metric */\n#define SIOCSIFMETRIC   _IOW('i', 24, struct ifreq)     /* set IF metric */\n#define SIOCDIFADDR     _IOW('i', 25, struct ifreq)     /* delete IF addr */\n#define SIOCAIFADDR     _IOW('i', 26, struct ifaliasreq)/* add/chg IF alias */\n\n#define SIOCGIFADDR     _IOWR('i', 33, struct ifreq)    /* get ifnet address */\n#define SIOCGIFDSTADDR  _IOWR('i', 34, struct ifreq)    /* get p-p address */\n#define SIOCGIFBRDADDR  _IOWR('i', 35, struct ifreq)    /* get broadcast addr */\n#define SIOCGIFCONF     _IOWR('i', 36, struct ifconf)   /* get ifnet list */\n#define SIOCGIFNETMASK  _IOWR('i', 37, struct ifreq)    /* get net addr mask */\n#define SIOCAUTOADDR    _IOWR('i', 38, struct ifreq)    /* autoconf address */\n#define SIOCAUTONETMASK _IOW('i', 39, struct ifreq)     /* autoconf netmask */\n#define SIOCARPIPLL             _IOWR('i', 40, struct ifreq)    /* arp for IPv4LL address */\n\n#define SIOCADDMULTI     _IOW('i', 49, struct ifreq)    /* add m'cast addr */\n#define SIOCDELMULTI     _IOW('i', 50, struct ifreq)    /* del m'cast addr */\n#define SIOCGIFMTU      _IOWR('i', 51, struct ifreq)    /* get IF mtu */\n#define SIOCSIFMTU       _IOW('i', 52, struct ifreq)    /* set IF mtu */\n#define SIOCGIFPHYS     _IOWR('i', 53, struct ifreq)    /* get IF wire */\n#define SIOCSIFPHYS      _IOW('i', 54, struct ifreq)    /* set IF wire */\n#define SIOCSIFMEDIA    _IOWR('i', 55, struct ifreq)    /* set net media */\n\n/*\n * The command SIOCGIFMEDIA does not allow a process to access the extended\n * media subtype and extended subtype values are returned as IFM_OTHER.\n */\n#define SIOCGIFMEDIA    _IOWR('i', 56, struct ifmediareq) /* get compatible net media  */\n\n#define SIOCSIFGENERIC   _IOW('i', 57, struct ifreq)    /* generic IF set op */\n#define SIOCGIFGENERIC  _IOWR('i', 58, struct ifreq)    /* generic IF get op */\n#define SIOCRSLVMULTI   _IOWR('i', 59, struct rslvmulti_req)\n\n#define SIOCSIFLLADDR   _IOW('i', 60, struct ifreq)     /* set link level addr */\n#define SIOCGIFSTATUS   _IOWR('i', 61, struct ifstat)   /* get IF status */\n#define SIOCSIFPHYADDR   _IOW('i', 62, struct ifaliasreq) /* set gif addres */\n#define SIOCGIFPSRCADDR _IOWR('i', 63, struct ifreq)    /* get gif psrc addr */\n#define SIOCGIFPDSTADDR _IOWR('i', 64, struct ifreq)    /* get gif pdst addr */\n#define SIOCDIFPHYADDR   _IOW('i', 65, struct ifreq)    /* delete gif addrs */\n\n#define SIOCGIFDEVMTU   _IOWR('i', 68, struct ifreq)    /* get if ifdevmtu */\n#define SIOCSIFALTMTU    _IOW('i', 69, struct ifreq)    /* set if alternate mtu */\n#define SIOCGIFALTMTU   _IOWR('i', 72, struct ifreq)    /* get if alternate mtu */\n#define SIOCSIFBOND      _IOW('i', 70, struct ifreq)    /* set bond if config */\n#define SIOCGIFBOND     _IOWR('i', 71, struct ifreq)    /* get bond if config */\n\n/*\n * The command SIOCGIFXMEDIA is meant to be used by processes only to be able\n * to access the extended media subtypes with the extended IFM_TMASK.\n *\n * An ifnet must not implement SIOCGIFXMEDIA as it gets the extended\n * media subtypes by simply compiling with <net/if_media.h>\n */\n#define SIOCGIFXMEDIA   _IOWR('i', 72, struct ifmediareq) /* get net extended media */\n\n\n#define SIOCSIFCAP       _IOW('i', 90, struct ifreq)    /* set IF features */\n#define SIOCGIFCAP      _IOWR('i', 91, struct ifreq)    /* get IF features */\n\n#define SIOCIFCREATE    _IOWR('i', 120, struct ifreq)   /* create clone if */\n#define SIOCIFDESTROY    _IOW('i', 121, struct ifreq)   /* destroy clone if */\n#define SIOCIFCREATE2   _IOWR('i', 122, struct ifreq)   /* create clone if with data */\n\n#define SIOCSDRVSPEC    _IOW('i', 123, struct ifdrv)    /* set driver-specific\n\t                                                 *         parameters */\n#define SIOCGDRVSPEC    _IOWR('i', 123, struct ifdrv)   /* get driver-specific\n\t                                                 *         parameters */\n#define SIOCSIFVLAN      _IOW('i', 126, struct ifreq)   /* set VLAN config */\n#define SIOCGIFVLAN     _IOWR('i', 127, struct ifreq)   /* get VLAN config */\n#define SIOCSETVLAN     SIOCSIFVLAN\n#define SIOCGETVLAN     SIOCGIFVLAN\n\n#define SIOCIFGCLONERS  _IOWR('i', 129, struct if_clonereq) /* get cloners */\n\n#define SIOCGIFASYNCMAP _IOWR('i', 124, struct ifreq)   /* get ppp asyncmap */\n#define SIOCSIFASYNCMAP _IOW('i', 125, struct ifreq)    /* set ppp asyncmap */\n\n\n\n#define SIOCGIFMAC      _IOWR('i', 130, struct ifreq)   /* deprecated */\n#define SIOCSIFMAC      _IOW('i', 131, struct ifreq)    /* deprecated */\n#define SIOCSIFKPI      _IOW('i', 134, struct ifreq) /* set interface kext param - root only */\n#define SIOCGIFKPI      _IOWR('i', 135, struct ifreq) /* get interface kext param */\n\n#define SIOCGIFWAKEFLAGS _IOWR('i', 136, struct ifreq) /* get interface wake property flags */\n\n#define SIOCGIFFUNCTIONALTYPE   _IOWR('i', 173, struct ifreq) /* get interface functional type */\n\n#define SIOCSIF6LOWPAN  _IOW('i', 196, struct ifreq)    /* set 6LOWPAN config */\n#define SIOCGIF6LOWPAN  _IOWR('i', 197, struct ifreq)   /* get 6LOWPAN config */\n\n\n#endif /* !_SYS_SOCKIO_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/spawn.h",
    "content": "/*\n * Copyright (c) 2006-2020 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n\n/*\n * [SPN] Support for _POSIX_SPAWN\n *\n * This header contains information that is shared between the user space\n * and kernel versions of the posix_spawn() code.  Shared elements are all\n * manifest constants, at the current time.\n */\n\n#ifndef _SYS_SPAWN_H_\n#define _SYS_SPAWN_H_\n\n/*\n * Possible bit values which may be OR'ed together and provided as the second\n * parameter to posix_spawnattr_setflags() or implicit returned in the value of\n * the second parameter to posix_spawnattr_getflags().\n */\n#define POSIX_SPAWN_RESETIDS            0x0001  /* [SPN] R[UG]ID not E[UG]ID */\n#define POSIX_SPAWN_SETPGROUP           0x0002  /* [SPN] set non-parent PGID */\n#define POSIX_SPAWN_SETSIGDEF           0x0004  /* [SPN] reset sigset default */\n#define POSIX_SPAWN_SETSIGMASK          0x0008  /* [SPN] set signal mask */\n\n#if 0   /* _POSIX_PRIORITY_SCHEDULING [PS] : not supported */\n#define POSIX_SPAWN_SETSCHEDPARAM       0x0010\n#define POSIX_SPAWN_SETSCHEDULER        0x0020\n#endif  /* 0 */\n\n#if     !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n/*\n * Darwin-specific flags\n */\n#define POSIX_SPAWN_SETEXEC             0x0040\n#define POSIX_SPAWN_START_SUSPENDED     0x0080\n#define POSIX_SPAWN_SETSID              0x0400\n#define POSIX_SPAWN_CLOEXEC_DEFAULT     0x4000\n\n#define _POSIX_SPAWN_RESLIDE            0x0800\n\n/*\n * Possible values to be set for the process control actions on resource starvation.\n * POSIX_SPAWN_PCONTROL_THROTTLE indicates that the process is to be throttled on starvation.\n * POSIX_SPAWN_PCONTROL_SUSPEND indicates that the process is to be suspended on starvation.\n * POSIX_SPAWN_PCONTROL_KILL indicates that the process is to be terminated  on starvation.\n */\n#define POSIX_SPAWN_PCONTROL_NONE       0x0000\n#define POSIX_SPAWN_PCONTROL_THROTTLE   0x0001\n#define POSIX_SPAWN_PCONTROL_SUSPEND    0x0002\n#define POSIX_SPAWN_PCONTROL_KILL       0x0003\n\n#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */\n\n#endif  /* _SYS_SPAWN_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/stat.h",
    "content": "/*\n * Copyright (c) 2000-2014 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */\n/*-\n * Copyright (c) 1982, 1986, 1989, 1993\n *\tThe Regents of the University of California.  All rights reserved.\n * (c) UNIX System Laboratories, Inc.\n * All or some portions of this file are derived from material licensed\n * to the University of California by American Telephone and Telegraph\n * Co. or Unix System Laboratories, Inc. and are reproduced herein with\n * the permission of UNIX System Laboratories, Inc.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *\tThis product includes software developed by the University of\n *\tCalifornia, Berkeley and its contributors.\n * 4. Neither the name of the University nor the names of its contributors\n *    may be used to endorse or promote products derived from this software\n *    without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n *\t@(#)stat.h\t8.9 (Berkeley) 8/17/94\n */\n\n\n#ifndef _SYS_STAT_H_\n#define _SYS_STAT_H_\n\n#include <sys/_types.h>\n#include <sys/cdefs.h>\n#include <Availability.h>\n\n/* [XSI] The timespec structure may be defined as described in <time.h> */\n#include <sys/_types/_timespec.h>\n\n/*\n * [XSI] The blkcnt_t, blksize_t, dev_t, ino_t, mode_t, nlink_t, uid_t,\n * gid_t, off_t, and time_t types shall be defined as described in\n * <sys/types.h>.\n */\n#include <sys/_types/_blkcnt_t.h>\n#include <sys/_types/_blksize_t.h>\n#include <sys/_types/_dev_t.h>                  /* device number */\n#include <sys/_types/_ino_t.h>\n\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n#include <sys/_types/_ino64_t.h>\n#endif /* !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) */\n\n#include <sys/_types/_mode_t.h>\n#include <sys/_types/_nlink_t.h>\n#include <sys/_types/_uid_t.h>\n#include <sys/_types/_gid_t.h>\n#include <sys/_types/_off_t.h>\n#include <sys/_types/_time_t.h>\n\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n/*\n * XXX So deprecated, it would make your head spin\n *\n * The old stat structure.  In fact, this is not used by the kernel at all,\n * and should not be used by user space, and should be removed from this\n * header file entirely (along with the unused cvtstat() prototype in\n * vnode_internal.h).\n */\nstruct ostat {\n\t__uint16_t      st_dev;         /* inode's device */\n\tino_t           st_ino;         /* inode's number */\n\tmode_t          st_mode;        /* inode protection mode */\n\tnlink_t         st_nlink;       /* number of hard links */\n\t__uint16_t      st_uid;         /* user ID of the file's owner */\n\t__uint16_t      st_gid;         /* group ID of the file's group */\n\t__uint16_t      st_rdev;        /* device type */\n\t__int32_t       st_size;        /* file size, in bytes */\n\tstruct  timespec st_atimespec;  /* time of last access */\n\tstruct  timespec st_mtimespec;  /* time of last data modification */\n\tstruct  timespec st_ctimespec;  /* time of last file status change */\n\t__int32_t       st_blksize;     /* optimal blocksize for I/O */\n\t__int32_t       st_blocks;      /* blocks allocated for file */\n\t__uint32_t      st_flags;       /* user defined flags for file */\n\t__uint32_t      st_gen;         /* file generation number */\n};\n\n#define __DARWIN_STRUCT_STAT64_TIMES \\\n\tstruct timespec st_atimespec;           /* time of last access */ \\\n\tstruct timespec st_mtimespec;           /* time of last data modification */ \\\n\tstruct timespec st_ctimespec;           /* time of last status change */ \\\n\tstruct timespec st_birthtimespec;       /* time of file creation(birth) */\n\n#else /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */\n\n#define __DARWIN_STRUCT_STAT64_TIMES \\\n\ttime_t\t\tst_atime;               /* [XSI] Time of last access */ \\\n\tlong\t\tst_atimensec;           /* nsec of last access */ \\\n\ttime_t\t\tst_mtime;               /* [XSI] Last data modification time */ \\\n\tlong\t\tst_mtimensec;           /* last data modification nsec */ \\\n\ttime_t\t\tst_ctime;               /* [XSI] Time of last status change */ \\\n\tlong\t\tst_ctimensec;           /* nsec of last status change */ \\\n\ttime_t\t\tst_birthtime;           /*  File creation time(birth)  */ \\\n\tlong\t\tst_birthtimensec;       /* nsec of File creation time */\n\n#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */\n\n/*\n * This structure is used as the second parameter to the fstat64(),\n * lstat64(), and stat64() functions, and for struct stat when\n * __DARWIN_64_BIT_INO_T is set. __DARWIN_STRUCT_STAT64 is defined\n * above, depending on whether we use struct timespec or the direct\n * components.\n *\n * This is simillar to stat except for 64bit inode number\n * number instead of 32bit ino_t and the addition of create(birth) time.\n */\n#define __DARWIN_STRUCT_STAT64 { \\\n\tdev_t\t\tst_dev;                 /* [XSI] ID of device containing file */ \\\n\tmode_t\t\tst_mode;                /* [XSI] Mode of file (see below) */ \\\n\tnlink_t\t\tst_nlink;               /* [XSI] Number of hard links */ \\\n\t__darwin_ino64_t st_ino;                /* [XSI] File serial number */ \\\n\tuid_t\t\tst_uid;                 /* [XSI] User ID of the file */ \\\n\tgid_t\t\tst_gid;                 /* [XSI] Group ID of the file */ \\\n\tdev_t\t\tst_rdev;                /* [XSI] Device ID */ \\\n\t__DARWIN_STRUCT_STAT64_TIMES \\\n\toff_t\t\tst_size;                /* [XSI] file size, in bytes */ \\\n\tblkcnt_t\tst_blocks;              /* [XSI] blocks allocated for file */ \\\n\tblksize_t\tst_blksize;             /* [XSI] optimal blocksize for I/O */ \\\n\t__uint32_t\tst_flags;               /* user defined flags for file */ \\\n\t__uint32_t\tst_gen;                 /* file generation number */ \\\n\t__int32_t\tst_lspare;              /* RESERVED: DO NOT USE! */ \\\n\t__int64_t\tst_qspare[2];           /* RESERVED: DO NOT USE! */ \\\n}\n\n/*\n * [XSI] This structure is used as the second parameter to the fstat(),\n * lstat(), and stat() functions.\n */\n#if __DARWIN_64_BIT_INO_T\n\nstruct stat __DARWIN_STRUCT_STAT64;\n\n#else /* !__DARWIN_64_BIT_INO_T */\n\nstruct stat {\n\tdev_t           st_dev;         /* [XSI] ID of device containing file */\n\tino_t           st_ino;         /* [XSI] File serial number */\n\tmode_t          st_mode;        /* [XSI] Mode of file (see below) */\n\tnlink_t         st_nlink;       /* [XSI] Number of hard links */\n\tuid_t           st_uid;         /* [XSI] User ID of the file */\n\tgid_t           st_gid;         /* [XSI] Group ID of the file */\n\tdev_t           st_rdev;        /* [XSI] Device ID */\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n\tstruct  timespec st_atimespec;  /* time of last access */\n\tstruct  timespec st_mtimespec;  /* time of last data modification */\n\tstruct  timespec st_ctimespec;  /* time of last status change */\n#else\n\ttime_t          st_atime;       /* [XSI] Time of last access */\n\tlong            st_atimensec;   /* nsec of last access */\n\ttime_t          st_mtime;       /* [XSI] Last data modification time */\n\tlong            st_mtimensec;   /* last data modification nsec */\n\ttime_t          st_ctime;       /* [XSI] Time of last status change */\n\tlong            st_ctimensec;   /* nsec of last status change */\n#endif\n\toff_t           st_size;        /* [XSI] file size, in bytes */\n\tblkcnt_t        st_blocks;      /* [XSI] blocks allocated for file */\n\tblksize_t       st_blksize;     /* [XSI] optimal blocksize for I/O */\n\t__uint32_t      st_flags;       /* user defined flags for file */\n\t__uint32_t      st_gen;         /* file generation number */\n\t__int32_t       st_lspare;      /* RESERVED: DO NOT USE! */\n\t__int64_t       st_qspare[2];   /* RESERVED: DO NOT USE! */\n};\n\n#endif /* __DARWIN_64_BIT_INO_T */\n\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n\n#if !__DARWIN_ONLY_64_BIT_INO_T\n\nstruct stat64 __DARWIN_STRUCT_STAT64;\n\n#endif /* !__DARWIN_ONLY_64_BIT_INO_T */\n\n#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */\n\n\n\n\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n#define st_atime st_atimespec.tv_sec\n#define st_mtime st_mtimespec.tv_sec\n#define st_ctime st_ctimespec.tv_sec\n#define st_birthtime st_birthtimespec.tv_sec\n#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */\n\n/*\n * [XSI] The following are symbolic names for the values of type mode_t.  They\n * are bitmap values.\n */\n#include <sys/_types/_s_ifmt.h>\n\n/*\n * [XSI] The following macros shall be provided to test whether a file is\n * of the specified type.  The value m supplied to the macros is the value\n * of st_mode from a stat structure.  The macro shall evaluate to a non-zero\n * value if the test is true; 0 if the test is false.\n */\n#define S_ISBLK(m)      (((m) & S_IFMT) == S_IFBLK)     /* block special */\n#define S_ISCHR(m)      (((m) & S_IFMT) == S_IFCHR)     /* char special */\n#define S_ISDIR(m)      (((m) & S_IFMT) == S_IFDIR)     /* directory */\n#define S_ISFIFO(m)     (((m) & S_IFMT) == S_IFIFO)     /* fifo or socket */\n#define S_ISREG(m)      (((m) & S_IFMT) == S_IFREG)     /* regular file */\n#define S_ISLNK(m)      (((m) & S_IFMT) == S_IFLNK)     /* symbolic link */\n#define S_ISSOCK(m)     (((m) & S_IFMT) == S_IFSOCK)    /* socket */\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n#define S_ISWHT(m)      (((m) & S_IFMT) == S_IFWHT)     /* OBSOLETE: whiteout */\n#endif\n\n/*\n * [XSI] The implementation may implement message queues, semaphores, or\n * shared memory objects as distinct file types.  The following macros\n * shall be provided to test whether a file is of the specified type.\n * The value of the buf argument supplied to the macros is a pointer to\n * a stat structure.  The macro shall evaluate to a non-zero value if\n * the specified object is implemented as a distinct file type and the\n * specified file type is contained in the stat structure referenced by\n * buf.  Otherwise, the macro shall evaluate to zero.\n *\n * NOTE:\tThe current implementation does not do this, although\n *\t\tthis may change in future revisions, and co currently only\n *\t\tprovides these macros to ensure source compatability with\n *\t\timplementations which do.\n */\n#define S_TYPEISMQ(buf)         (0)     /* Test for a message queue */\n#define S_TYPEISSEM(buf)        (0)     /* Test for a semaphore */\n#define S_TYPEISSHM(buf)        (0)     /* Test for a shared memory object */\n\n/*\n * [TYM] The implementation may implement typed memory objects as distinct\n * file types, and the following macro shall test whether a file is of the\n * specified type.  The value of the buf argument supplied to the macros is\n * a pointer to a stat structure.  The macro shall evaluate to a non-zero\n * value if the specified object is implemented as a distinct file type and\n * the specified file type is contained in the stat structure referenced by\n * buf.  Otherwise, the macro shall evaluate to zero.\n *\n * NOTE:\tThe current implementation does not do this, although\n *\t\tthis may change in future revisions, and co currently only\n *\t\tprovides this macro to ensure source compatability with\n *\t\timplementations which do.\n */\n#define S_TYPEISTMO(buf)        (0)     /* Test for a typed memory object */\n\n\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n#define ACCESSPERMS     (S_IRWXU|S_IRWXG|S_IRWXO)       /* 0777 */\n                                                        /* 7777 */\n#define ALLPERMS        (S_ISUID|S_ISGID|S_ISTXT|S_IRWXU|S_IRWXG|S_IRWXO)\n/* 0666 */\n#define DEFFILEMODE     (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)\n\n#define S_BLKSIZE       512             /* block size used in the stat struct */\n\n/*\n * Definitions of flags stored in file flags word.\n *\n * Super-user and owner changeable flags.\n */\n#define UF_SETTABLE     0x0000ffff      /* mask of owner changeable flags */\n#define UF_NODUMP       0x00000001      /* do not dump file */\n#define UF_IMMUTABLE    0x00000002      /* file may not be changed */\n#define UF_APPEND       0x00000004      /* writes to file may only append */\n#define UF_OPAQUE       0x00000008      /* directory is opaque wrt. union */\n/*\n * The following bit is reserved for FreeBSD.  It is not implemented\n * in Mac OS X.\n */\n/* #define UF_NOUNLINK\t0x00000010 */\t/* file may not be removed or renamed */\n#define UF_COMPRESSED   0x00000020      /* file is compressed (some file-systems) */\n\n/* UF_TRACKED is used for dealing with document IDs.  We no longer issue\n *  notifications for deletes or renames for files which have UF_TRACKED set. */\n#define UF_TRACKED              0x00000040\n\n#define UF_DATAVAULT    0x00000080      /* entitlement required for reading */\n                                        /* and writing */\n\n/* Bits 0x0100 through 0x4000 are currently undefined. */\n#define UF_HIDDEN       0x00008000      /* hint that this item should not be */\n                                        /* displayed in a GUI */\n/*\n * Super-user changeable flags.\n */\n#define SF_SUPPORTED    0x009f0000      /* mask of superuser supported flags */\n#define SF_SETTABLE     0x3fff0000      /* mask of superuser changeable flags */\n#define SF_SYNTHETIC    0xc0000000      /* mask of system read-only synthetic flags */\n#define SF_ARCHIVED     0x00010000      /* file is archived */\n#define SF_IMMUTABLE    0x00020000      /* file may not be changed */\n#define SF_APPEND       0x00040000      /* writes to file may only append */\n#define SF_RESTRICTED   0x00080000      /* entitlement required for writing */\n#define SF_NOUNLINK     0x00100000      /* Item may not be removed, renamed or mounted on */\n\n/*\n * The following two bits are reserved for FreeBSD.  They are not\n * implemented in Mac OS X.\n */\n/* #define SF_SNAPSHOT\t0x00200000 */\t/* snapshot inode */\n/* NOTE: There is no SF_HIDDEN bit. */\n\n#define SF_FIRMLINK     0x00800000      /* file is a firmlink */\n\n/*\n * Synthetic flags.\n *\n * These are read-only.  We keep them out of SF_SUPPORTED so that\n * attempts to set them will fail.\n */\n#define SF_DATALESS     0x40000000     /* file is dataless object */\n\n\n#endif\n\n#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL\n/*\n * Extended flags (\"EF\") returned by ATTR_CMNEXT_EXT_FLAGS from getattrlist/getattrlistbulk\n */\n#define EF_MAY_SHARE_BLOCKS     0x00000001      /* file may share blocks with another file */\n#define EF_NO_XATTRS            0x00000002      /* file has no xattrs at all */\n#define EF_IS_SYNC_ROOT         0x00000004      /* file is a sync root for iCloud */\n#define EF_IS_PURGEABLE         0x00000008      /* file is purgeable */\n#define EF_IS_SPARSE            0x00000010      /* file has at least one sparse region */\n#define EF_IS_SYNTHETIC         0x00000020      /* a synthetic directory/symlink */\n#endif\n\n\n\n__BEGIN_DECLS\n/* [XSI] */\nint     chmod(const char *, mode_t) __DARWIN_ALIAS(chmod);\nint     fchmod(int, mode_t) __DARWIN_ALIAS(fchmod);\nint     fstat(int, struct stat *) __DARWIN_INODE64(fstat);\nint     lstat(const char *, struct stat *) __DARWIN_INODE64(lstat);\nint     mkdir(const char *, mode_t);\nint     mkfifo(const char *, mode_t);\nint     stat(const char *, struct stat *) __DARWIN_INODE64(stat);\nint     mknod(const char *, mode_t, dev_t);\nmode_t  umask(mode_t);\n\n#if __DARWIN_C_LEVEL >= 200809L\nint     fchmodat(int, const char *, mode_t, int) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_8_0);\nint     fstatat(int, const char *, struct stat *, int) __DARWIN_INODE64(fstatat) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_8_0);\nint     mkdirat(int, const char *, mode_t) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_8_0);\n\n#define UTIME_NOW       -1\n#define UTIME_OMIT      -2\n\nint     futimens(int __fd, const struct timespec __times[2]) __API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));\nint     utimensat(int __fd, const char *__path, const struct timespec __times[2],\n    int __flag) __API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));\n#endif\n\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n\n#include <sys/_types/_filesec_t.h>\n\nint     chflags(const char *, __uint32_t);\nint     chmodx_np(const char *, filesec_t);\nint     fchflags(int, __uint32_t);\nint     fchmodx_np(int, filesec_t);\nint     fstatx_np(int, struct stat *, filesec_t) __DARWIN_INODE64(fstatx_np);\nint     lchflags(const char *, __uint32_t) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);\nint     lchmod(const char *, mode_t) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);\nint     lstatx_np(const char *, struct stat *, filesec_t) __DARWIN_INODE64(lstatx_np);\nint     mkdirx_np(const char *, filesec_t);\nint     mkfifox_np(const char *, filesec_t);\nint     statx_np(const char *, struct stat *, filesec_t) __DARWIN_INODE64(statx_np);\nint     umaskx_np(filesec_t) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_6, __IPHONE_NA, __IPHONE_NA);\n\n#if !__DARWIN_ONLY_64_BIT_INO_T\n/* The following deprecated routines are simillar to stat and friends except provide struct stat64 instead of struct stat  */\nint     fstatx64_np(int, struct stat64 *, filesec_t) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_6, __IPHONE_NA, __IPHONE_NA);\nint     lstatx64_np(const char *, struct stat64 *, filesec_t) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_6, __IPHONE_NA, __IPHONE_NA);\nint     statx64_np(const char *, struct stat64 *, filesec_t) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_6, __IPHONE_NA, __IPHONE_NA);\nint     fstat64(int, struct stat64 *) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_6, __IPHONE_NA, __IPHONE_NA);\nint     lstat64(const char *, struct stat64 *) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_6, __IPHONE_NA, __IPHONE_NA);\nint     stat64(const char *, struct stat64 *) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_6, __IPHONE_NA, __IPHONE_NA);\n#endif /* !__DARWIN_ONLY_64_BIT_INO_T */\n#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */\n\n__END_DECLS\n#endif /* !_SYS_STAT_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/statvfs.h",
    "content": "/*\n * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_LICENSE_HEADER_START@\n * \n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this\n * file.\n * \n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n * \n * @APPLE_LICENSE_HEADER_END@\n */\n\n/*\n * sys/statvfs.h\n */\n#ifndef _SYS_STATVFS_H_\n#define\t_SYS_STATVFS_H_\n\n#include <sys/_types.h>\n#include <sys/cdefs.h>\n\n#include <sys/_types/_fsblkcnt_t.h>\n#include <sys/_types/_fsfilcnt_t.h>\n\n/* Following structure is used as a statvfs/fstatvfs function parameter */\nstruct statvfs {\n\tunsigned long\tf_bsize;\t/* File system block size */\n\tunsigned long\tf_frsize;\t/* Fundamental file system block size */\n\tfsblkcnt_t\tf_blocks;\t/* Blocks on FS in units of f_frsize */\n\tfsblkcnt_t\tf_bfree;\t/* Free blocks */\n\tfsblkcnt_t\tf_bavail;\t/* Blocks available to non-root */\n\tfsfilcnt_t\tf_files;\t/* Total inodes */\n\tfsfilcnt_t\tf_ffree;\t/* Free inodes */\n\tfsfilcnt_t\tf_favail;\t/* Free inodes for non-root */\n\tunsigned long\tf_fsid;\t\t/* Filesystem ID */\n\tunsigned long\tf_flag;\t\t/* Bit mask of values */\n\tunsigned long\tf_namemax;\t/* Max file name length */\n};\n\n/* Defined bits for f_flag field value */\n#define\tST_RDONLY\t0x00000001\t/* Read-only file system */\n#define\tST_NOSUID\t0x00000002\t/* Does not honor setuid/setgid */\n\n__BEGIN_DECLS\nint fstatvfs(int, struct statvfs *);\nint statvfs(const char * __restrict, struct statvfs * __restrict);\n__END_DECLS\n\n#endif\t/* _SYS_STATVFS_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/stdio.h",
    "content": "/*\n * Copyright (c) 2013 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n\n#ifndef _SYS_STDIO_H_\n#define _SYS_STDIO_H_\n\n#include <sys/cdefs.h>\n\n#if __DARWIN_C_LEVEL >= 200809L\n#include <Availability.h>\n\n__BEGIN_DECLS\n\nint     renameat(int, const char *, int, const char *) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_8_0);\n\n#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL\n\n#define RENAME_SECLUDE          0x00000001\n#define RENAME_SWAP                     0x00000002\n#define RENAME_EXCL                     0x00000004\nint renamex_np(const char *, const char *, unsigned int) __OSX_AVAILABLE(10.12) __IOS_AVAILABLE(10.0) __TVOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0);\nint renameatx_np(int, const char *, int, const char *, unsigned int) __OSX_AVAILABLE(10.12) __IOS_AVAILABLE(10.0) __TVOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0);\n\n#endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */\n\n__END_DECLS\n\n#endif /* __DARWIN_C_LEVEL >= 200809L */\n\n#endif /* _SYS_STDIO_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/sys_domain.h",
    "content": "/*\n * Copyright (c) 2000-2005, 2012, 2014 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n\n\n#ifndef _SYSTEM_DOMAIN_H_\n#define _SYSTEM_DOMAIN_H_\n\n#include <sys/appleapiopts.h>\n#include <sys/cdefs.h>\n#include <sys/types.h>\n\n\n/* Kernel Events Protocol */\n#define SYSPROTO_EVENT          1       /* kernel events protocol */\n\n/* Kernel Control Protocol */\n#define SYSPROTO_CONTROL        2       /* kernel control protocol */\n#define AF_SYS_CONTROL          2       /* corresponding sub address type */\n\n/* System family socket address */\nstruct sockaddr_sys {\n\tu_char          ss_len;         /* sizeof(struct sockaddr_sys) */\n\tu_char          ss_family;      /* AF_SYSTEM */\n\tu_int16_t       ss_sysaddr;     /* protocol address in AF_SYSTEM */\n\tu_int32_t       ss_reserved[7]; /* reserved to the protocol use */\n};\n\n\n\n#endif /* _SYSTEM_DOMAIN_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/syscall.h",
    "content": "/*\n * Copyright (c) 2004-2008 Apple Inc. All rights reserved.\n * \n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n * \n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n * \n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n * \n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n * \n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n * \n * \n * System call switch table.\n *\n * DO NOT EDIT-- this file is automatically generated.\n * created from /bsd.syscalls.master\n */\n\n#ifndef _SYS_SYSCALL_H_\n#define\t_SYS_SYSCALL_H_\n\n#include <sys/appleapiopts.h>\n#ifdef __APPLE_API_PRIVATE\n#define\tSYS_syscall        0\n#define\tSYS_exit           1\n#define\tSYS_fork           2\n#define\tSYS_read           3\n#define\tSYS_write          4\n#define\tSYS_open           5\n#define\tSYS_close          6\n#define\tSYS_wait4          7\n\t\t\t/* 8  old creat */\n#define\tSYS_link           9\n#define\tSYS_unlink         10\n\t\t\t/* 11  old execv */\n#define\tSYS_chdir          12\n#define\tSYS_fchdir         13\n#define\tSYS_mknod          14\n#define\tSYS_chmod          15\n#define\tSYS_chown          16\n\t\t\t/* 17  old break */\n#define\tSYS_getfsstat      18\n\t\t\t/* 19  old lseek */\n#define\tSYS_getpid         20\n\t\t\t/* 21  old mount */\n\t\t\t/* 22  old umount */\n#define\tSYS_setuid         23\n#define\tSYS_getuid         24\n#define\tSYS_geteuid        25\n#define\tSYS_ptrace         26\n#define\tSYS_recvmsg        27\n#define\tSYS_sendmsg        28\n#define\tSYS_recvfrom       29\n#define\tSYS_accept         30\n#define\tSYS_getpeername    31\n#define\tSYS_getsockname    32\n#define\tSYS_access         33\n#define\tSYS_chflags        34\n#define\tSYS_fchflags       35\n#define\tSYS_sync           36\n#define\tSYS_kill           37\n\t\t\t/* 38  old stat */\n#define\tSYS_getppid        39\n\t\t\t/* 40  old lstat */\n#define\tSYS_dup            41\n#define\tSYS_pipe           42\n#define\tSYS_getegid        43\n\t\t\t/* 44  old profil */\n\t\t\t/* 45  old ktrace */\n#define\tSYS_sigaction      46\n#define\tSYS_getgid         47\n#define\tSYS_sigprocmask    48\n#define\tSYS_getlogin       49\n#define\tSYS_setlogin       50\n#define\tSYS_acct           51\n#define\tSYS_sigpending     52\n#define\tSYS_sigaltstack    53\n#define\tSYS_ioctl          54\n#define\tSYS_reboot         55\n#define\tSYS_revoke         56\n#define\tSYS_symlink        57\n#define\tSYS_readlink       58\n#define\tSYS_execve         59\n#define\tSYS_umask          60\n#define\tSYS_chroot         61\n\t\t\t/* 62  old fstat */\n\t\t\t/* 63  used internally and reserved */\n\t\t\t/* 64  old getpagesize */\n#define\tSYS_msync          65\n#define\tSYS_vfork          66\n\t\t\t/* 67  old vread */\n\t\t\t/* 68  old vwrite */\n\t\t\t/* 69  old sbrk */\n\t\t\t/* 70  old sstk */\n\t\t\t/* 71  old mmap */\n\t\t\t/* 72  old vadvise */\n#define\tSYS_munmap         73\n#define\tSYS_mprotect       74\n#define\tSYS_madvise        75\n\t\t\t/* 76  old vhangup */\n\t\t\t/* 77  old vlimit */\n#define\tSYS_mincore        78\n#define\tSYS_getgroups      79\n#define\tSYS_setgroups      80\n#define\tSYS_getpgrp        81\n#define\tSYS_setpgid        82\n#define\tSYS_setitimer      83\n\t\t\t/* 84  old wait */\n#define\tSYS_swapon         85\n#define\tSYS_getitimer      86\n\t\t\t/* 87  old gethostname */\n\t\t\t/* 88  old sethostname */\n#define\tSYS_getdtablesize  89\n#define\tSYS_dup2           90\n\t\t\t/* 91  old getdopt */\n#define\tSYS_fcntl          92\n#define\tSYS_select         93\n\t\t\t/* 94  old setdopt */\n#define\tSYS_fsync          95\n#define\tSYS_setpriority    96\n#define\tSYS_socket         97\n#define\tSYS_connect        98\n\t\t\t/* 99  old accept */\n#define\tSYS_getpriority    100\n\t\t\t/* 101  old send */\n\t\t\t/* 102  old recv */\n\t\t\t/* 103  old sigreturn */\n#define\tSYS_bind           104\n#define\tSYS_setsockopt     105\n#define\tSYS_listen         106\n\t\t\t/* 107  old vtimes */\n\t\t\t/* 108  old sigvec */\n\t\t\t/* 109  old sigblock */\n\t\t\t/* 110  old sigsetmask */\n#define\tSYS_sigsuspend     111\n\t\t\t/* 112  old sigstack */\n\t\t\t/* 113  old recvmsg */\n\t\t\t/* 114  old sendmsg */\n\t\t\t/* 115  old vtrace */\n#define\tSYS_gettimeofday   116\n#define\tSYS_getrusage      117\n#define\tSYS_getsockopt     118\n\t\t\t/* 119  old resuba */\n#define\tSYS_readv          120\n#define\tSYS_writev         121\n#define\tSYS_settimeofday   122\n#define\tSYS_fchown         123\n#define\tSYS_fchmod         124\n\t\t\t/* 125  old recvfrom */\n#define\tSYS_setreuid       126\n#define\tSYS_setregid       127\n#define\tSYS_rename         128\n\t\t\t/* 129  old truncate */\n\t\t\t/* 130  old ftruncate */\n#define\tSYS_flock          131\n#define\tSYS_mkfifo         132\n#define\tSYS_sendto         133\n#define\tSYS_shutdown       134\n#define\tSYS_socketpair     135\n#define\tSYS_mkdir          136\n#define\tSYS_rmdir          137\n#define\tSYS_utimes         138\n#define\tSYS_futimes        139\n#define\tSYS_adjtime        140\n\t\t\t/* 141  old getpeername */\n#define\tSYS_gethostuuid    142\n\t\t\t/* 143  old sethostid */\n\t\t\t/* 144  old getrlimit */\n\t\t\t/* 145  old setrlimit */\n\t\t\t/* 146  old killpg */\n#define\tSYS_setsid         147\n\t\t\t/* 148  old setquota */\n\t\t\t/* 149  old qquota */\n\t\t\t/* 150  old getsockname */\n#define\tSYS_getpgid        151\n#define\tSYS_setprivexec    152\n#define\tSYS_pread          153\n#define\tSYS_pwrite         154\n#define\tSYS_nfssvc         155\n\t\t\t/* 156  old getdirentries */\n#define\tSYS_statfs         157\n#define\tSYS_fstatfs        158\n#define\tSYS_unmount        159\n\t\t\t/* 160  old async_daemon */\n#define\tSYS_getfh          161\n\t\t\t/* 162  old getdomainname */\n\t\t\t/* 163  old setdomainname */\n\t\t\t/* 164  */\n#define\tSYS_quotactl       165\n\t\t\t/* 166  old exportfs */\n#define\tSYS_mount          167\n\t\t\t/* 168  old ustat */\n#define\tSYS_csops          169\n#define\tSYS_csops_audittoken 170\n\t\t\t/* 171  old wait3 */\n\t\t\t/* 172  old rpause */\n#define\tSYS_waitid         173\n\t\t\t/* 174  old getdents */\n\t\t\t/* 175  old gc_control */\n\t\t\t/* 176  old add_profil */\n#define\tSYS_kdebug_typefilter 177\n#define\tSYS_kdebug_trace_string 178\n#define\tSYS_kdebug_trace64 179\n#define\tSYS_kdebug_trace   180\n#define\tSYS_setgid         181\n#define\tSYS_setegid        182\n#define\tSYS_seteuid        183\n#define\tSYS_sigreturn      184\n\t\t\t/* 185  old chud */\n#define\tSYS_thread_selfcounts 186\n#define\tSYS_fdatasync      187\n#define\tSYS_stat           188\n#define\tSYS_fstat          189\n#define\tSYS_lstat          190\n#define\tSYS_pathconf       191\n#define\tSYS_fpathconf      192\n\t\t\t/* 193  old getfsstat */\n#define\tSYS_getrlimit      194\n#define\tSYS_setrlimit      195\n#define\tSYS_getdirentries  196\n#define\tSYS_mmap           197\n\t\t\t/* 198  old __syscall */\n#define\tSYS_lseek          199\n#define\tSYS_truncate       200\n#define\tSYS_ftruncate      201\n#define\tSYS_sysctl         202\n#define\tSYS_mlock          203\n#define\tSYS_munlock        204\n#define\tSYS_undelete       205\n\t\t\t/* 206  old ATsocket */\n\t\t\t/* 207  old ATgetmsg */\n\t\t\t/* 208  old ATputmsg */\n\t\t\t/* 209  old ATsndreq */\n\t\t\t/* 210  old ATsndrsp */\n\t\t\t/* 211  old ATgetreq */\n\t\t\t/* 212  old ATgetrsp */\n\t\t\t/* 213  Reserved for AppleTalk */\n\t\t\t/* 214  */\n\t\t\t/* 215  */\n#define\tSYS_open_dprotected_np 216\n#define\tSYS_fsgetpath_ext  217\n\t\t\t/* 218  old lstatv */\n\t\t\t/* 219  old fstatv */\n#define\tSYS_getattrlist    220\n#define\tSYS_setattrlist    221\n#define\tSYS_getdirentriesattr 222\n#define\tSYS_exchangedata   223\n\t\t\t/* 224  old checkuseraccess or fsgetpath */\n#define\tSYS_searchfs       225\n#define\tSYS_delete         226\n#define\tSYS_copyfile       227\n#define\tSYS_fgetattrlist   228\n#define\tSYS_fsetattrlist   229\n#define\tSYS_poll           230\n\t\t\t/* 231  old watchevent */\n\t\t\t/* 232  old waitevent */\n\t\t\t/* 233  old modwatch */\n#define\tSYS_getxattr       234\n#define\tSYS_fgetxattr      235\n#define\tSYS_setxattr       236\n#define\tSYS_fsetxattr      237\n#define\tSYS_removexattr    238\n#define\tSYS_fremovexattr   239\n#define\tSYS_listxattr      240\n#define\tSYS_flistxattr     241\n#define\tSYS_fsctl          242\n#define\tSYS_initgroups     243\n#define\tSYS_posix_spawn    244\n#define\tSYS_ffsctl         245\n\t\t\t/* 246  */\n#define\tSYS_nfsclnt        247\n#define\tSYS_fhopen         248\n\t\t\t/* 249  */\n#define\tSYS_minherit       250\n#define\tSYS_semsys         251\n#define\tSYS_msgsys         252\n#define\tSYS_shmsys         253\n#define\tSYS_semctl         254\n#define\tSYS_semget         255\n#define\tSYS_semop          256\n\t\t\t/* 257  old semconfig */\n#define\tSYS_msgctl         258\n#define\tSYS_msgget         259\n#define\tSYS_msgsnd         260\n#define\tSYS_msgrcv         261\n#define\tSYS_shmat          262\n#define\tSYS_shmctl         263\n#define\tSYS_shmdt          264\n#define\tSYS_shmget         265\n#define\tSYS_shm_open       266\n#define\tSYS_shm_unlink     267\n#define\tSYS_sem_open       268\n#define\tSYS_sem_close      269\n#define\tSYS_sem_unlink     270\n#define\tSYS_sem_wait       271\n#define\tSYS_sem_trywait    272\n#define\tSYS_sem_post       273\n#define\tSYS_sysctlbyname   274\n\t\t\t/* 275  old sem_init */\n\t\t\t/* 276  old sem_destroy */\n#define\tSYS_open_extended  277\n#define\tSYS_umask_extended 278\n#define\tSYS_stat_extended  279\n#define\tSYS_lstat_extended 280\n#define\tSYS_fstat_extended 281\n#define\tSYS_chmod_extended 282\n#define\tSYS_fchmod_extended 283\n#define\tSYS_access_extended 284\n#define\tSYS_settid         285\n#define\tSYS_gettid         286\n#define\tSYS_setsgroups     287\n#define\tSYS_getsgroups     288\n#define\tSYS_setwgroups     289\n#define\tSYS_getwgroups     290\n#define\tSYS_mkfifo_extended 291\n#define\tSYS_mkdir_extended 292\n#define\tSYS_identitysvc    293\n#define\tSYS_shared_region_check_np 294\n\t\t\t/* 295  old shared_region_map_np */\n#define\tSYS_vm_pressure_monitor 296\n#define\tSYS_psynch_rw_longrdlock 297\n#define\tSYS_psynch_rw_yieldwrlock 298\n#define\tSYS_psynch_rw_downgrade 299\n#define\tSYS_psynch_rw_upgrade 300\n#define\tSYS_psynch_mutexwait 301\n#define\tSYS_psynch_mutexdrop 302\n#define\tSYS_psynch_cvbroad 303\n#define\tSYS_psynch_cvsignal 304\n#define\tSYS_psynch_cvwait  305\n#define\tSYS_psynch_rw_rdlock 306\n#define\tSYS_psynch_rw_wrlock 307\n#define\tSYS_psynch_rw_unlock 308\n#define\tSYS_psynch_rw_unlock2 309\n#define\tSYS_getsid         310\n#define\tSYS_settid_with_pid 311\n#define\tSYS_psynch_cvclrprepost 312\n#define\tSYS_aio_fsync      313\n#define\tSYS_aio_return     314\n#define\tSYS_aio_suspend    315\n#define\tSYS_aio_cancel     316\n#define\tSYS_aio_error      317\n#define\tSYS_aio_read       318\n#define\tSYS_aio_write      319\n#define\tSYS_lio_listio     320\n\t\t\t/* 321  old __pthread_cond_wait */\n#define\tSYS_iopolicysys    322\n#define\tSYS_process_policy 323\n#define\tSYS_mlockall       324\n#define\tSYS_munlockall     325\n\t\t\t/* 326  */\n#define\tSYS_issetugid      327\n#define\tSYS___pthread_kill 328\n#define\tSYS___pthread_sigmask 329\n#define\tSYS___sigwait      330\n#define\tSYS___disable_threadsignal 331\n#define\tSYS___pthread_markcancel 332\n#define\tSYS___pthread_canceled 333\n#define\tSYS___semwait_signal 334\n\t\t\t/* 335  old utrace */\n#define\tSYS_proc_info      336\n#define\tSYS_sendfile       337\n#define\tSYS_stat64         338\n#define\tSYS_fstat64        339\n#define\tSYS_lstat64        340\n#define\tSYS_stat64_extended 341\n#define\tSYS_lstat64_extended 342\n#define\tSYS_fstat64_extended 343\n#define\tSYS_getdirentries64 344\n#define\tSYS_statfs64       345\n#define\tSYS_fstatfs64      346\n#define\tSYS_getfsstat64    347\n#define\tSYS___pthread_chdir 348\n#define\tSYS___pthread_fchdir 349\n#define\tSYS_audit          350\n#define\tSYS_auditon        351\n\t\t\t/* 352  */\n#define\tSYS_getauid        353\n#define\tSYS_setauid        354\n\t\t\t/* 355  old getaudit */\n\t\t\t/* 356  old setaudit */\n#define\tSYS_getaudit_addr  357\n#define\tSYS_setaudit_addr  358\n#define\tSYS_auditctl       359\n#define\tSYS_bsdthread_create 360\n#define\tSYS_bsdthread_terminate 361\n#define\tSYS_kqueue         362\n#define\tSYS_kevent         363\n#define\tSYS_lchown         364\n\t\t\t/* 365  old stack_snapshot */\n#define\tSYS_bsdthread_register 366\n#define\tSYS_workq_open     367\n#define\tSYS_workq_kernreturn 368\n#define\tSYS_kevent64       369\n#define\tSYS___old_semwait_signal 370\n#define\tSYS___old_semwait_signal_nocancel 371\n#define\tSYS_thread_selfid  372\n#define\tSYS_ledger         373\n#define\tSYS_kevent_qos     374\n#define\tSYS_kevent_id      375\n\t\t\t/* 376  */\n\t\t\t/* 377  */\n\t\t\t/* 378  */\n\t\t\t/* 379  */\n#define\tSYS___mac_execve   380\n#define\tSYS___mac_syscall  381\n#define\tSYS___mac_get_file 382\n#define\tSYS___mac_set_file 383\n#define\tSYS___mac_get_link 384\n#define\tSYS___mac_set_link 385\n#define\tSYS___mac_get_proc 386\n#define\tSYS___mac_set_proc 387\n#define\tSYS___mac_get_fd   388\n#define\tSYS___mac_set_fd   389\n#define\tSYS___mac_get_pid  390\n\t\t\t/* 391  */\n\t\t\t/* 392  */\n\t\t\t/* 393  */\n#define\tSYS_pselect        394\n#define\tSYS_pselect_nocancel 395\n#define\tSYS_read_nocancel  396\n#define\tSYS_write_nocancel 397\n#define\tSYS_open_nocancel  398\n#define\tSYS_close_nocancel 399\n#define\tSYS_wait4_nocancel 400\n#define\tSYS_recvmsg_nocancel 401\n#define\tSYS_sendmsg_nocancel 402\n#define\tSYS_recvfrom_nocancel 403\n#define\tSYS_accept_nocancel 404\n#define\tSYS_msync_nocancel 405\n#define\tSYS_fcntl_nocancel 406\n#define\tSYS_select_nocancel 407\n#define\tSYS_fsync_nocancel 408\n#define\tSYS_connect_nocancel 409\n#define\tSYS_sigsuspend_nocancel 410\n#define\tSYS_readv_nocancel 411\n#define\tSYS_writev_nocancel 412\n#define\tSYS_sendto_nocancel 413\n#define\tSYS_pread_nocancel 414\n#define\tSYS_pwrite_nocancel 415\n#define\tSYS_waitid_nocancel 416\n#define\tSYS_poll_nocancel  417\n#define\tSYS_msgsnd_nocancel 418\n#define\tSYS_msgrcv_nocancel 419\n#define\tSYS_sem_wait_nocancel 420\n#define\tSYS_aio_suspend_nocancel 421\n#define\tSYS___sigwait_nocancel 422\n#define\tSYS___semwait_signal_nocancel 423\n#define\tSYS___mac_mount    424\n#define\tSYS___mac_get_mount 425\n#define\tSYS___mac_getfsstat 426\n#define\tSYS_fsgetpath      427\n#define\tSYS_audit_session_self 428\n#define\tSYS_audit_session_join 429\n#define\tSYS_fileport_makeport 430\n#define\tSYS_fileport_makefd 431\n#define\tSYS_audit_session_port 432\n#define\tSYS_pid_suspend    433\n#define\tSYS_pid_resume     434\n#define\tSYS_pid_hibernate  435\n#define\tSYS_pid_shutdown_sockets 436\n\t\t\t/* 437  old shared_region_slide_np */\n#define\tSYS_shared_region_map_and_slide_np 438\n#define\tSYS_kas_info       439\n#define\tSYS_memorystatus_control 440\n#define\tSYS_guarded_open_np 441\n#define\tSYS_guarded_close_np 442\n#define\tSYS_guarded_kqueue_np 443\n#define\tSYS_change_fdguard_np 444\n#define\tSYS_usrctl         445\n#define\tSYS_proc_rlimit_control 446\n#define\tSYS_connectx       447\n#define\tSYS_disconnectx    448\n#define\tSYS_peeloff        449\n#define\tSYS_socket_delegate 450\n#define\tSYS_telemetry      451\n#define\tSYS_proc_uuid_policy 452\n#define\tSYS_memorystatus_get_level 453\n#define\tSYS_system_override 454\n#define\tSYS_vfs_purge      455\n#define\tSYS_sfi_ctl        456\n#define\tSYS_sfi_pidctl     457\n#define\tSYS_coalition      458\n#define\tSYS_coalition_info 459\n#define\tSYS_necp_match_policy 460\n#define\tSYS_getattrlistbulk 461\n#define\tSYS_clonefileat    462\n#define\tSYS_openat         463\n#define\tSYS_openat_nocancel 464\n#define\tSYS_renameat       465\n#define\tSYS_faccessat      466\n#define\tSYS_fchmodat       467\n#define\tSYS_fchownat       468\n#define\tSYS_fstatat        469\n#define\tSYS_fstatat64      470\n#define\tSYS_linkat         471\n#define\tSYS_unlinkat       472\n#define\tSYS_readlinkat     473\n#define\tSYS_symlinkat      474\n#define\tSYS_mkdirat        475\n#define\tSYS_getattrlistat  476\n#define\tSYS_proc_trace_log 477\n#define\tSYS_bsdthread_ctl  478\n#define\tSYS_openbyid_np    479\n#define\tSYS_recvmsg_x      480\n#define\tSYS_sendmsg_x      481\n#define\tSYS_thread_selfusage 482\n#define\tSYS_csrctl         483\n#define\tSYS_guarded_open_dprotected_np 484\n#define\tSYS_guarded_write_np 485\n#define\tSYS_guarded_pwrite_np 486\n#define\tSYS_guarded_writev_np 487\n#define\tSYS_renameatx_np   488\n#define\tSYS_mremap_encrypted 489\n#define\tSYS_netagent_trigger 490\n#define\tSYS_stack_snapshot_with_config 491\n#define\tSYS_microstackshot 492\n#define\tSYS_grab_pgo_data  493\n#define\tSYS_persona        494\n\t\t\t/* 495  */\n#define\tSYS_mach_eventlink_signal 496\n#define\tSYS_mach_eventlink_wait_until 497\n#define\tSYS_mach_eventlink_signal_wait_until 498\n#define\tSYS_work_interval_ctl 499\n#define\tSYS_getentropy     500\n#define\tSYS_necp_open      501\n#define\tSYS_necp_client_action 502\n#define\tSYS___nexus_open   503\n#define\tSYS___nexus_register 504\n#define\tSYS___nexus_deregister 505\n#define\tSYS___nexus_create 506\n#define\tSYS___nexus_destroy 507\n#define\tSYS___nexus_get_opt 508\n#define\tSYS___nexus_set_opt 509\n#define\tSYS___channel_open 510\n#define\tSYS___channel_get_info 511\n#define\tSYS___channel_sync 512\n#define\tSYS___channel_get_opt 513\n#define\tSYS___channel_set_opt 514\n#define\tSYS_ulock_wait     515\n#define\tSYS_ulock_wake     516\n#define\tSYS_fclonefileat   517\n#define\tSYS_fs_snapshot    518\n#define\tSYS_register_uexc_handler 519\n#define\tSYS_terminate_with_payload 520\n#define\tSYS_abort_with_payload 521\n#define\tSYS_necp_session_open 522\n#define\tSYS_necp_session_action 523\n#define\tSYS_setattrlistat  524\n#define\tSYS_net_qos_guideline 525\n#define\tSYS_fmount         526\n#define\tSYS_ntp_adjtime    527\n#define\tSYS_ntp_gettime    528\n#define\tSYS_os_fault_with_payload 529\n#define\tSYS_kqueue_workloop_ctl 530\n#define\tSYS___mach_bridge_remote_time 531\n#define\tSYS_coalition_ledger 532\n#define\tSYS_log_data       533\n#define\tSYS_memorystatus_available_memory 534\n#define\tSYS_objc_bp_assist_cfg_np 535\n#define\tSYS_shared_region_map_and_slide_2_np 536\n#define\tSYS_pivot_root     537\n#define\tSYS_task_inspect_for_pid 538\n#define\tSYS_task_read_for_pid 539\n#define\tSYS_preadv         540\n#define\tSYS_pwritev        541\n#define\tSYS_preadv_nocancel 542\n#define\tSYS_pwritev_nocancel 543\n#define\tSYS_ulock_wait2    544\n#define\tSYS_proc_info_extended_id 545\n#define\tSYS_tracker_action 546\n#define\tSYS_debug_syscall_reject 547\n#define\tSYS_MAXSYSCALL\t548\n#define\tSYS_invalid\t63\n\n#endif /* __APPLE_API_PRIVATE */\n#endif /* !_SYS_SYSCALL_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/sysctl.h",
    "content": "/*\n * Copyright (c) 2000-2019 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */\n/*\n * Copyright (c) 1989, 1993\n *\tThe Regents of the University of California.  All rights reserved.\n *\n * This code is derived from software contributed to Berkeley by\n * Mike Karels at Berkeley Software Design, Inc.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *\tThis product includes software developed by the University of\n *\tCalifornia, Berkeley and its contributors.\n * 4. Neither the name of the University nor the names of its contributors\n *    may be used to endorse or promote products derived from this software\n *    without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n *\t@(#)sysctl.h\t8.1 (Berkeley) 6/2/93\n */\n/*\n * NOTICE: This file was modified by SPARTA, Inc. in 2005 to introduce\n * support for mandatory and extensible security protections.  This notice\n * is included in support of clause 2.2 (b) of the Apple Public License,\n * Version 2.0.\n */\n\n#ifndef _SYS_SYSCTL_H_\n#define _SYS_SYSCTL_H_\n\n/*\n * These are for the eproc structure defined below.\n */\n#include <sys/cdefs.h>\n\n#include <sys/appleapiopts.h>\n#include <sys/time.h>\n#include <sys/ucred.h>\n\n#include <sys/proc.h>\n#include <sys/vm.h>\n\n/*\n * Definitions for sysctl call.  The sysctl call uses a hierarchical name\n * for objects that can be examined or modified.  The name is expressed as\n * a sequence of integers.  Like a file path name, the meaning of each\n * component depends on its place in the hierarchy.  The top-level and kern\n * identifiers are defined here, and other identifiers are defined in the\n * respective subsystem header files.\n */\n\n#define CTL_MAXNAME     12      /* largest number of components supported */\n\n/*\n * Each subsystem defined by sysctl defines a list of variables\n * for that subsystem. Each name is either a node with further\n * levels defined below it, or it is a leaf of some particular\n * type given below. Each sysctl level defines a set of name/type\n * pairs to be used by sysctl(1) in manipulating the subsystem.\n *\n * When declaring new sysctl names, use the CTLFLAG_LOCKED flag in the\n * type to indicate that all necessary locking will be handled\n * within the sysctl.\n *\n * Any sysctl defined without CTLFLAG_LOCKED is considered legacy\n * and will be protected by a global mutex.\n *\n * Note:\tThis is not optimal, so it is best to handle locking\n *\t\tyourself, if you are able to do so.  A simple design\n *\t\tpattern for use to avoid in a single function known\n *\t\tto potentially be in the paging path ot doing a DMA\n *\t\tto physical memory in a user space process is:\n *\n *\t\t\tlock\n *\t\t\tperform operation vs. local buffer\n *\t\t\tunlock\n *\t\t\tSYSCTL_OUT(rey, local buffer, length)\n *\n *\t\t...this assumes you are not using a deep call graph\n *\t\tor are unable to pass a local buffer address as a\n *\t\tparameter into your deep call graph.\n *\n *\t\tNote that very large user buffers can fail the wire\n *\t\tif to do so would require more physical pages than\n *\t\tare available (the caller will get an ENOMEM error,\n *\t\tsee sysctl_mem_hold() for details).\n */\nstruct ctlname {\n\tchar    *ctl_name;      /* subsystem name */\n\tint     ctl_type;       /* type of name */\n};\n\n#define CTLTYPE             0xf             /* Mask for the type */\n#define CTLTYPE_NODE        1               /* name is a node */\n#define CTLTYPE_INT         2               /* name describes an integer */\n#define CTLTYPE_STRING      3               /* name describes a string */\n#define CTLTYPE_QUAD        4               /* name describes a 64-bit number */\n#define CTLTYPE_OPAQUE      5               /* name describes a structure */\n#define CTLTYPE_STRUCT      CTLTYPE_OPAQUE  /* name describes a structure */\n\n#define CTLFLAG_RD          0x80000000      /* Allow reads of variable */\n#define CTLFLAG_WR          0x40000000      /* Allow writes to the variable */\n#define CTLFLAG_RW          (CTLFLAG_RD|CTLFLAG_WR)\n#define CTLFLAG_NOLOCK      0x20000000      /* XXX Don't Lock */\n#define CTLFLAG_ANYBODY     0x10000000      /* All users can set this var */\n#define CTLFLAG_SECURE      0x08000000      /* Permit set only if securelevel<=0 */\n#define CTLFLAG_MASKED      0x04000000      /* deprecated variable, do not display */\n#define CTLFLAG_NOAUTO      0x02000000      /* do not auto-register */\n#define CTLFLAG_KERN        0x01000000      /* valid inside the kernel */\n#define CTLFLAG_LOCKED      0x00800000      /* node will handle locking itself */\n#define CTLFLAG_OID2        0x00400000      /* struct sysctl_oid has version info */\n#define CTLFLAG_EXPERIMENT 0x00100000 /* Allows writing w/ the trial experiment entitlement. */\n\n/*\n * USE THIS instead of a hardwired number from the categories below\n * to get dynamically assigned sysctl entries using the linker-set\n * technology. This is the way nearly all new sysctl variables should\n * be implemented.\n *\n * e.g. SYSCTL_INT(_parent, OID_AUTO, name, CTLFLAG_RW, &variable, 0, \"\");\n *\n * Note that linker set technology will automatically register all nodes\n * declared like this on kernel initialization, UNLESS they are defined\n * in I/O-Kit. In this case, you have to call sysctl_register_oid()\n * manually - just like in a KEXT.\n */\n#define OID_AUTO              (-1)\n#define OID_AUTO_START        100 /* conventional */\n\n\n#define SYSCTL_DEF_ENABLED\n\n#ifdef SYSCTL_DEF_ENABLED\n/*\n * Top-level identifiers\n */\n#define CTL_UNSPEC      0               /* unused */\n#define CTL_KERN        1               /* \"high kernel\": proc, limits */\n#define CTL_VM          2               /* virtual memory */\n#define CTL_VFS         3               /* file system, mount type is next */\n#define CTL_NET         4               /* network, see socket.h */\n#define CTL_DEBUG       5               /* debugging parameters */\n#define CTL_HW          6               /* generic cpu/io */\n#define CTL_MACHDEP     7               /* machine dependent */\n#define CTL_USER        8               /* user-level */\n#define CTL_MAXID       9               /* number of valid top-level ids */\n\n#define CTL_NAMES { \\\n\t{ 0, 0 }, \\\n\t{ \"kern\", CTLTYPE_NODE }, \\\n\t{ \"vm\", CTLTYPE_NODE }, \\\n\t{ \"vfs\", CTLTYPE_NODE }, \\\n\t{ \"net\", CTLTYPE_NODE }, \\\n\t{ \"debug\", CTLTYPE_NODE }, \\\n\t{ \"hw\", CTLTYPE_NODE }, \\\n\t{ \"machdep\", CTLTYPE_NODE }, \\\n\t{ \"user\", CTLTYPE_NODE }, \\\n}\n\n/*\n * CTL_KERN identifiers\n */\n#define KERN_OSTYPE              1      /* string: system version */\n#define KERN_OSRELEASE           2      /* string: system release */\n#define KERN_OSREV               3      /* int: system revision */\n#define KERN_VERSION             4      /* string: compile time info */\n#define KERN_MAXVNODES           5      /* int: max vnodes */\n#define KERN_MAXPROC             6      /* int: max processes */\n#define KERN_MAXFILES            7      /* int: max open files */\n#define KERN_ARGMAX              8      /* int: max arguments to exec */\n#define KERN_SECURELVL           9      /* int: system security level */\n#define KERN_HOSTNAME           10      /* string: hostname */\n#define KERN_HOSTID             11      /* int: host identifier */\n#define KERN_CLOCKRATE          12      /* struct: struct clockrate */\n#define KERN_VNODE              13      /* struct: vnode structures */\n#define KERN_PROC               14      /* struct: process entries */\n#define KERN_FILE               15      /* struct: file entries */\n#define KERN_PROF               16      /* node: kernel profiling info */\n#define KERN_POSIX1             17      /* int: POSIX.1 version */\n#define KERN_NGROUPS            18      /* int: # of supplemental group ids */\n#define KERN_JOB_CONTROL        19      /* int: is job control available */\n#define KERN_SAVED_IDS          20      /* int: saved set-user/group-ID */\n#define KERN_BOOTTIME           21      /* struct: time kernel was booted */\n#define KERN_NISDOMAINNAME      22      /* string: YP domain name */\n#define KERN_DOMAINNAME         KERN_NISDOMAINNAME\n#define KERN_MAXPARTITIONS      23      /* int: number of partitions/disk */\n#define KERN_KDEBUG                     24      /* int: kernel trace points */\n#define KERN_UPDATEINTERVAL     25      /* int: update process sleep time */\n#define KERN_OSRELDATE          26      /* int: OS release date */\n#define KERN_NTP_PLL            27      /* node: NTP PLL control */\n#define KERN_BOOTFILE           28      /* string: name of booted kernel */\n#define KERN_MAXFILESPERPROC    29      /* int: max open files per proc */\n#define KERN_MAXPROCPERUID      30      /* int: max processes per uid */\n#define KERN_DUMPDEV            31      /* dev_t: device to dump on */\n#define KERN_IPC                32      /* node: anything related to IPC */\n#define KERN_DUMMY              33      /* unused */\n#define KERN_PS_STRINGS 34      /* int: address of PS_STRINGS */\n#define KERN_USRSTACK32 35      /* int: address of USRSTACK */\n#define KERN_LOGSIGEXIT 36      /* int: do we log sigexit procs? */\n#define KERN_SYMFILE            37      /* string: kernel symbol filename */\n#define KERN_PROCARGS           38\n/* 39 was KERN_PCSAMPLES... now obsolete */\n#define KERN_NETBOOT            40      /* int: are we netbooted? 1=yes,0=no */\n/* 41 was KERN_PANICINFO : panic UI information (deprecated) */\n#define KERN_SYSV               42      /* node: System V IPC information */\n#define KERN_AFFINITY           43      /* xxx */\n#define KERN_TRANSLATE          44      /* xxx */\n#define KERN_CLASSIC            KERN_TRANSLATE  /* XXX backwards compat */\n#define KERN_EXEC               45      /* xxx */\n#define KERN_CLASSICHANDLER     KERN_EXEC /* XXX backwards compatibility */\n#define KERN_AIOMAX             46      /* int: max aio requests */\n#define KERN_AIOPROCMAX         47      /* int: max aio requests per process */\n#define KERN_AIOTHREADS         48      /* int: max aio worker threads */\n#ifdef __APPLE_API_UNSTABLE\n#define KERN_PROCARGS2          49\n#endif /* __APPLE_API_UNSTABLE */\n#define KERN_COREFILE           50      /* string: corefile format string */\n#define KERN_COREDUMP           51      /* int: whether to coredump at all */\n#define KERN_SUGID_COREDUMP     52      /* int: whether to dump SUGID cores */\n#define KERN_PROCDELAYTERM      53      /* int: set/reset current proc for delayed termination during shutdown */\n#define KERN_SHREG_PRIVATIZABLE 54      /* int: can shared regions be privatized ? */\n/* 55 was KERN_PROC_LOW_PRI_IO... now deprecated */\n#define KERN_LOW_PRI_WINDOW     56      /* int: set/reset throttle window - milliseconds */\n#define KERN_LOW_PRI_DELAY      57      /* int: set/reset throttle delay - milliseconds */\n#define KERN_POSIX              58      /* node: posix tunables */\n#define KERN_USRSTACK64         59      /* LP64 user stack query */\n#define KERN_NX_PROTECTION      60      /* int: whether no-execute protection is enabled */\n#define KERN_TFP                61      /* Task for pid settings */\n#define KERN_PROCNAME           62      /* setup process program  name(2*MAXCOMLEN) */\n#define KERN_THALTSTACK         63      /* for compat with older x86 and does nothing */\n#define KERN_SPECULATIVE_READS  64      /* int: whether speculative reads are disabled */\n#define KERN_OSVERSION          65      /* for build number i.e. 9A127 */\n#define KERN_SAFEBOOT           66      /* are we booted safe? */\n/*\t67 was KERN_LCTX (login context) */\n#define KERN_RAGEVNODE          68\n#define KERN_TTY                69      /* node: tty settings */\n#define KERN_CHECKOPENEVT       70      /* spi: check the VOPENEVT flag on vnodes at open time */\n#define KERN_THREADNAME         71      /* set/get thread name */\n#define KERN_MAXID              72      /* number of valid kern ids */\n/*\n * Don't add any more sysctls like this.  Instead, use the SYSCTL_*() macros\n * and OID_AUTO. This will have the added benefit of not having to recompile\n * sysctl(8) to pick up your changes.\n */\n\n\n#if defined(__LP64__)\n#define KERN_USRSTACK KERN_USRSTACK64\n#else\n#define KERN_USRSTACK KERN_USRSTACK32\n#endif\n\n\n/* KERN_RAGEVNODE types */\n#define KERN_RAGE_PROC          1\n#define KERN_RAGE_THREAD        2\n#define KERN_UNRAGE_PROC        3\n#define KERN_UNRAGE_THREAD      4\n\n/* KERN_OPENEVT types */\n#define KERN_OPENEVT_PROC     1\n#define KERN_UNOPENEVT_PROC   2\n\n/* KERN_TFP types */\n#define KERN_TFP_POLICY                 1\n\n/* KERN_TFP_POLICY values . All policies allow task port for self */\n#define KERN_TFP_POLICY_DENY            0       /* Deny Mode: None allowed except privileged */\n#define KERN_TFP_POLICY_DEFAULT         2       /* Default  Mode: related ones allowed and upcall authentication */\n\n/* KERN_KDEBUG types */\n#define KERN_KDEFLAGS         1\n#define KERN_KDDFLAGS         2\n#define KERN_KDENABLE         3\n#define KERN_KDSETBUF         4\n#define KERN_KDGETBUF         5\n#define KERN_KDSETUP          6\n#define KERN_KDREMOVE         7\n#define KERN_KDSETREG         8\n#define KERN_KDGETREG         9\n#define KERN_KDREADTR         10\n#define KERN_KDPIDTR          11\n#define KERN_KDTHRMAP         12\n/* Don't use 13 as it is overloaded with KERN_VNODE */\n#define KERN_KDPIDEX          14\n#define KERN_KDSETRTCDEC      15 /* obsolete */\n#define KERN_KDGETENTROPY     16 /* obsolete */\n#define KERN_KDWRITETR        17\n#define KERN_KDWRITEMAP       18\n#define KERN_KDTEST           19\n/* 20 unused */\n#define KERN_KDREADCURTHRMAP  21\n#define KERN_KDSET_TYPEFILTER 22\n#define KERN_KDBUFWAIT        23\n#define KERN_KDCPUMAP         24\n#define KERN_KDCPUMAP_EXT     25\n/* 25 - 27 unused */\n#define KERN_KDWRITETR_V3     28\n\n#define CTL_KERN_NAMES { \\\n\t{ 0, 0 }, \\\n\t{ \"ostype\", CTLTYPE_STRING }, \\\n\t{ \"osrelease\", CTLTYPE_STRING }, \\\n\t{ \"osrevision\", CTLTYPE_INT }, \\\n\t{ \"version\", CTLTYPE_STRING }, \\\n\t{ \"maxvnodes\", CTLTYPE_INT }, \\\n\t{ \"maxproc\", CTLTYPE_INT }, \\\n\t{ \"maxfiles\", CTLTYPE_INT }, \\\n\t{ \"argmax\", CTLTYPE_INT }, \\\n\t{ \"securelevel\", CTLTYPE_INT }, \\\n\t{ \"hostname\", CTLTYPE_STRING }, \\\n\t{ \"hostid\", CTLTYPE_INT }, \\\n\t{ \"clockrate\", CTLTYPE_STRUCT }, \\\n\t{ \"vnode\", CTLTYPE_STRUCT }, \\\n\t{ \"proc\", CTLTYPE_STRUCT }, \\\n\t{ \"file\", CTLTYPE_STRUCT }, \\\n\t{ \"profiling\", CTLTYPE_NODE }, \\\n\t{ \"posix1version\", CTLTYPE_INT }, \\\n\t{ \"ngroups\", CTLTYPE_INT }, \\\n\t{ \"job_control\", CTLTYPE_INT }, \\\n\t{ \"saved_ids\", CTLTYPE_INT }, \\\n\t{ \"boottime\", CTLTYPE_STRUCT }, \\\n\t{ \"nisdomainname\", CTLTYPE_STRING }, \\\n\t{ \"maxpartitions\", CTLTYPE_INT }, \\\n\t{ \"kdebug\", CTLTYPE_INT }, \\\n\t{ \"update\", CTLTYPE_INT }, \\\n\t{ \"osreldate\", CTLTYPE_INT }, \\\n\t{ \"ntp_pll\", CTLTYPE_NODE }, \\\n\t{ \"bootfile\", CTLTYPE_STRING }, \\\n\t{ \"maxfilesperproc\", CTLTYPE_INT }, \\\n\t{ \"maxprocperuid\", CTLTYPE_INT }, \\\n\t{ \"dumpdev\", CTLTYPE_STRUCT }, /* we lie; don't print as int */ \\\n\t{ \"ipc\", CTLTYPE_NODE }, \\\n\t{ \"dummy\", CTLTYPE_INT }, \\\n\t{ \"dummy\", CTLTYPE_INT }, \\\n\t{ \"usrstack\", CTLTYPE_INT }, \\\n\t{ \"logsigexit\", CTLTYPE_INT }, \\\n\t{ \"symfile\",CTLTYPE_STRING },\\\n\t{ \"procargs\",CTLTYPE_STRUCT },\\\n\t{ \"dummy\", CTLTYPE_INT },               /* deprecated pcsamples */ \\\n\t{ \"netboot\", CTLTYPE_INT }, \\\n\t{ \"dummy\", CTLTYPE_INT },               /* deprecated: panicinfo */ \\\n\t{ \"sysv\", CTLTYPE_NODE }, \\\n\t{ \"dummy\", CTLTYPE_INT }, \\\n\t{ \"dummy\", CTLTYPE_INT }, \\\n\t{ \"exec\", CTLTYPE_NODE }, \\\n\t{ \"aiomax\", CTLTYPE_INT }, \\\n\t{ \"aioprocmax\", CTLTYPE_INT }, \\\n\t{ \"aiothreads\", CTLTYPE_INT }, \\\n\t{ \"procargs2\",CTLTYPE_STRUCT }, \\\n\t{ \"corefile\",CTLTYPE_STRING }, \\\n\t{ \"coredump\", CTLTYPE_INT }, \\\n\t{ \"sugid_coredump\", CTLTYPE_INT }, \\\n\t{ \"delayterm\", CTLTYPE_INT }, \\\n\t{ \"shreg_private\", CTLTYPE_INT }, \\\n\t{ \"proc_low_pri_io\", CTLTYPE_INT }, \\\n\t{ \"low_pri_window\", CTLTYPE_INT }, \\\n\t{ \"low_pri_delay\", CTLTYPE_INT }, \\\n\t{ \"posix\", CTLTYPE_NODE }, \\\n\t{ \"usrstack64\", CTLTYPE_QUAD }, \\\n\t{ \"nx\", CTLTYPE_INT }, \\\n\t{ \"tfp\", CTLTYPE_NODE }, \\\n\t{ \"procname\", CTLTYPE_STRING }, \\\n\t{ \"threadsigaltstack\", CTLTYPE_INT }, \\\n\t{ \"speculative_reads_disabled\", CTLTYPE_INT }, \\\n\t{ \"osversion\", CTLTYPE_STRING }, \\\n\t{ \"safeboot\", CTLTYPE_INT }, \\\n\t{ \"dummy\", CTLTYPE_INT },               /* deprecated: lctx */ \\\n\t{ \"rage_vnode\", CTLTYPE_INT }, \\\n\t{ \"tty\", CTLTYPE_NODE },        \\\n\t{ \"check_openevt\", CTLTYPE_INT }, \\\n\t{ \"thread_name\", CTLTYPE_STRING } \\\n}\n\n/*\n * CTL_VFS identifiers\n */\n#define CTL_VFS_NAMES { \\\n\t{ \"vfsconf\", CTLTYPE_STRUCT } \\\n}\n\n/*\n * KERN_PROC subtypes\n */\n#define KERN_PROC_ALL           0       /* everything */\n#define KERN_PROC_PID           1       /* by process id */\n#define KERN_PROC_PGRP          2       /* by process group id */\n#define KERN_PROC_SESSION       3       /* by session of pid */\n#define KERN_PROC_TTY           4       /* by controlling tty */\n#define KERN_PROC_UID           5       /* by effective uid */\n#define KERN_PROC_RUID          6       /* by real uid */\n#define KERN_PROC_LCID          7       /* by login context id */\n\n/*\n * KERN_VFSNSPACE subtypes\n */\n#define KERN_VFSNSPACE_HANDLE_PROC              1\n#define KERN_VFSNSPACE_UNHANDLE_PROC    2\n\n/*\n * KERN_PROC subtype ops return arrays of augmented proc structures:\n */\n\nstruct _pcred {\n\tchar    pc_lock[72];            /* opaque content */\n\tstruct  ucred *pc_ucred;        /* Current credentials. */\n\tuid_t   p_ruid;                 /* Real user id. */\n\tuid_t   p_svuid;                /* Saved effective user id. */\n\tgid_t   p_rgid;                 /* Real group id. */\n\tgid_t   p_svgid;                /* Saved effective group id. */\n\tint     p_refcnt;               /* Number of references. */\n};\n\nstruct _ucred {\n\tint32_t cr_ref;                 /* reference count */\n\tuid_t   cr_uid;                 /* effective user id */\n\tshort   cr_ngroups;             /* number of groups */\n\tgid_t   cr_groups[NGROUPS];     /* groups */\n};\n\nstruct kinfo_proc {\n\tstruct  extern_proc kp_proc;                    /* proc structure */\n\tstruct  eproc {\n\t\tstruct  proc *e_paddr;          /* address of proc */\n\t\tstruct  session *e_sess;        /* session pointer */\n\t\tstruct  _pcred e_pcred;         /* process credentials */\n\t\tstruct  _ucred e_ucred;         /* current credentials */\n\t\tstruct   vmspace e_vm;          /* address space */\n\t\tpid_t   e_ppid;                 /* parent process id */\n\t\tpid_t   e_pgid;                 /* process group id */\n\t\tshort   e_jobc;                 /* job control counter */\n\t\tdev_t   e_tdev;                 /* controlling tty dev */\n\t\tpid_t   e_tpgid;                /* tty process group id */\n\t\tstruct  session *e_tsess;       /* tty session pointer */\n#define WMESGLEN        7\n\t\tchar    e_wmesg[WMESGLEN + 1];    /* wchan message */\n\t\tsegsz_t e_xsize;                /* text size */\n\t\tshort   e_xrssize;              /* text rss */\n\t\tshort   e_xccount;              /* text references */\n\t\tshort   e_xswrss;\n\t\tint32_t e_flag;\n#define EPROC_CTTY      0x01    /* controlling tty vnode active */\n#define EPROC_SLEADER   0x02    /* session leader */\n#define COMAPT_MAXLOGNAME       12\n\t\tchar    e_login[COMAPT_MAXLOGNAME];     /* short setlogin() name */\n\t\tint32_t e_spare[4];\n\t} kp_eproc;\n};\n\n\n\n/*\n * KERN_IPC identifiers\n */\n#define KIPC_MAXSOCKBUF         1       /* int: max size of a socket buffer */\n#define KIPC_SOCKBUF_WASTE      2       /* int: wastage factor in sockbuf */\n#define KIPC_SOMAXCONN          3       /* int: max length of connection q */\n#define KIPC_MAX_LINKHDR        4       /* int: max length of link header */\n#define KIPC_MAX_PROTOHDR       5       /* int: max length of network header */\n#define KIPC_MAX_HDR            6       /* int: max total length of headers */\n#define KIPC_MAX_DATALEN        7       /* int: max length of data? */\n#define KIPC_MBSTAT             8       /* struct: mbuf usage statistics */\n#define KIPC_NMBCLUSTERS        9       /* int: maximum mbuf clusters */\n#define KIPC_SOQLIMITCOMPAT     10      /* int: socket queue limit */\n\n/*\n * CTL_VM identifiers\n */\n#define VM_METER        1               /* struct vmmeter */\n#define VM_LOADAVG      2               /* struct loadavg */\n/*\n * Note: \"3\" was skipped sometime ago and should probably remain unused\n * to avoid any new entry from being accepted by older kernels...\n */\n#define VM_MACHFACTOR   4               /* struct loadavg with mach factor*/\n#define VM_SWAPUSAGE    5               /* total swap usage */\n#define VM_MAXID        6               /* number of valid vm ids */\n\n#define CTL_VM_NAMES { \\\n\t{ 0, 0 }, \\\n\t{ \"vmmeter\", CTLTYPE_STRUCT }, \\\n\t{ \"loadavg\", CTLTYPE_STRUCT }, \\\n\t{ 0, 0 }, /* placeholder for \"3\" (see comment above) */ \\\n\t{ \"dummy\", CTLTYPE_INT }, \\\n\t{ \"swapusage\", CTLTYPE_STRUCT } \\\n}\n\nstruct xsw_usage {\n\tu_int64_t       xsu_total;\n\tu_int64_t       xsu_avail;\n\tu_int64_t       xsu_used;\n\tu_int32_t       xsu_pagesize;\n\tboolean_t       xsu_encrypted;\n};\n\n#ifdef __APPLE_API_PRIVATE\n/* Load average structure.  Use of fixpt_t assume <sys/types.h> in scope. */\n/* XXX perhaps we should protect fixpt_t, and define it here (or discard it) */\nstruct loadavg {\n\tfixpt_t ldavg[3];\n\tlong    fscale;\n};\nextern struct loadavg averunnable;\n#define LSCALE  1000            /* scaling for \"fixed point\" arithmetic */\n\n#endif /* __APPLE_API_PRIVATE */\n\n\n/*\n * CTL_HW identifiers\n */\n#define HW_MACHINE       1              /* string: machine class (deprecated: use HW_PRODUCT) */\n#define HW_MODEL         2              /* string: specific machine model (deprecated: use HW_TARGET) */\n#define HW_NCPU          3              /* int: number of cpus */\n#define HW_BYTEORDER     4              /* int: machine byte order */\n#define HW_PHYSMEM       5              /* int: total memory */\n#define HW_USERMEM       6              /* int: non-kernel memory */\n#define HW_PAGESIZE      7              /* int: software page size */\n#define HW_DISKNAMES     8              /* strings: disk drive names */\n#define HW_DISKSTATS     9              /* struct: diskstats[] */\n#define HW_EPOCH        10              /* int: 0 for Legacy, else NewWorld */\n#define HW_FLOATINGPT   11              /* int: has HW floating point? */\n#define HW_MACHINE_ARCH 12              /* string: machine architecture */\n#define HW_VECTORUNIT   13              /* int: has HW vector unit? */\n#define HW_BUS_FREQ     14              /* int: Bus Frequency */\n#define HW_CPU_FREQ     15              /* int: CPU Frequency */\n#define HW_CACHELINE    16              /* int: Cache Line Size in Bytes */\n#define HW_L1ICACHESIZE 17              /* int: L1 I Cache Size in Bytes */\n#define HW_L1DCACHESIZE 18              /* int: L1 D Cache Size in Bytes */\n#define HW_L2SETTINGS   19              /* int: L2 Cache Settings */\n#define HW_L2CACHESIZE  20              /* int: L2 Cache Size in Bytes */\n#define HW_L3SETTINGS   21              /* int: L3 Cache Settings */\n#define HW_L3CACHESIZE  22              /* int: L3 Cache Size in Bytes */\n#define HW_TB_FREQ      23              /* int: Bus Frequency */\n#define HW_MEMSIZE      24              /* uint64_t: physical ram size */\n#define HW_AVAILCPU     25              /* int: number of available CPUs */\n#define HW_TARGET       26              /* string: model identifier */\n#define HW_PRODUCT      27              /* string: product identifier */\n#define HW_MAXID        28              /* number of valid hw ids */\n\n#define CTL_HW_NAMES { \\\n\t{ 0, 0 }, \\\n\t{ \"machine\", CTLTYPE_STRING },          /* Deprecated: use hw.product */ \\\n\t{ \"model\", CTLTYPE_STRING },            /* Deprecated: use hw.target */ \\\n\t{ \"ncpu\", CTLTYPE_INT }, \\\n\t{ \"byteorder\", CTLTYPE_INT }, \\\n\t{ \"physmem\", CTLTYPE_INT }, \\\n\t{ \"usermem\", CTLTYPE_INT }, \\\n\t{ \"pagesize\", CTLTYPE_INT }, \\\n\t{ \"disknames\", CTLTYPE_STRUCT }, \\\n\t{ \"diskstats\", CTLTYPE_STRUCT }, \\\n\t{ \"epoch\", CTLTYPE_INT }, \\\n\t{ \"floatingpoint\", CTLTYPE_INT }, \\\n\t{ \"machinearch\", CTLTYPE_STRING }, \\\n\t{ \"vectorunit\", CTLTYPE_INT }, \\\n\t{ \"busfrequency\", CTLTYPE_INT }, \\\n\t{ \"cpufrequency\", CTLTYPE_INT }, \\\n\t{ \"cachelinesize\", CTLTYPE_INT }, \\\n\t{ \"l1icachesize\", CTLTYPE_INT }, \\\n\t{ \"l1dcachesize\", CTLTYPE_INT }, \\\n\t{ \"l2settings\", CTLTYPE_INT }, \\\n\t{ \"l2cachesize\", CTLTYPE_INT }, \\\n\t{ \"l3settings\", CTLTYPE_INT }, \\\n\t{ \"l3cachesize\", CTLTYPE_INT }, \\\n\t{ \"tbfrequency\", CTLTYPE_INT }, \\\n\t{ \"memsize\", CTLTYPE_QUAD }, \\\n\t{ \"availcpu\", CTLTYPE_INT }, \\\n\t{ \"target\", CTLTYPE_STRING }, \\\n\t{ \"product\", CTLTYPE_STRING }, \\\n}\n\n/*\n * XXX This information should be moved to the man page.\n *\n * These are the support HW selectors for sysctlbyname.  Parameters that are byte counts or frequencies are 64 bit numbers.\n * All other parameters are 32 bit numbers.\n *\n *   hw.memsize                - The number of bytes of physical memory in the system.\n *\n *   hw.ncpu                   - The maximum number of processors that could be available this boot.\n *                               Use this value for sizing of static per processor arrays; i.e. processor load statistics.\n *\n *   hw.activecpu              - The number of processors currently available for executing threads.\n *                               Use this number to determine the number threads to create in SMP aware applications.\n *                               This number can change when power management modes are changed.\n *\n *   hw.physicalcpu            - The number of physical processors available in the current power management mode.\n *   hw.physicalcpu_max        - The maximum number of physical processors that could be available this boot\n *\n *   hw.logicalcpu             - The number of logical processors available in the current power management mode.\n *   hw.logicalcpu_max         - The maximum number of logical processors that could be available this boot\n *\n *   hw.tbfrequency            - This gives the time base frequency used by the OS and is the basis of all timing services.\n *                               In general is is better to use mach's or higher level timing services, but this value\n *                               is needed to convert the PPC Time Base registers to real time.\n *\n *   hw.cpufrequency           - These values provide the current, min and max cpu frequency.  The min and max are for\n *   hw.cpufrequency_max       - all power management modes.  The current frequency is the max frequency in the current mode.\n *   hw.cpufrequency_min       - All frequencies are in Hz.\n *\n *   hw.busfrequency           - These values provide the current, min and max bus frequency.  The min and max are for\n *   hw.busfrequency_max       - all power management modes.  The current frequency is the max frequency in the current mode.\n *   hw.busfrequency_min       - All frequencies are in Hz.\n *\n *   hw.cputype                - These values provide the mach-o cpu type and subtype.  A complete list is in <mach/machine.h>\n *   hw.cpusubtype             - These values should be used to determine what processor family the running cpu is from so that\n *                               the best binary can be chosen, or the best dynamic code generated.  They should not be used\n *                               to determine if a given processor feature is available.\n *   hw.cputhreadtype          - This value will be present if the processor supports threads.  Like hw.cpusubtype this selector\n *                               should not be used to infer features, and only used to name the processors thread architecture.\n *                               The values are defined in <mach/machine.h>\n *\n *   hw.byteorder              - Gives the byte order of the processor.  4321 for big endian, 1234 for little.\n *\n *   hw.pagesize               - Gives the size in bytes of the pages used by the processor and VM system.\n *\n *   hw.cachelinesize          - Gives the size in bytes of the processor's cache lines.\n *                               This value should be use to control the strides of loops that use cache control instructions\n *                               like dcbz, dcbt or dcbst.\n *\n *   hw.l1dcachesize           - These values provide the size in bytes of the L1, L2 and L3 caches.  If a cache is not present\n *   hw.l1icachesize           - then the selector will return and error.\n *   hw.l2cachesize            -\n *   hw.l3cachesize            -\n *\n *   hw.nperflevels            - Number of core types in the system. See the parameters below, which can be used to get\n *                             - information associated with a specific perf level.\n *\n *   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.\n *   perflevel 0 always refers to the highest performance core type in the system.\n *\n *   hw.perflevelN.physicalcpu      - The number of physical processors available in the current power management mode.\n *   hw.perflevelN.physicalcpumax   - The maximum number of physical processors that could be available this boot.\n *   hw.perflevelN.logicalcpu       - The number of logical processors available in the current power management mode.\n *   hw.perflevelN.logicalcpumax    - The maximum number of logical processors that could be available this boot.\n *\n *   hw.perflevelN.l1dcachesize     - These values provide the size in bytes of the L1, L2 and L3 caches.  If a cache is not present\n *   hw.perflevelN.l1icachesize     - then the selector will return and error.\n *   hw.perflevelN.l2cachesize      -\n *   hw.perflevelN.l3cachesize      -\n *\n *   hw.perflevelN.cpusperl2        - These values provide the number of CPUs of the same type that share L2 and L3 caches.\n *   hw.perflevelN.cpusperl3        - If a cache is not present then the selector will return and error.\n *\n *   hw.perflevelN.l2perflevels     - These values provide a bitmap, where bit  number of CPUs of the same type that share L2 and L3 caches.\n *   hw.perflevelN.l3perflevels     - If a cache is not present then the selector will return and error.\n *\n *   hw.packages               - Gives the number of processor packages.\n *\n * These are the selectors for optional processor features for specific processors.  Selectors that return errors are not support\n * on the system.  Supported features will return 1 if they are recommended or 0 if they are supported but are not expected to help .\n * performance.  Future versions of these selectors may return larger values as necessary so it is best to test for non zero.\n *\n * For PowerPC:\n *\n *   hw.optional.floatingpoint - Floating Point Instructions\n *   hw.optional.altivec       - AltiVec Instructions\n *   hw.optional.graphicsops   - Graphics Operations\n *   hw.optional.64bitops      - 64-bit Instructions\n *   hw.optional.fsqrt         - HW Floating Point Square Root Instruction\n *   hw.optional.stfiwx        - Store Floating Point as Integer Word Indexed Instructions\n *   hw.optional.dcba          - Data Cache Block Allocate Instruction\n *   hw.optional.datastreams   - Data Streams Instructions\n *   hw.optional.dcbtstreams   - Data Cache Block Touch Steams Instruction Form\n *\n * For x86 Architecture:\n *\n *   hw.optional.floatingpoint     - Floating Point Instructions\n *   hw.optional.mmx               - Original MMX vector instructions\n *   hw.optional.sse               - Streaming SIMD Extensions\n *   hw.optional.sse2              - Streaming SIMD Extensions 2\n *   hw.optional.sse3              - Streaming SIMD Extensions 3\n *   hw.optional.supplementalsse3  - Supplemental Streaming SIMD Extensions 3\n *   hw.optional.x86_64            - 64-bit support\n */\n\n\n/*\n * CTL_USER definitions\n */\n#define USER_CS_PATH             1      /* string: _CS_PATH */\n#define USER_BC_BASE_MAX         2      /* int: BC_BASE_MAX */\n#define USER_BC_DIM_MAX          3      /* int: BC_DIM_MAX */\n#define USER_BC_SCALE_MAX        4      /* int: BC_SCALE_MAX */\n#define USER_BC_STRING_MAX       5      /* int: BC_STRING_MAX */\n#define USER_COLL_WEIGHTS_MAX    6      /* int: COLL_WEIGHTS_MAX */\n#define USER_EXPR_NEST_MAX       7      /* int: EXPR_NEST_MAX */\n#define USER_LINE_MAX            8      /* int: LINE_MAX */\n#define USER_RE_DUP_MAX          9      /* int: RE_DUP_MAX */\n#define USER_POSIX2_VERSION     10      /* int: POSIX2_VERSION */\n#define USER_POSIX2_C_BIND      11      /* int: POSIX2_C_BIND */\n#define USER_POSIX2_C_DEV       12      /* int: POSIX2_C_DEV */\n#define USER_POSIX2_CHAR_TERM   13      /* int: POSIX2_CHAR_TERM */\n#define USER_POSIX2_FORT_DEV    14      /* int: POSIX2_FORT_DEV */\n#define USER_POSIX2_FORT_RUN    15      /* int: POSIX2_FORT_RUN */\n#define USER_POSIX2_LOCALEDEF   16      /* int: POSIX2_LOCALEDEF */\n#define USER_POSIX2_SW_DEV      17      /* int: POSIX2_SW_DEV */\n#define USER_POSIX2_UPE         18      /* int: POSIX2_UPE */\n#define USER_STREAM_MAX         19      /* int: POSIX2_STREAM_MAX */\n#define USER_TZNAME_MAX         20      /* int: POSIX2_TZNAME_MAX */\n#define USER_MAXID              21      /* number of valid user ids */\n\n#define CTL_USER_NAMES { \\\n\t{ 0, 0 }, \\\n\t{ \"cs_path\", CTLTYPE_STRING }, \\\n\t{ \"bc_base_max\", CTLTYPE_INT }, \\\n\t{ \"bc_dim_max\", CTLTYPE_INT }, \\\n\t{ \"bc_scale_max\", CTLTYPE_INT }, \\\n\t{ \"bc_string_max\", CTLTYPE_INT }, \\\n\t{ \"coll_weights_max\", CTLTYPE_INT }, \\\n\t{ \"expr_nest_max\", CTLTYPE_INT }, \\\n\t{ \"line_max\", CTLTYPE_INT }, \\\n\t{ \"re_dup_max\", CTLTYPE_INT }, \\\n\t{ \"posix2_version\", CTLTYPE_INT }, \\\n\t{ \"posix2_c_bind\", CTLTYPE_INT }, \\\n\t{ \"posix2_c_dev\", CTLTYPE_INT }, \\\n\t{ \"posix2_char_term\", CTLTYPE_INT }, \\\n\t{ \"posix2_fort_dev\", CTLTYPE_INT }, \\\n\t{ \"posix2_fort_run\", CTLTYPE_INT }, \\\n\t{ \"posix2_localedef\", CTLTYPE_INT }, \\\n\t{ \"posix2_sw_dev\", CTLTYPE_INT }, \\\n\t{ \"posix2_upe\", CTLTYPE_INT }, \\\n\t{ \"stream_max\", CTLTYPE_INT }, \\\n\t{ \"tzname_max\", CTLTYPE_INT } \\\n}\n\n\n\n/*\n * CTL_DEBUG definitions\n *\n * Second level identifier specifies which debug variable.\n * Third level identifier specifies which stucture component.\n */\n#define CTL_DEBUG_NAME          0       /* string: variable name */\n#define CTL_DEBUG_VALUE         1       /* int: variable value */\n#define CTL_DEBUG_MAXID         20\n\n\n#if (CTL_MAXID != 9) || (KERN_MAXID != 72) || (VM_MAXID != 6) || (HW_MAXID != 28) || (USER_MAXID != 21) || (CTL_DEBUG_MAXID != 20)\n#error Use the SYSCTL_*() macros and OID_AUTO instead!\n#endif\n\n\n\n__BEGIN_DECLS\nint     sysctl(int *, u_int, void *, size_t *, void *, size_t);\nint     sysctlbyname(const char *, void *, size_t *, void *, size_t);\nint     sysctlnametomib(const char *, int *, size_t *);\n__END_DECLS\n\n\n\n#endif /* SYSCTL_DEF_ENABLED */\n\n\n#endif  /* !_SYS_SYSCTL_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/syslimits.h",
    "content": "/*\n * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/*\t$NetBSD: syslimits.h,v 1.15 1997/06/25 00:48:09 lukem Exp $\t*/\n\n/*\n * Copyright (c) 1988, 1993\n *\tThe Regents of the University of California.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *\tThis product includes software developed by the University of\n *\tCalifornia, Berkeley and its contributors.\n * 4. Neither the name of the University nor the names of its contributors\n *    may be used to endorse or promote products derived from this software\n *    without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n *\t@(#)syslimits.h\t8.1 (Berkeley) 6/2/93\n */\n\n#ifndef _SYS_SYSLIMITS_H_\n#define _SYS_SYSLIMITS_H_\n\n#include <sys/cdefs.h>\n\n#if !defined(_ANSI_SOURCE)\n\n/* max bytes for an exec function */\n#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__)\n#define ARG_MAX           (1024 * 1024)\n#else\n#define ARG_MAX            (256 * 1024)\n#endif\n\n/*\n * Note: CHILD_MAX *must* be less than hard_maxproc, which is set at\n * compile time; you *cannot* set it higher than the hard limit!!\n */\n\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n#define CHILD_MAX                  266  /* max simultaneous processes */\n#define GID_MAX            2147483647U  /* max value for a gid_t (2^31-2) */\n#endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */\n#define LINK_MAX                32767   /* max file link count */\n#define MAX_CANON                1024   /* max bytes in term canon input line */\n#define MAX_INPUT                1024   /* max bytes in terminal input */\n#define NAME_MAX                  255   /* max bytes in a file name */\n#define NGROUPS_MAX                16   /* max supplemental group id's */\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n#define UID_MAX            2147483647U  /* max value for a uid_t (2^31-2) */\n\n#define OPEN_MAX                10240   /* max open files per process - todo, make a config option? */\n\n#endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */\n#define PATH_MAX                 1024   /* max bytes in pathname */\n#define PIPE_BUF                  512   /* max bytes for atomic pipe writes */\n\n#define BC_BASE_MAX                99   /* max ibase/obase values in bc(1) */\n#define BC_DIM_MAX               2048   /* max array elements in bc(1) */\n#define BC_SCALE_MAX               99   /* max scale value in bc(1) */\n#define BC_STRING_MAX            1000   /* max const string length in bc(1) */\n#define CHARCLASS_NAME_MAX         14   /* max character class name size */\n#define COLL_WEIGHTS_MAX            2   /* max weights for order keyword */\n#define EQUIV_CLASS_MAX             2\n#define EXPR_NEST_MAX              32   /* max expressions nested in expr(1) */\n#define LINE_MAX                 2048   /* max bytes in an input line */\n#define RE_DUP_MAX                255   /* max RE's in interval notation */\n\n#if __DARWIN_UNIX03\n#define NZERO                      20   /* default priority [XSI] */\n                                        /* = ((PRIO_MAX - PRIO_MIN) / 2) + 1 */\n                                        /* range: 0 - 39 [(2 * NZERO) - 1] */\n                                        /* 0 is not actually used */\n#else /* !__DARWIN_UNIX03 */\n#define NZERO                       0   /* default priority */\n                                        /* range: -20 - 20 */\n                                        /* (PRIO_MIN - PRIO_MAX) */\n#endif /* __DARWIN_UNIX03 */\n#endif /* !_ANSI_SOURCE */\n\n#endif /* !_SYS_SYSLIMITS_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/syslog.h",
    "content": "/*\n * Copyright (c) 2000-2005 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */\n/*-\n * Copyright (c) 1982, 1986, 1988, 1993\n *\tThe Regents of the University of California.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 4. Neither the name of the University nor the names of its contributors\n *    may be used to endorse or promote products derived from this software\n *    without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n *\t@(#)syslog.h\t8.1 (Berkeley) 6/2/93\n * $FreeBSD: src/sys/sys/syslog.h,v 1.27.2.1.4.1 2010/06/14 02:09:06 kensmith Exp $\n */\n\n#ifndef _SYS_SYSLOG_H_\n#define _SYS_SYSLOG_H_\n\n#include <sys/appleapiopts.h>\n#include <sys/cdefs.h>\n\n#define _PATH_LOG       \"/var/run/syslog\"\n\n/*\n * priorities/facilities are encoded into a single 32-bit quantity, where the\n * bottom 3 bits are the priority (0-7) and the top 28 bits are the facility\n * (0-big number).  Both the priorities and the facilities map roughly\n * one-to-one to strings in the syslogd(8) source code.  This mapping is\n * included in this file.\n *\n * priorities (these are ordered)\n */\n#define LOG_EMERG       0       /* system is unusable */\n#define LOG_ALERT       1       /* action must be taken immediately */\n#define LOG_CRIT        2       /* critical conditions */\n#define LOG_ERR         3       /* error conditions */\n#define LOG_WARNING     4       /* warning conditions */\n#define LOG_NOTICE      5       /* normal but significant condition */\n#define LOG_INFO        6       /* informational */\n#define LOG_DEBUG       7       /* debug-level messages */\n\n#define LOG_PRIMASK     0x07    /* mask to extract priority part (internal) */\n/* extract priority */\n#define LOG_PRI(p)      ((p) & LOG_PRIMASK)\n#define LOG_MAKEPRI(fac, pri)   ((fac) | (pri))\n\n#ifdef SYSLOG_NAMES\n#define INTERNAL_NOPRI  0x10    /* the \"no priority\" priority */\n/* mark \"facility\" */\n#define INTERNAL_MARK   LOG_MAKEPRI((LOG_NFACILITIES<<3), 0)\ntypedef struct _code {\n\tconst char      *c_name;\n\tint             c_val;\n} CODE;\n\nCODE prioritynames[] = {\n\t{ \"alert\", LOG_ALERT, },\n\t{ \"crit\", LOG_CRIT, },\n\t{ \"debug\", LOG_DEBUG, },\n\t{ \"emerg\", LOG_EMERG, },\n\t{ \"err\", LOG_ERR, },\n\t{ \"error\", LOG_ERR, },                  /* DEPRECATED */\n\t{ \"info\", LOG_INFO, },\n\t{ \"none\", INTERNAL_NOPRI, },            /* INTERNAL */\n\t{ \"notice\", LOG_NOTICE, },\n\t{ \"panic\", LOG_EMERG, },                /* DEPRECATED */\n\t{ \"warn\", LOG_WARNING, },               /* DEPRECATED */\n\t{ \"warning\", LOG_WARNING, },\n\t{ NULL, -1, }\n};\n#endif\n\n/* facility codes */\n#define LOG_KERN        (0<<3)  /* kernel messages */\n#define LOG_USER        (1<<3)  /* random user-level messages */\n#define LOG_MAIL        (2<<3)  /* mail system */\n#define LOG_DAEMON      (3<<3)  /* system daemons */\n#define LOG_AUTH        (4<<3)  /* authorization messages */\n#define LOG_SYSLOG      (5<<3)  /* messages generated internally by syslogd */\n#define LOG_LPR         (6<<3)  /* line printer subsystem */\n#define LOG_NEWS        (7<<3)  /* network news subsystem */\n#define LOG_UUCP        (8<<3)  /* UUCP subsystem */\n#define LOG_CRON        (9<<3)  /* clock daemon */\n#define LOG_AUTHPRIV    (10<<3) /* authorization messages (private) */\n/* Facility #10 clashes in DEC UNIX, where */\n/* it's defined as LOG_MEGASAFE for AdvFS  */\n/* event logging.                          */\n#define LOG_FTP         (11<<3) /* ftp daemon */\n//#define\tLOG_NTP\t\t(12<<3)\t/* NTP subsystem */\n//#define\tLOG_SECURITY\t(13<<3) /* security subsystems (firewalling, etc.) */\n//#define\tLOG_CONSOLE\t(14<<3) /* /dev/console output */\n#define LOG_NETINFO     (12<<3) /* NetInfo */\n#define LOG_REMOTEAUTH  (13<<3) /* remote authentication/authorization */\n#define LOG_INSTALL     (14<<3) /* installer subsystem */\n#define LOG_RAS         (15<<3) /* Remote Access Service (VPN / PPP) */\n\n/* other codes through 15 reserved for system use */\n#define LOG_LOCAL0      (16<<3) /* reserved for local use */\n#define LOG_LOCAL1      (17<<3) /* reserved for local use */\n#define LOG_LOCAL2      (18<<3) /* reserved for local use */\n#define LOG_LOCAL3      (19<<3) /* reserved for local use */\n#define LOG_LOCAL4      (20<<3) /* reserved for local use */\n#define LOG_LOCAL5      (21<<3) /* reserved for local use */\n#define LOG_LOCAL6      (22<<3) /* reserved for local use */\n#define LOG_LOCAL7      (23<<3) /* reserved for local use */\n\n#define LOG_LAUNCHD     (24<<3) /* launchd - general bootstrap daemon */\n\n#define LOG_NFACILITIES 25      /* current number of facilities */\n#define LOG_FACMASK     0x03f8  /* mask to extract facility part */\n/* facility of pri */\n#define LOG_FAC(p)      (((p) & LOG_FACMASK) >> 3)\n\n#ifdef SYSLOG_NAMES\nCODE facilitynames[] = {\n\t{ \"auth\", LOG_AUTH, },\n\t{ \"authpriv\", LOG_AUTHPRIV, },\n\t{ \"cron\", LOG_CRON, },\n\t{ \"daemon\", LOG_DAEMON, },\n\t{ \"ftp\", LOG_FTP, },\n\t{ \"install\", LOG_INSTALL     },\n\t{ \"kern\", LOG_KERN, },\n\t{ \"lpr\", LOG_LPR, },\n\t{ \"mail\", LOG_MAIL, },\n\t{ \"mark\", INTERNAL_MARK, },             /* INTERNAL */\n\t{ \"netinfo\", LOG_NETINFO, },\n\t{ \"ras\", LOG_RAS         },\n\t{ \"remoteauth\", LOG_REMOTEAUTH  },\n\t{ \"news\", LOG_NEWS, },\n\t{ \"security\", LOG_AUTH        },        /* DEPRECATED */\n\t{ \"syslog\", LOG_SYSLOG, },\n\t{ \"user\", LOG_USER, },\n\t{ \"uucp\", LOG_UUCP, },\n\t{ \"local0\", LOG_LOCAL0, },\n\t{ \"local1\", LOG_LOCAL1, },\n\t{ \"local2\", LOG_LOCAL2, },\n\t{ \"local3\", LOG_LOCAL3, },\n\t{ \"local4\", LOG_LOCAL4, },\n\t{ \"local5\", LOG_LOCAL5, },\n\t{ \"local6\", LOG_LOCAL6, },\n\t{ \"local7\", LOG_LOCAL7, },\n\t{ \"launchd\", LOG_LAUNCHD     },\n\t{ NULL, -1, }\n};\n#endif\n\n\n/*\n * arguments to setlogmask.\n */\n#define LOG_MASK(pri)   (1 << (pri))            /* mask for one priority */\n#define LOG_UPTO(pri)   ((1 << ((pri)+1)) - 1)  /* all priorities through pri */\n\n/*\n * Option flags for openlog.\n *\n * LOG_ODELAY no longer does anything.\n * LOG_NDELAY is the inverse of what it used to be.\n */\n#define LOG_PID         0x01    /* log the pid with each message */\n#define LOG_CONS        0x02    /* log on the console if errors in sending */\n#define LOG_ODELAY      0x04    /* delay open until first syslog() (default) */\n#define LOG_NDELAY      0x08    /* don't delay open */\n#define LOG_NOWAIT      0x10    /* don't wait for console forks: DEPRECATED */\n#define LOG_PERROR      0x20    /* log to stderr as well */\n\n\n/*\n * Don't use va_list in the vsyslog() prototype.   Va_list is typedef'd in two\n * places (<machine/varargs.h> and <machine/stdarg.h>), so if we include one\n * of them here we may collide with the utility's includes.  It's unreasonable\n * for utilities to have to include one of them to include syslog.h, so we get\n * __va_list from <sys/_types.h> and use it.\n */\n#include <sys/_types.h>\n\n__BEGIN_DECLS\nvoid    closelog(void);\nvoid    openlog(const char *, int, int);\nint     setlogmask(int);\n#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __DARWIN_C_LEVEL >= __DARWIN_C_FULL\nvoid    syslog(int, const char *, ...) __DARWIN_ALIAS_STARTING(__MAC_10_13, __IPHONE_NA, __DARWIN_EXTSN(syslog)) __printflike(2, 3) __not_tail_called;\n#else\nvoid    syslog(int, const char *, ...) __printflike(2, 3) __not_tail_called;\n#endif\n#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL\nvoid    vsyslog(int, const char *, __darwin_va_list) __printflike(2, 0) __not_tail_called;\n#endif\n__END_DECLS\n\n#endif /* !_SYS_SYSLOG_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/termios.h",
    "content": "/*\n * Copyright (c) 2000-2006 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/* Copyright (c) 1997 Apple Computer, Inc. All Rights Reserved */\n/*\n * Copyright (c) 1988, 1989, 1993, 1994\n *\tThe Regents of the University of California.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *      This product includes software developed by the University of\n *      California, Berkeley and its contributors.\n * 4. Neither the name of the University nor the names of its contributors\n *    may be used to endorse or promote products derived from this software\n *    without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n *\t@(#)termios.h\t8.3 (Berkeley) 3/28/94\n */\n\n#ifndef _SYS_TERMIOS_H_\n#define _SYS_TERMIOS_H_\n\n#include <sys/cdefs.h>\n\n/*\n * Special Control Characters\n *\n * Index into c_cc[] character array.\n *\n *\tName\t     Subscript\tEnabled by\n */\n#define VEOF            0       /* ICANON */\n#define VEOL            1       /* ICANON */\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n#define VEOL2           2       /* ICANON together with IEXTEN */\n#endif\n#define VERASE          3       /* ICANON */\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n#define VWERASE         4       /* ICANON together with IEXTEN */\n#endif\n#define VKILL           5       /* ICANON */\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n#define VREPRINT        6       /* ICANON together with IEXTEN */\n#endif\n/*\t\t\t7\t   spare 1 */\n#define VINTR           8       /* ISIG */\n#define VQUIT           9       /* ISIG */\n#define VSUSP           10      /* ISIG */\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n#define VDSUSP          11      /* ISIG together with IEXTEN */\n#endif\n#define VSTART          12      /* IXON, IXOFF */\n#define VSTOP           13      /* IXON, IXOFF */\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n#define VLNEXT          14      /* IEXTEN */\n#define VDISCARD        15      /* IEXTEN */\n#endif\n#define VMIN            16      /* !ICANON */\n#define VTIME           17      /* !ICANON */\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n#define VSTATUS         18      /* ICANON together with IEXTEN */\n/*\t\t\t19\t   spare 2 */\n#endif\n#define NCCS            20\n\n#include <sys/_types/_posix_vdisable.h>\n\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n#define CCEQ(val, c)    ((c) == (val) ? (val) != _POSIX_VDISABLE : 0)\n#endif\n\n/*\n * Input flags - software input processing\n */\n#define IGNBRK          0x00000001      /* ignore BREAK condition */\n#define BRKINT          0x00000002      /* map BREAK to SIGINTR */\n#define IGNPAR          0x00000004      /* ignore (discard) parity errors */\n#define PARMRK          0x00000008      /* mark parity and framing errors */\n#define INPCK           0x00000010      /* enable checking of parity errors */\n#define ISTRIP          0x00000020      /* strip 8th bit off chars */\n#define INLCR           0x00000040      /* map NL into CR */\n#define IGNCR           0x00000080      /* ignore CR */\n#define ICRNL           0x00000100      /* map CR to NL (ala CRMOD) */\n#define IXON            0x00000200      /* enable output flow control */\n#define IXOFF           0x00000400      /* enable input flow control */\n#define IXANY           0x00000800      /* any char will restart after stop */\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n#define IMAXBEL         0x00002000      /* ring bell on input queue full */\n#define IUTF8           0x00004000      /* maintain state for UTF-8 VERASE */\n#endif  /*(_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */\n\n/*\n * Output flags - software output processing\n */\n#define OPOST           0x00000001      /* enable following output processing */\n#define ONLCR           0x00000002      /* map NL to CR-NL (ala CRMOD) */\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n#define OXTABS          0x00000004      /* expand tabs to spaces */\n#define ONOEOT          0x00000008      /* discard EOT's (^D) on output) */\n#endif  /*(_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */\n/*\n * The following block of features is unimplemented.  Use of these flags in\n * programs will currently result in unexpected behaviour.\n *\n * - Begin unimplemented features\n */\n#define OCRNL           0x00000010      /* map CR to NL on output */\n#define ONOCR           0x00000020      /* no CR output at column 0 */\n#define ONLRET          0x00000040      /* NL performs CR function */\n#define OFILL           0x00000080      /* use fill characters for delay */\n#define NLDLY           0x00000300      /* \\n delay */\n#define TABDLY          0x00000c04      /* horizontal tab delay */\n#define CRDLY           0x00003000      /* \\r delay */\n#define FFDLY           0x00004000      /* form feed delay */\n#define BSDLY           0x00008000      /* \\b delay */\n#define VTDLY           0x00010000      /* vertical tab delay */\n#define OFDEL           0x00020000      /* fill is DEL, else NUL */\n#if !defined(_SYS_IOCTL_COMPAT_H_) || __DARWIN_UNIX03\n/*\n * These manifest constants have the same names as those in the header\n * <sys/ioctl_compat.h>, so you are not permitted to have both definitions\n * in scope simultaneously in the same compilation unit.  Nevertheless,\n * they are required to be in scope when _POSIX_C_SOURCE is requested;\n * this means that including the <sys/ioctl_compat.h> header before this\n * one when _POSIX_C_SOURCE is in scope will result in redefintions.  We\n * attempt to maintain these as the same values so as to avoid this being\n * an outright error in most compilers.\n */\n#define         NL0     0x00000000\n#define         NL1     0x00000100\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n#define         NL2     0x00000200\n#define         NL3     0x00000300\n#endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */\n#define         TAB0    0x00000000\n#define         TAB1    0x00000400\n#define         TAB2    0x00000800\n/* not in sys/ioctl_compat.h, use OXTABS value */\n#define         TAB3    0x00000004\n#define         CR0     0x00000000\n#define         CR1     0x00001000\n#define         CR2     0x00002000\n#define         CR3     0x00003000\n#define         FF0     0x00000000\n#define         FF1     0x00004000\n#define         BS0     0x00000000\n#define         BS1     0x00008000\n#define         VT0     0x00000000\n#define         VT1     0x00010000\n#endif  /* !_SYS_IOCTL_COMPAT_H_ */\n/*\n * + End unimplemented features\n */\n\n/*\n * Control flags - hardware control of terminal\n */\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n#define CIGNORE         0x00000001      /* ignore control flags */\n#endif\n#define CSIZE           0x00000300      /* character size mask */\n#define     CS5             0x00000000      /* 5 bits (pseudo) */\n#define     CS6             0x00000100      /* 6 bits */\n#define     CS7             0x00000200      /* 7 bits */\n#define     CS8             0x00000300      /* 8 bits */\n#define CSTOPB          0x00000400      /* send 2 stop bits */\n#define CREAD           0x00000800      /* enable receiver */\n#define PARENB          0x00001000      /* parity enable */\n#define PARODD          0x00002000      /* odd parity, else even */\n#define HUPCL           0x00004000      /* hang up on last close */\n#define CLOCAL          0x00008000      /* ignore modem status lines */\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n#define CCTS_OFLOW      0x00010000      /* CTS flow control of output */\n#define CRTSCTS         (CCTS_OFLOW | CRTS_IFLOW)\n#define CRTS_IFLOW      0x00020000      /* RTS flow control of input */\n#define CDTR_IFLOW      0x00040000      /* DTR flow control of input */\n#define CDSR_OFLOW      0x00080000      /* DSR flow control of output */\n#define CCAR_OFLOW      0x00100000      /* DCD flow control of output */\n#define MDMBUF          0x00100000      /* old name for CCAR_OFLOW */\n#endif\n\n\n/*\n * \"Local\" flags - dumping ground for other state\n *\n * Warning: some flags in this structure begin with\n * the letter \"I\" and look like they belong in the\n * input flag.\n */\n\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n#define ECHOKE          0x00000001      /* visual erase for line kill */\n#endif  /*(_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */\n#define ECHOE           0x00000002      /* visually erase chars */\n#define ECHOK           0x00000004      /* echo NL after line kill */\n#define ECHO            0x00000008      /* enable echoing */\n#define ECHONL          0x00000010      /* echo NL even if ECHO is off */\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n#define ECHOPRT         0x00000020      /* visual erase mode for hardcopy */\n#define ECHOCTL         0x00000040      /* echo control chars as ^(Char) */\n#endif  /*(_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */\n#define ISIG            0x00000080      /* enable signals INTR, QUIT, [D]SUSP */\n#define ICANON          0x00000100      /* canonicalize input lines */\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n#define ALTWERASE       0x00000200      /* use alternate WERASE algorithm */\n#endif  /*(_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */\n#define IEXTEN          0x00000400      /* enable DISCARD and LNEXT */\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n#define EXTPROC         0x00000800      /* external processing */\n#endif  /*(_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */\n#define TOSTOP          0x00400000      /* stop background jobs from output */\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n#define FLUSHO          0x00800000      /* output being flushed (state) */\n#define NOKERNINFO      0x02000000      /* no kernel output from VSTATUS */\n#define PENDIN          0x20000000      /* XXX retype pending input (state) */\n#endif  /*(_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */\n#define NOFLSH          0x80000000      /* don't flush after interrupt */\n\ntypedef unsigned long   tcflag_t;\ntypedef unsigned char   cc_t;\ntypedef unsigned long   speed_t;\n\nstruct termios {\n\ttcflag_t        c_iflag;        /* input flags */\n\ttcflag_t        c_oflag;        /* output flags */\n\ttcflag_t        c_cflag;        /* control flags */\n\ttcflag_t        c_lflag;        /* local flags */\n\tcc_t            c_cc[NCCS];     /* control chars */\n\tspeed_t         c_ispeed;       /* input speed */\n\tspeed_t         c_ospeed;       /* output speed */\n};\n\n\n/*\n * Commands passed to tcsetattr() for setting the termios structure.\n */\n#define TCSANOW         0               /* make change immediate */\n#define TCSADRAIN       1               /* drain output, then change */\n#define TCSAFLUSH       2               /* drain output, flush input */\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n#define TCSASOFT        0x10            /* flag - don't alter h.w. state */\n#endif\n\n/*\n * Standard speeds\n */\n#define B0      0\n#define B50     50\n#define B75     75\n#define B110    110\n#define B134    134\n#define B150    150\n#define B200    200\n#define B300    300\n#define B600    600\n#define B1200   1200\n#define B1800   1800\n#define B2400   2400\n#define B4800   4800\n#define B9600   9600\n#define B19200  19200\n#define B38400  38400\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n#define B7200   7200\n#define B14400  14400\n#define B28800  28800\n#define B57600  57600\n#define B76800  76800\n#define B115200 115200\n#define B230400 230400\n#define EXTA    19200\n#define EXTB    38400\n#endif  /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */\n\n\n#define TCIFLUSH        1\n#define TCOFLUSH        2\n#define TCIOFLUSH       3\n#define TCOOFF          1\n#define TCOON           2\n#define TCIOFF          3\n#define TCION           4\n\n#include <sys/cdefs.h>\n\n__BEGIN_DECLS\nspeed_t cfgetispeed(const struct termios *);\nspeed_t cfgetospeed(const struct termios *);\nint     cfsetispeed(struct termios *, speed_t);\nint     cfsetospeed(struct termios *, speed_t);\nint     tcgetattr(int, struct termios *);\nint     tcsetattr(int, int, const struct termios *);\nint     tcdrain(int) __DARWIN_ALIAS_C(tcdrain);\nint     tcflow(int, int);\nint     tcflush(int, int);\nint     tcsendbreak(int, int);\n\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\nvoid    cfmakeraw(struct termios *);\nint     cfsetspeed(struct termios *, speed_t);\n#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */\n__END_DECLS\n\n\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n\n/*\n * Include tty ioctl's that aren't just for backwards compatibility\n * with the old tty driver.  These ioctl definitions were previously\n * in <sys/ioctl.h>.\n */\n#include <sys/ttycom.h>\n#endif\n\n/*\n * END OF PROTECTED INCLUDE.\n */\n#endif /* !_SYS_TERMIOS_H_ */\n\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n#include <sys/ttydefaults.h>\n#endif\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/time.h",
    "content": "/*\n * Copyright (c) 2000-2006 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */\n/*\n * Copyright (c) 1982, 1986, 1993\n *\tThe Regents of the University of California.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *\tThis product includes software developed by the University of\n *\tCalifornia, Berkeley and its contributors.\n * 4. Neither the name of the University nor the names of its contributors\n *    may be used to endorse or promote products derived from this software\n *    without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n *\t@(#)time.h\t8.2 (Berkeley) 7/10/94\n */\n\n#ifndef _SYS_TIME_H_\n#define _SYS_TIME_H_\n\n#include <sys/cdefs.h>\n#include <sys/_types.h>\n#include <Availability.h>\n\n/*\n * [XSI] The fd_set type shall be defined as described in <sys/select.h>.\n * The timespec structure shall be defined as described in <time.h>\n */\n#include <sys/_types/_fd_def.h>\n#include <sys/_types/_timespec.h>\n#include <sys/_types/_timeval.h>\n\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n#include <sys/_types/_timeval64.h>\n#endif /* !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) */\n\n\n#include <sys/_types/_time_t.h>\n#include <sys/_types/_suseconds_t.h>\n\n/*\n * Structure used as a parameter by getitimer(2) and setitimer(2) system\n * calls.\n */\nstruct  itimerval {\n\tstruct  timeval it_interval;    /* timer interval */\n\tstruct  timeval it_value;       /* current value */\n};\n\n/*\n * Names of the interval timers, and structure\n * defining a timer setting.\n */\n#define ITIMER_REAL     0\n#define ITIMER_VIRTUAL  1\n#define ITIMER_PROF     2\n\n/*\n * Select uses bit masks of file descriptors in longs.  These macros\n * manipulate such bit fields (the filesystem macros use chars).  The\n * extra protection here is to permit application redefinition above\n * the default size.\n */\n#include <sys/_types/_fd_setsize.h>\n#include <sys/_types/_fd_set.h>\n#include <sys/_types/_fd_clr.h>\n#include <sys/_types/_fd_isset.h>\n#include <sys/_types/_fd_zero.h>\n\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n\n#include <sys/_types/_fd_copy.h>\n\n#define TIMEVAL_TO_TIMESPEC(tv, ts) {                                   \\\n\t(ts)->tv_sec = (tv)->tv_sec;                                    \\\n\t(ts)->tv_nsec = (tv)->tv_usec * 1000;                           \\\n}\n#define TIMESPEC_TO_TIMEVAL(tv, ts) {                                   \\\n\t(tv)->tv_sec = (ts)->tv_sec;                                    \\\n\t(tv)->tv_usec = (ts)->tv_nsec / 1000;                           \\\n}\n\nstruct timezone {\n\tint     tz_minuteswest; /* minutes west of Greenwich */\n\tint     tz_dsttime;     /* type of dst correction */\n};\n#define DST_NONE        0       /* not on dst */\n#define DST_USA         1       /* USA style dst */\n#define DST_AUST        2       /* Australian style dst */\n#define DST_WET         3       /* Western European dst */\n#define DST_MET         4       /* Middle European dst */\n#define DST_EET         5       /* Eastern European dst */\n#define DST_CAN         6       /* Canada */\n\n/* Operations on timevals. */\n#define timerclear(tvp)         (tvp)->tv_sec = (tvp)->tv_usec = 0\n#define timerisset(tvp)         ((tvp)->tv_sec || (tvp)->tv_usec)\n#define timercmp(tvp, uvp, cmp)                                         \\\n\t(((tvp)->tv_sec == (uvp)->tv_sec) ?                             \\\n\t    ((tvp)->tv_usec cmp (uvp)->tv_usec) :                       \\\n\t    ((tvp)->tv_sec cmp (uvp)->tv_sec))\n#define timeradd(tvp, uvp, vvp)                                         \\\n\tdo {                                                            \\\n\t        (vvp)->tv_sec = (tvp)->tv_sec + (uvp)->tv_sec;          \\\n\t        (vvp)->tv_usec = (tvp)->tv_usec + (uvp)->tv_usec;       \\\n\t        if ((vvp)->tv_usec >= 1000000) {                        \\\n\t                (vvp)->tv_sec++;                                \\\n\t                (vvp)->tv_usec -= 1000000;                      \\\n\t        }                                                       \\\n\t} while (0)\n#define timersub(tvp, uvp, vvp)                                         \\\n\tdo {                                                            \\\n\t        (vvp)->tv_sec = (tvp)->tv_sec - (uvp)->tv_sec;          \\\n\t        (vvp)->tv_usec = (tvp)->tv_usec - (uvp)->tv_usec;       \\\n\t        if ((vvp)->tv_usec < 0) {                               \\\n\t                (vvp)->tv_sec--;                                \\\n\t                (vvp)->tv_usec += 1000000;                      \\\n\t        }                                                       \\\n\t} while (0)\n\n#define timevalcmp(l, r, cmp)   timercmp(l, r, cmp) /* freebsd */\n\n/*\n * Getkerninfo clock information structure\n */\nstruct clockinfo {\n\tint     hz;             /* clock frequency */\n\tint     tick;           /* micro-seconds per hz tick */\n\tint     tickadj;        /* clock skew rate for adjtime() */\n\tint     stathz;         /* statistics clock frequency */\n\tint     profhz;         /* profiling clock frequency */\n};\n#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */\n\n\n\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n#include <time.h>\n#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */\n\n__BEGIN_DECLS\n\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\nint     adjtime(const struct timeval *, struct timeval *);\nint     futimes(int, const struct timeval *);\nint     lutimes(const char *, const struct timeval *) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);\nint     settimeofday(const struct timeval *, const struct timezone *);\n#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */\n\nint     getitimer(int, struct itimerval *);\nint     gettimeofday(struct timeval * __restrict, void * __restrict);\n\n#include <sys/_select.h>        /* select() prototype */\n\nint     setitimer(int, const struct itimerval * __restrict,\n    struct itimerval * __restrict);\nint     utimes(const char *, const struct timeval *);\n\n__END_DECLS\n\n\n#endif /* !_SYS_TIME_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/timeb.h",
    "content": "/*\n * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */\n/*-\n * Copyright (c) 1991, 1993\n *\tThe Regents of the University of California.  All rights reserved.\n * (c) UNIX System Laboratories, Inc.\n * All or some portions of this file are derived from material licensed\n * to the University of California by American Telephone and Telegraph\n * Co. or Unix System Laboratories, Inc. and are reproduced herein with\n * the permission of UNIX System Laboratories, Inc.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *\tThis product includes software developed by the University of\n *\tCalifornia, Berkeley and its contributors.\n * 4. Neither the name of the University nor the names of its contributors\n *    may be used to endorse or promote products derived from this software\n *    without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n *\t@(#)timeb.h\t8.2 (Berkeley) 1/21/94\n */\n\n#ifndef _SYS_TIMEB_H_\n#define _SYS_TIMEB_H_\n\n#include <sys/appleapiopts.h>\n#include <sys/cdefs.h>\n#include <sys/_types.h>\n\n/* [XSI] The time_t type shall be defined as described in <sys/types.h> */\n#include <sys/_types/_time_t.h>\n\n/*\n * [XSI] Structure whose address is passed as the first parameter to ftime()\n */\nstruct timeb {\n\ttime_t          time;           /* [XSI] Seconds since the Epoch */\n\tunsigned short  millitm;        /* [XSI] Milliseconds since the Epoch */\n\tshort           timezone;       /* [XSI] Minutes west of CUT */\n\tshort           dstflag;        /* [XSI] non-zero if DST in effect */\n};\n\n__BEGIN_DECLS\n/* [XSI] Legacy interface */\nint     ftime(struct timeb *);\n__END_DECLS\n\n#endif /* !_SYS_TIMEB_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/times.h",
    "content": "/*\n * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */\n/*-\n * Copyright (c) 1990, 1993\n *\tThe Regents of the University of California.  All rights reserved.\n * (c) UNIX System Laboratories, Inc.\n * All or some portions of this file are derived from material licensed\n * to the University of California by American Telephone and Telegraph\n * Co. or Unix System Laboratories, Inc. and are reproduced herein with\n * the permission of UNIX System Laboratories, Inc.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *\tThis product includes software developed by the University of\n *\tCalifornia, Berkeley and its contributors.\n * 4. Neither the name of the University nor the names of its contributors\n *    may be used to endorse or promote products derived from this software\n *    without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n *\t@(#)times.h\t8.4 (Berkeley) 1/21/94\n */\n\n#ifndef _SYS_TIMES_H_\n#define _SYS_TIMES_H_\n\n#include <sys/appleapiopts.h>\n#include <sys/cdefs.h>\n#include <sys/_types.h>\n\n/* [XSI] The clock_t type shall be defined as described in <sys/types.h> */\n#include <sys/_types/_clock_t.h>\n\n/*\n * [XSI] Structure whose address is passed as the first parameter to times()\n */\nstruct tms {\n\tclock_t tms_utime;      /* [XSI] User CPU time */\n\tclock_t tms_stime;      /* [XSI] System CPU time */\n\tclock_t tms_cutime;     /* [XSI] Terminated children user CPU time */\n\tclock_t tms_cstime;     /* [XSI] Terminated children System CPU time */\n};\n\n__BEGIN_DECLS\nclock_t times(struct tms *);\n__END_DECLS\n#endif /* !_SYS_TIMES_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/timex.h",
    "content": "/*-\n ***********************************************************************\n *\t\t\t\t\t\t\t\t       *\n * Copyright (c) David L. Mills 1993-2001\t\t\t       *\n * Copyright (c) Poul-Henning Kamp 2000-2001                           *\n *\t\t\t\t\t\t\t\t       *\n * Permission to use, copy, modify, and distribute this software and   *\n * its documentation for any purpose and without fee is hereby\t       *\n * granted, provided that the above copyright notice appears in all    *\n * copies and that both the copyright notice and this permission       *\n * notice appear in supporting documentation, and that the name        *\n * University of Delaware not be used in advertising or publicity      *\n * pertaining to distribution of the software without specific,\t       *\n * written prior permission. The University of Delaware makes no       *\n * representations about the suitability this software for any\t       *\n * purpose. It is provided \"as is\" without express or implied\t       *\n * warranty.\t\t\t\t\t\t\t       *\n *\t\t\t\t\t\t\t\t       *\n ***********************************************************************\n *\n * $FreeBSD$\n *\n * This header file defines the Network Time Protocol (NTP) interfaces\n * for user and daemon application programs.\n *\n * This file was originally created 17 Sep 93 by David L. Mills, Professor\n * of University of Delaware, building on work which had already been ongoing\n * for a decade and a half at that point in time.\n *\n * In 2000 the APIs got a upgrade from microseconds to nanoseconds,\n * a joint work between Poul-Henning Kamp and David L. Mills.\n *\n */\n\n/*\n * Copyright (c) 2017 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n\n#ifndef _SYS_TIMEX_H_\n#define _SYS_TIMEX_H_ 1\n\n#include <sys/time.h>\n\n#define NTP_API         4               /* NTP API version */\n\n/*\n * The following defines establish the performance envelope of the\n * kernel discipline loop. Phase or frequency errors greater than\n * NAXPHASE or MAXFREQ are clamped to these maxima. For update intervals\n * less than MINSEC, the loop always operates in PLL mode; while, for\n * update intervals greater than MAXSEC, the loop always operates in FLL\n * mode. Between these two limits the operating mode is selected by the\n * STA_FLL bit in the status word.\n */\n\n#define MAXPHASE        500000000L      /* max phase error (ns) */\n#define MAXFREQ         500000L         /* max freq error (ns/s) */\n#define MINSEC          256             /* min FLL update interval (s) */\n#define MAXSEC          2048            /* max PLL update interval (s) */\n#define NANOSECOND      1000000000L     /* nanoseconds in one second */\n#define SCALE_PPM       (65536 / 1000)  /* crude ns/s to scaled PPM */\n#define MAXTC           10              /* max time constant */\n\n/* Codes for PPS (pulse-per-second) signals or leap seconds are not used but kept\n * unchanged and commented for future compatibility.\n */\n\n/*\n * Control mode codes (timex.modes)\n */\n#define MOD_OFFSET      0x0001          /* set time offset */\n#define MOD_FREQUENCY   0x0002          /* set frequency offset */\n#define MOD_MAXERROR    0x0004          /* set maximum time error */\n#define MOD_ESTERROR    0x0008          /* set estimated time error */\n#define MOD_STATUS      0x0010          /* set clock status bits */\n#define MOD_TIMECONST   0x0020          /* set PLL time constant */\n#define MOD_PPSMAX      0x0040          /* set PPS maximum averaging time */\n#define MOD_TAI         0x0080          /* set TAI offset */\n#define MOD_MICRO       0x1000          /* select microsecond resolution */\n#define MOD_NANO        0x2000          /* select nanosecond resolution */\n#define MOD_CLKB        0x4000          /* select clock B */\n#define MOD_CLKA        0x8000          /* select clock A */\n\n/*\n * Status codes (timex.status)\n */\n#define STA_PLL         0x0001          /* enable PLL updates (rw) */\n#define STA_PPSFREQ     0x0002          /* enable PPS freq discipline (rw) */\n#define STA_PPSTIME     0x0004          /* enable PPS time discipline (rw) */\n#define STA_FLL         0x0008          /* enable FLL mode (rw) */\n#define STA_INS         0x0010          /* insert leap (rw) */\n#define STA_DEL         0x0020          /* delete leap (rw) */\n#define STA_UNSYNC      0x0040          /* clock unsynchronized (rw) */\n#define STA_FREQHOLD    0x0080          /* hold frequency (rw) */\n#define STA_PPSSIGNAL   0x0100          /* PPS signal present (ro) */\n#define STA_PPSJITTER   0x0200          /* PPS signal jitter exceeded (ro) */\n#define STA_PPSWANDER   0x0400          /* PPS signal wander exceeded (ro) */\n#define STA_PPSERROR    0x0800          /* PPS signal calibration error (ro) */\n#define STA_CLOCKERR    0x1000          /* clock hardware fault (ro) */\n#define STA_NANO        0x2000          /* resolution (0 = us, 1 = ns) (ro) */\n#define STA_MODE        0x4000          /* mode (0 = PLL, 1 = FLL) (ro) */\n#define STA_CLK         0x8000          /* clock source (0 = A, 1 = B) (ro) */\n\n#define STA_RONLY (STA_PPSSIGNAL | STA_PPSJITTER | STA_PPSWANDER | \\\n    STA_PPSERROR | STA_CLOCKERR | STA_NANO | STA_MODE | STA_CLK)\n\n#define STA_SUPPORTED (STA_PLL | STA_FLL | STA_UNSYNC | STA_FREQHOLD | \\\n    STA_CLOCKERR | STA_NANO | STA_MODE | STA_CLK)\n\n/*\n * Clock states (ntptimeval.time_state)\n */\n#define TIME_OK         0               /* no leap second warning */\n#define TIME_INS        1               /* insert leap second warning */\n#define TIME_DEL        2               /* delete leap second warning */\n#define TIME_OOP        3               /* leap second in progress */\n#define TIME_WAIT       4               /* leap second has occurred */\n#define TIME_ERROR      5               /* error (see status word) */\n\n/*\n * NTP user interface -- ntp_gettime - used to read kernel clock values\n */\nstruct ntptimeval {\n\tstruct timespec time;           /* current time (ns) (ro) */\n\tlong maxerror;                  /* maximum error (us) (ro) */\n\tlong esterror;                  /* estimated error (us) (ro) */\n\tlong tai;                       /* TAI offset */\n\tint time_state;                 /* time status */\n};\n\n/*\n * NTP daemon interface -- ntp_adjtime -- used to discipline CPU clock\n * oscillator and control/determine status.\n *\n * Note: The offset, precision and jitter members are in microseconds if\n * STA_NANO is zero and nanoseconds if not.\n */\nstruct timex {\n\tunsigned int modes;             /* clock mode bits (wo) */\n\tlong    offset;                 /* time offset (ns/us) (rw) */\n\tlong    freq;                   /* frequency offset (scaled PPM) (rw) */\n\tlong    maxerror;               /* maximum error (us) (rw) */\n\tlong    esterror;               /* estimated error (us) (rw) */\n\tint     status;                 /* clock status bits (rw) */\n\tlong    constant;               /* poll interval (log2 s) (rw) */\n\tlong    precision;              /* clock precision (ns/us) (ro) */\n\tlong    tolerance;              /* clock frequency tolerance (scaled\n\t                                 * PPM) (ro) */\n\t/*\n\t * The following read-only structure members are used by\n\t * the PPS signal discipline that is currently not supported.\n\t * They are included for compatibility.\n\t */\n\tlong    ppsfreq;                /* PPS frequency (scaled PPM) (ro) */\n\tlong    jitter;                 /* PPS jitter (ns/us) (ro) */\n\tint     shift;                  /* interval duration (s) (shift) (ro) */\n\tlong    stabil;                 /* PPS stability (scaled PPM) (ro) */\n\tlong    jitcnt;                 /* jitter limit exceeded (ro) */\n\tlong    calcnt;                 /* calibration intervals (ro) */\n\tlong    errcnt;                 /* calibration errors (ro) */\n\tlong    stbcnt;                 /* stability limit exceeded (ro) */\n};\n\n#include <sys/cdefs.h>\n\n__BEGIN_DECLS\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\nint     ntp_adjtime(struct timex *);\nint     ntp_gettime(struct ntptimeval *);\n#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */\n__END_DECLS\n\n\n#endif /* !_SYS_TIMEX_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/tprintf.h",
    "content": "/*\n * Copyright (c) 2000-2005 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */\n/*-\n * Copyright (c) 1990, 1993\n *\tThe Regents of the University of California.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *\tThis product includes software developed by the University of\n *\tCalifornia, Berkeley and its contributors.\n * 4. Neither the name of the University nor the names of its contributors\n *    may be used to endorse or promote products derived from this software\n *    without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n *\t@(#)tprintf.h\t8.1 (Berkeley) 6/2/93\n */\n\n#ifndef _SYS_TPRINTF_H_\n#define _SYS_TPRINTF_H_\n\n#include <sys/appleapiopts.h>\n#include <sys/cdefs.h>\n\n#ifdef __APPLE_API_UNSTABLE\n\nstruct proc;\ntypedef struct pgrp *tpr_t;\n\n__BEGIN_DECLS\ntpr_t   tprintf_open(struct proc *);\nvoid    tprintf_close(tpr_t);\nvoid    tprintf(tpr_t, const char *fmt, ...) __printflike(2, 3);\n__END_DECLS\n\n#endif /* __APPLE_API_UNSTABLE */\n\n#endif /* !_SYS_TPRINTF_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/trace.h",
    "content": "/*\n * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */\n/*-\n * Copyright (c) 1982, 1986, 1993\n *\tThe Regents of the University of California.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *\tThis product includes software developed by the University of\n *\tCalifornia, Berkeley and its contributors.\n * 4. Neither the name of the University nor the names of its contributors\n *    may be used to endorse or promote products derived from this software\n *    without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n *\t@(#)trace.h\t8.1 (Berkeley) 6/2/93\n */\n\n#ifndef _SYS_TRACE_H_\n#define _SYS_TRACE_H_\n\n#include <sys/appleapiopts.h>\n\n#ifdef __APPLE_API_OBSOLETE\n/*\n * File system buffer tracing points; all trace <pack(dev, size), bn>\n */\n#define TR_BREADHIT     0       /* buffer read found in cache */\n#define TR_BREADMISS    1       /* buffer read not in cache */\n#define TR_BWRITE       2       /* buffer written */\n#define TR_BREADHITRA   3       /* buffer read-ahead found in cache */\n#define TR_BREADMISSRA  4       /* buffer read-ahead not in cache */\n#define TR_XFODMISS     5       /* exe fod read */\n#define TR_XFODHIT      6       /* exe fod read */\n#define TR_BRELSE       7       /* brelse */\n#define TR_BREALLOC     8       /* expand/contract a buffer */\n\n/*\n * Memory allocator trace points; all trace the amount of memory involved\n */\n#define TR_MALL         10      /* memory allocated */\n\n/*\n * Paging trace points: all are <vaddr, pid>\n */\n#define TR_INTRANS      20      /* page intransit block */\n#define TR_EINTRANS     21      /* page intransit wait done */\n#define TR_FRECLAIM     22      /* reclaim from free list */\n#define TR_RECLAIM      23      /* reclaim from loop */\n#define TR_XSFREC       24      /* reclaim from free list instead of drum */\n#define TR_XIFREC       25      /* reclaim from free list instead of fsys */\n#define TR_WAITMEM      26      /* wait for memory in pagein */\n#define TR_EWAITMEM     27      /* end memory wait in pagein */\n#define TR_ZFOD         28      /* zfod page fault */\n#define TR_EXFOD        29      /* exec fod page fault */\n#define TR_VRFOD        30      /* vread fod page fault */\n#define TR_CACHEFOD     31      /* fod in file system cache */\n#define TR_SWAPIN       32      /* drum page fault */\n#define TR_PGINDONE     33      /* page in done */\n#define TR_SWAPIO       34      /* swap i/o request arrives */\n\n/*\n * System call trace points.\n */\n#define TR_VADVISE      40      /* vadvise occurred with <arg, pid> */\n\n/*\n * Miscellaneous\n */\n#define TR_STAMP        45      /* user said vtrace(VTR_STAMP, value); */\n\n/*\n * This defines the size of the trace flags array.\n */\n#define TR_NFLAGS       100     /* generous */\n\n#define TRCSIZ          4096\n\n/*\n * Specifications of the vtrace() system call, which takes one argument.\n */\n#define VTRACE          64+51\n\n#define VTR_DISABLE     0               /* set a trace flag to 0 */\n#define VTR_ENABLE      1               /* set a trace flag to 1 */\n#define VTR_VALUE       2               /* return value of a trace flag */\n#define VTR_UALARM      3               /* set alarm to go off (sig 16) */\n                                        /* in specified number of hz */\n#define VTR_STAMP       4               /* user specified stamp */\n\n\n#endif /* __APPLE_API_OBSOLETE */\n\n#endif /* !_SYS_TRACE_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/tty.h",
    "content": "/*\n * Copyright (c) 2000-2018 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/* Copyright (c) 1997 Apple Computer, Inc. All Rights Reserved */\n/*-\n * Copyright (c) 1982, 1986, 1993\n *\tThe Regents of the University of California.  All rights reserved.\n * (c) UNIX System Laboratories, Inc.\n * All or some portions of this file are derived from material licensed\n * to the University of California by American Telephone and Telegraph\n * Co. or Unix System Laboratories, Inc. and are reproduced herein with\n * the permission of UNIX System Laboratories, Inc.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *      This product includes software developed by the University of\n *      California, Berkeley and its contributors.\n * 4. Neither the name of the University nor the names of its contributors\n *    may be used to endorse or promote products derived from this software\n *    without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n *\t@(#)tty.h\t8.6 (Berkeley) 1/21/94\n */\n\n#ifndef _SYS_TTY_H_\n#define _SYS_TTY_H_\n\n#include <sys/appleapiopts.h>\n#include <sys/cdefs.h>\n#include <sys/termios.h>\n#include <sys/select.h>         /* For struct selinfo. */\n\nstruct tty;\nstruct clist;\n\n/* These flags are kept in t_state. */\n#define TS_SO_OLOWAT    0x00001         /* Wake up when output <= low water. */\n#define TS_ASYNC        0x00002         /* Tty in async I/O mode. */\n#define TS_BUSY         0x00004         /* Draining output. */\n#define TS_CARR_ON      0x00008         /* Carrier is present. */\n#define TS_FLUSH        0x00010         /* Outq has been flushed during DMA. */\n#define TS_ISOPEN       0x00020         /* Open has completed. */\n#define TS_TBLOCK       0x00040         /* Further input blocked. */\n#define TS_TIMEOUT      0x00080         /* Wait for output char processing. */\n#define TS_TTSTOP       0x00100         /* Output paused. */\n#ifdef notyet\n#define TS_WOPEN        0x00200         /* Open in progress. */\n#endif\n#define TS_XCLUDE       0x00400         /* Tty requires exclusivity. */\n\n/* State for intra-line fancy editing work. */\n#define TS_BKSL         0x00800         /* State for lowercase \\ work. */\n#define TS_CNTTB        0x01000         /* Counting tab width, ignore FLUSHO. */\n#define TS_ERASE        0x02000         /* Within a \\.../ for PRTRUB. */\n#define TS_LNCH         0x04000         /* Next character is literal. */\n#define TS_TYPEN        0x08000         /* Retyping suspended input (PENDIN). */\n#define TS_LOCAL        (TS_BKSL | TS_CNTTB | TS_ERASE | TS_LNCH | TS_TYPEN)\n\n/* Extras. */\n#define TS_CAN_BYPASS_L_RINT 0x010000   /* Device in \"raw\" mode. */\n#define TS_CONNECTED    0x020000        /* Connection open. */\n#define TS_SNOOP        0x040000        /* Device is being snooped on. */\n#define TS_SO_OCOMPLETE 0x080000        /* Wake up when output completes. */\n#define TS_ZOMBIE       0x100000        /* Connection lost. */\n\n/* Hardware flow-control-invoked bits. */\n#define TS_CAR_OFLOW    0x200000        /* For MDMBUF (XXX handle in driver). */\n#ifdef notyet\n#define TS_CTS_OFLOW    0x400000        /* For CCTS_OFLOW. */\n#define TS_DSR_OFLOW    0x800000        /* For CDSR_OFLOW. */\n#endif\n\n#define TS_IOCTL_NOT_OK 0x1000000       /* Workaround <rdar://....> */\n#define TS_REVOKE       0x2000000       /* Terminal getting revoked */\n\n\n/* Character type information. */\n#define ORDINARY        0\n#define CONTROL         1\n#define BACKSPACE       2\n#define NEWLINE         3\n#define TAB             4\n#define VTAB            5\n#define RETURN          6\n\nstruct speedtab {\n\tint sp_speed;\n\tint sp_code;\n};\n\n/* Modem control commands (driver). */\n#define DMSET           0\n#define DMBIS           1\n#define DMBIC           2\n#define DMGET           3\n\n/* Flags on a character passed to ttyinput. */\n#define TTY_CHARMASK    0x000000ff      /* Character mask */\n#define TTY_QUOTE       0x00000100      /* Character quoted */\n#define TTY_ERRORMASK   0xff000000      /* Error mask */\n#define TTY_FE          0x01000000      /* Framing error */\n#define TTY_PE          0x02000000      /* Parity error */\n#define TTY_OE          0x04000000      /* Overrun error */\n#define TTY_BI          0x08000000      /* Break condition */\n\n\n#endif /* !_SYS_TTY_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/ttychars.h",
    "content": "/*\n * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/* Copyright (c) 1997 Apple Computer, Inc. All Rights Reserved */\n/*-\n * Copyright (c) 1982, 1986, 1990, 1993\n *\tThe Regents of the University of California.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *      This product includes software developed by the University of\n *      California, Berkeley and its contributors.\n * 4. Neither the name of the University nor the names of its contributors\n *    may be used to endorse or promote products derived from this software\n *    without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n *\t@(#)ttychars.h\t8.2 (Berkeley) 1/4/94\n */\n\n#ifndef _SYS_TTYCHARS_H_\n#define _SYS_TTYCHARS_H_\n\n#include <sys/appleapiopts.h>\n\n#ifdef __APPLE_API_UNSTABLE\n/*\n * 4.3 COMPATIBILITY FILE\n *\n * User visible structures and constants related to terminal handling.\n */\n\nstruct ttychars {\n\tchar    tc_erase;       /* erase last character */\n\tchar    tc_kill;        /* erase entire line */\n\tchar    tc_intrc;       /* interrupt */\n\tchar    tc_quitc;       /* quit */\n\tchar    tc_startc;      /* start output */\n\tchar    tc_stopc;       /* stop output */\n\tchar    tc_eofc;        /* end-of-file */\n\tchar    tc_brkc;        /* input delimiter (like nl) */\n\tchar    tc_suspc;       /* stop process signal */\n\tchar    tc_dsuspc;      /* delayed stop process signal */\n\tchar    tc_rprntc;      /* reprint line */\n\tchar    tc_flushc;      /* flush output (toggles) */\n\tchar    tc_werasc;      /* word erase */\n\tchar    tc_lnextc;      /* literal next character */\n};\n#ifdef USE_OLD_TTY\n#include <sys/ttydefaults.h>    /* to pick up character defaults */\n#endif\n\n#endif /* __APPLE_API_UNSTABLE */\n\n#endif /* !_SYS_TTYCHARS_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/ttycom.h",
    "content": "/*\n * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/* Copyright (c) 1997 Apple Computer, Inc. All Rights Reserved */\n/*-\n * Copyright (c) 1982, 1986, 1990, 1993, 1994\n *\tThe Regents of the University of California.  All rights reserved.\n * (c) UNIX System Laboratories, Inc.\n * All or some portions of this file are derived from material licensed\n * to the University of California by American Telephone and Telegraph\n * Co. or Unix System Laboratories, Inc. and are reproduced herein with\n * the permission of UNIX System Laboratories, Inc.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *      This product includes software developed by the University of\n *      California, Berkeley and its contributors.\n * 4. Neither the name of the University nor the names of its contributors\n *    may be used to endorse or promote products derived from this software\n *    without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n *\t@(#)ttycom.h\t8.1 (Berkeley) 3/28/94\n */\n\n#ifndef _SYS_TTYCOM_H_\n#define _SYS_TTYCOM_H_\n\n#include <sys/ioccom.h>\n/*\n * Tty ioctl's except for those supported only for backwards compatibility\n * with the old tty driver.\n */\n\n/*\n * Window/terminal size structure.  This information is stored by the kernel\n * in order to provide a consistent interface, but is not used by the kernel.\n */\nstruct winsize {\n\tunsigned short  ws_row;         /* rows, in characters */\n\tunsigned short  ws_col;         /* columns, in characters */\n\tunsigned short  ws_xpixel;      /* horizontal size, pixels */\n\tunsigned short  ws_ypixel;      /* vertical size, pixels */\n};\n\n#define TIOCMODG        _IOR('t', 3, int)       /* get modem control state */\n#define TIOCMODS        _IOW('t', 4, int)       /* set modem control state */\n#define         TIOCM_LE        0001            /* line enable */\n#define         TIOCM_DTR       0002            /* data terminal ready */\n#define         TIOCM_RTS       0004            /* request to send */\n#define         TIOCM_ST        0010            /* secondary transmit */\n#define         TIOCM_SR        0020            /* secondary receive */\n#define         TIOCM_CTS       0040            /* clear to send */\n#define         TIOCM_CAR       0100            /* carrier detect */\n#define         TIOCM_CD        TIOCM_CAR\n#define         TIOCM_RNG       0200            /* ring */\n#define         TIOCM_RI        TIOCM_RNG\n#define         TIOCM_DSR       0400            /* data set ready */\n                                                /* 8-10 compat */\n#define TIOCEXCL         _IO('t', 13)           /* set exclusive use of tty */\n#define TIOCNXCL         _IO('t', 14)           /* reset exclusive use of tty */\n                                                /* 15 unused */\n#define TIOCFLUSH       _IOW('t', 16, int)      /* flush buffers */\n                                                /* 17-18 compat */\n#define TIOCGETA        _IOR('t', 19, struct termios) /* get termios struct */\n#define TIOCSETA        _IOW('t', 20, struct termios) /* set termios struct */\n#define TIOCSETAW       _IOW('t', 21, struct termios) /* drain output, set */\n#define TIOCSETAF       _IOW('t', 22, struct termios) /* drn out, fls in, set */\n#define TIOCGETD        _IOR('t', 26, int)      /* get line discipline */\n#define TIOCSETD        _IOW('t', 27, int)      /* set line discipline */\n#define TIOCIXON         _IO('t', 129)          /* internal input VSTART */\n#define TIOCIXOFF        _IO('t', 128)          /* internal input VSTOP */\n                                                /* 127-124 compat */\n#define TIOCSBRK         _IO('t', 123)          /* set break bit */\n#define TIOCCBRK         _IO('t', 122)          /* clear break bit */\n#define TIOCSDTR         _IO('t', 121)          /* set data terminal ready */\n#define TIOCCDTR         _IO('t', 120)          /* clear data terminal ready */\n#define TIOCGPGRP       _IOR('t', 119, int)     /* get pgrp of tty */\n#define TIOCSPGRP       _IOW('t', 118, int)     /* set pgrp of tty */\n                                                /* 117-116 compat */\n#define TIOCOUTQ        _IOR('t', 115, int)     /* output queue size */\n#define TIOCSTI         _IOW('t', 114, char)    /* simulate terminal input */\n#define TIOCNOTTY        _IO('t', 113)          /* void tty association */\n#define TIOCPKT         _IOW('t', 112, int)     /* pty: set/clear packet mode */\n#define         TIOCPKT_DATA            0x00    /* data packet */\n#define         TIOCPKT_FLUSHREAD       0x01    /* flush packet */\n#define         TIOCPKT_FLUSHWRITE      0x02    /* flush packet */\n#define         TIOCPKT_STOP            0x04    /* stop output */\n#define         TIOCPKT_START           0x08    /* start output */\n#define         TIOCPKT_NOSTOP          0x10    /* no more ^S, ^Q */\n#define         TIOCPKT_DOSTOP          0x20    /* now do ^S ^Q */\n#define         TIOCPKT_IOCTL           0x40    /* state change of pty driver */\n#define TIOCSTOP         _IO('t', 111)          /* stop output, like ^S */\n#define TIOCSTART        _IO('t', 110)          /* start output, like ^Q */\n#define TIOCMSET        _IOW('t', 109, int)     /* set all modem bits */\n#define TIOCMBIS        _IOW('t', 108, int)     /* bis modem bits */\n#define TIOCMBIC        _IOW('t', 107, int)     /* bic modem bits */\n#define TIOCMGET        _IOR('t', 106, int)     /* get all modem bits */\n                                                /* 105 unused */\n#define TIOCGWINSZ      _IOR('t', 104, struct winsize)  /* get window size */\n#define TIOCSWINSZ      _IOW('t', 103, struct winsize)  /* set window size */\n#define TIOCUCNTL       _IOW('t', 102, int)     /* pty: set/clr usr cntl mode */\n#define TIOCSTAT         _IO('t', 101)          /* simulate ^T status message */\n#define         UIOCCMD(n)      _IO('u', n)     /* usr cntl op \"n\" */\n#define TIOCSCONS       _IO('t', 99)            /* 4.2 compatibility */\n#define TIOCCONS        _IOW('t', 98, int)      /* become virtual console */\n#define TIOCSCTTY        _IO('t', 97)           /* become controlling tty */\n#define TIOCEXT         _IOW('t', 96, int)      /* pty: external processing */\n#define TIOCSIG          _IO('t', 95)           /* pty: generate signal */\n#define TIOCDRAIN        _IO('t', 94)           /* wait till output drained */\n#define TIOCMSDTRWAIT   _IOW('t', 91, int)      /* modem: set wait on close */\n#define TIOCMGDTRWAIT   _IOR('t', 90, int)      /* modem: get wait on close */\n#define TIOCTIMESTAMP   _IOR('t', 89, struct timeval)   /* enable/get timestamp\n\t                                                 * of last input event */\n#define TIOCDCDTIMESTAMP _IOR('t', 88, struct timeval)  /* enable/get timestamp\n\t                                                 * of last DCd rise */\n#define TIOCSDRAINWAIT  _IOW('t', 87, int)      /* set ttywait timeout */\n#define TIOCGDRAINWAIT  _IOR('t', 86, int)      /* get ttywait timeout */\n#define TIOCDSIMICROCODE _IO('t', 85)           /* download microcode to\n\t                                         * DSI Softmodem */\n#define TIOCPTYGRANT    _IO('t', 84)            /* grantpt(3) */\n#define TIOCPTYGNAME    _IOC(IOC_OUT, 't', 83, 128)     /* ptsname(3) */\n#define TIOCPTYUNLK     _IO('t', 82)            /* unlockpt(3) */\n\n#define TTYDISC         0               /* termios tty line discipline */\n#define TABLDISC        3               /* tablet discipline */\n#define SLIPDISC        4               /* serial IP discipline */\n#define PPPDISC         5               /* PPP discipline */\n\n#endif /* !_SYS_TTYCOM_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/ttydefaults.h",
    "content": "/*\n * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/* Copyright (c) 1997 Apple Computer, Inc. All Rights Reserved */\n/*-\n * Copyright (c) 1982, 1986, 1993\n *\tThe Regents of the University of California.  All rights reserved.\n * (c) UNIX System Laboratories, Inc.\n * All or some portions of this file are derived from material licensed\n * to the University of California by American Telephone and Telegraph\n * Co. or Unix System Laboratories, Inc. and are reproduced herein with\n * the permission of UNIX System Laboratories, Inc.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *      This product includes software developed by the University of\n *      California, Berkeley and its contributors.\n * 4. Neither the name of the University nor the names of its contributors\n *    may be used to endorse or promote products derived from this software\n *    without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n *\t@(#)ttydefaults.h\t8.4 (Berkeley) 1/21/94\n */\n\n/*\n * System wide defaults for terminal state.\n */\n#ifndef _SYS_TTYDEFAULTS_H_\n#define _SYS_TTYDEFAULTS_H_\n\n/*\n * Defaults on \"first\" open.\n */\n#define TTYDEF_IFLAG    (BRKINT\t| ICRNL\t| IMAXBEL | IXON | IXANY)\n#define TTYDEF_OFLAG    (OPOST | ONLCR)\n#define TTYDEF_LFLAG    (ECHO | ICANON | ISIG | IEXTEN | ECHOE|ECHOKE|ECHOCTL)\n#define TTYDEF_CFLAG    (CREAD | CS8 | HUPCL)\n#define TTYDEF_SPEED    (B9600)\n\n/*\n * Control Character Defaults\n */\n#define CTRL(x) (x&037)\n#define CEOF            CTRL('d')\n#define CEOL            0xff            /* XXX avoid _POSIX_VDISABLE */\n#define CERASE          0177\n#define CINTR           CTRL('c')\n#define CSTATUS         CTRL('t')\n#define CKILL           CTRL('u')\n#define CMIN            1\n#define CQUIT           034             /* FS, ^\\ */\n#define CSUSP           CTRL('z')\n#define CTIME           0\n#define CDSUSP          CTRL('y')\n#define CSTART          CTRL('q')\n#define CSTOP           CTRL('s')\n#define CLNEXT          CTRL('v')\n#define CDISCARD        CTRL('o')\n#define CWERASE         CTRL('w')\n#define CREPRINT        CTRL('r')\n#define CEOT            CEOF\n/* compat */\n#define CBRK            CEOL\n#define CRPRNT          CREPRINT\n#define CFLUSH          CDISCARD\n\n/* PROTECTED INCLUSION ENDS HERE */\n#endif /* !_SYS_TTYDEFAULTS_H_ */\n\n/*\n * #define TTYDEFCHARS to include an array of default control characters.\n */\n#ifdef TTYDEFCHARS\nstatic cc_t     ttydefchars[NCCS] = {\n\tCEOF, CEOL, CEOL, CERASE, CWERASE, CKILL, CREPRINT,\n\t_POSIX_VDISABLE, CINTR, CQUIT, CSUSP, CDSUSP, CSTART, CSTOP, CLNEXT,\n\tCDISCARD, CMIN, CTIME, CSTATUS, _POSIX_VDISABLE\n};\n#undef TTYDEFCHARS\n#endif\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/ttydev.h",
    "content": "/*\n * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/* Copyright (c) 1997 Apple Computer, Inc. All Rights Reserved */\n/*-\n * Copyright (c) 1982, 1986, 1990, 1993\n *\tThe Regents of the University of California.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *      This product includes software developed by the University of\n *      California, Berkeley and its contributors.\n * 4. Neither the name of the University nor the names of its contributors\n *    may be used to endorse or promote products derived from this software\n *    without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n *\t@(#)ttydev.h\t8.2 (Berkeley) 1/4/94\n */\n\n/* COMPATIBILITY HEADER FILE */\n\n#ifndef _SYS_TTYDEV_H_\n#define _SYS_TTYDEV_H_\n\n#ifdef USE_OLD_TTY\n#define B0      0\n#define B50     1\n#define B75     2\n#define B110    3\n#define B134    4\n#define B150    5\n#define B200    6\n#define B300    7\n#define B600    8\n#define B1200   9\n#define B1800   10\n#define B2400   11\n#define B4800   12\n#define B9600   13\n#define EXTA    14\n#define EXTB    15\n#define B57600  16\n#define B115200 17\n#endif /* USE_OLD_TTY */\n\n#endif /* !_SYS_TTYDEV_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/types.h",
    "content": "/*\n * Copyright (c) 2000-2008 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */\n/*\n * Copyright (c) 1982, 1986, 1991, 1993, 1994\n *\tThe Regents of the University of California.  All rights reserved.\n * (c) UNIX System Laboratories, Inc.\n * All or some portions of this file are derived from material licensed\n * to the University of California by American Telephone and Telegraph\n * Co. or Unix System Laboratories, Inc. and are reproduced herein with\n * the permission of UNIX System Laboratories, Inc.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *\tThis product includes software developed by the University of\n *\tCalifornia, Berkeley and its contributors.\n * 4. Neither the name of the University nor the names of its contributors\n *    may be used to endorse or promote products derived from this software\n *    without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n *\t@(#)types.h\t8.4 (Berkeley) 1/21/94\n */\n\n#ifndef _SYS_TYPES_H_\n#define _SYS_TYPES_H_\n\n#include <sys/appleapiopts.h>\n\n#ifndef __ASSEMBLER__\n#include <sys/cdefs.h>\n\n/* Machine type dependent parameters. */\n#include <machine/types.h>\n#include <sys/_types.h>\n\n#include <machine/endian.h>\n\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n#include <sys/_types/_u_char.h>\n#include <sys/_types/_u_short.h>\n#include <sys/_types/_u_int.h>\n#ifndef _U_LONG\ntypedef unsigned long           u_long;\n#define _U_LONG\n#endif\ntypedef unsigned short          ushort;         /* Sys V compatibility */\ntypedef unsigned int            uint;           /* Sys V compatibility */\n#endif\n\ntypedef u_int64_t               u_quad_t;       /* quads */\ntypedef int64_t                 quad_t;\ntypedef quad_t *                qaddr_t;\n\n#include <sys/_types/_caddr_t.h>        /* core address */\n\ntypedef int32_t                 daddr_t;        /* disk address */\n\n#include <sys/_types/_dev_t.h>                  /* device number */\n\ntypedef u_int32_t               fixpt_t;        /* fixed point number */\n\n#include <sys/_types/_blkcnt_t.h>\n#include <sys/_types/_blksize_t.h>\n#include <sys/_types/_gid_t.h>\n#include <sys/_types/_in_addr_t.h>\n#include <sys/_types/_in_port_t.h>\n#include <sys/_types/_ino_t.h>\n\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n#include <sys/_types/_ino64_t.h>                        /* 64bit inode number */\n#endif /* !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) */\n\n#include <sys/_types/_key_t.h>\n#include <sys/_types/_mode_t.h>\n#include <sys/_types/_nlink_t.h>\n#include <sys/_types/_id_t.h>\n#include <sys/_types/_pid_t.h>\n#include <sys/_types/_off_t.h>\n\ntypedef int32_t                 segsz_t;        /* segment size */\ntypedef int32_t                 swblk_t;        /* swap offset */\n\n#include <sys/_types/_uid_t.h>\n\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n/* Major, minor numbers, dev_t's. */\n#if defined(__cplusplus)\n/*\n * These lowercase macros tend to match member functions in some C++ code,\n * so for C++, we must use inline functions instead.\n */\n\nstatic inline __int32_t\nmajor(__uint32_t _x)\n{\n\treturn (__int32_t)(((__uint32_t)_x >> 24) & 0xff);\n}\n\nstatic inline __int32_t\nminor(__uint32_t _x)\n{\n\treturn (__int32_t)((_x) & 0xffffff);\n}\n\nstatic inline dev_t\nmakedev(__uint32_t _major, __uint32_t _minor)\n{\n\treturn (dev_t)(((_major) << 24) | (_minor));\n}\n\n#else   /* !__cplusplus */\n\n#define major(x)        ((int32_t)(((u_int32_t)(x) >> 24) & 0xff))\n#define minor(x)        ((int32_t)((x) & 0xffffff))\n#define makedev(x, y)    ((dev_t)(((x) << 24) | (y)))\n\n#endif  /* !__cplusplus */\n#endif  /* !_POSIX_C_SOURCE */\n\n#include <sys/_types/_clock_t.h>\n#include <sys/_types/_size_t.h>\n#include <sys/_types/_ssize_t.h>\n#include <sys/_types/_time_t.h>\n\n#include <sys/_types/_useconds_t.h>\n#include <sys/_types/_suseconds_t.h>\n\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n#include <sys/_types/_rsize_t.h>\n#include <sys/_types/_errno_t.h>\n#endif\n\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n/*\n * This code is present here in order to maintain historical backward\n * compatability, and is intended to be removed at some point in the\n * future; please include <sys/select.h> instead.\n */\n#include <sys/_types/_fd_def.h>\n\n#define NBBY            __DARWIN_NBBY           /* bits in a byte */\n#define NFDBITS         __DARWIN_NFDBITS        /* bits per mask */\n#define howmany(x, y)   __DARWIN_howmany(x, y)  /* # y's == x bits? */\ntypedef __int32_t       fd_mask;\n\n/*\n * Select uses bit masks of file descriptors in longs.  These macros\n * manipulate such bit fields (the filesystem macros use chars).  The\n * extra protection here is to permit application redefinition above\n * the default size.\n */\n#include <sys/_types/_fd_setsize.h>\n#include <sys/_types/_fd_set.h>\n#include <sys/_types/_fd_clr.h>\n#include <sys/_types/_fd_zero.h>\n#include <sys/_types/_fd_isset.h>\n\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n#include <sys/_types/_fd_copy.h>\n#endif  /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */\n\n\n\n#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */\n#endif /* __ASSEMBLER__ */\n\n\n#ifndef __POSIX_LIB__\n\n#include <sys/_pthread/_pthread_attr_t.h>\n#include <sys/_pthread/_pthread_cond_t.h>\n#include <sys/_pthread/_pthread_condattr_t.h>\n#include <sys/_pthread/_pthread_mutex_t.h>\n#include <sys/_pthread/_pthread_mutexattr_t.h>\n#include <sys/_pthread/_pthread_once_t.h>\n#include <sys/_pthread/_pthread_rwlock_t.h>\n#include <sys/_pthread/_pthread_rwlockattr_t.h>\n#include <sys/_pthread/_pthread_t.h>\n\n#endif /* __POSIX_LIB__ */\n\n#include <sys/_pthread/_pthread_key_t.h>\n\n\n/* statvfs and fstatvfs */\n\n#include <sys/_types/_fsblkcnt_t.h>\n#include <sys/_types/_fsfilcnt_t.h>\n\n#endif /* !_SYS_TYPES_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/ubc.h",
    "content": "/*\n * Copyright (c) 1999-2007 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/*\n *\tHeader file for Unified Buffer Cache.\n *\n */\n\n#ifndef _SYS_UBC_H_\n#define _SYS_UBC_H_\n\n#include <sys/appleapiopts.h>\n#include <sys/cdefs.h>\n#include <sys/kernel_types.h>\n#include <kern/locks.h>\n#include <mach/machine.h>\n#include <mach/memory_object_types.h>\n#include <sys/ucred.h>\n\n\n/* defns for ubc_msync() and ubc_msync */\n\n#define UBC_PUSHDIRTY   0x01    /* clean any dirty pages in the specified range to the backing store */\n#define UBC_PUSHALL     0x02    /* push both dirty and precious pages to the backing store */\n#define UBC_INVALIDATE  0x04    /* invalidate pages in the specified range... may be used with UBC_PUSHDIRTY/ALL */\n#define UBC_SYNC        0x08    /* wait for I/Os generated by UBC_PUSHDIRTY to complete */\n\n__BEGIN_DECLS\n\noff_t           ubc_blktooff(struct vnode *, daddr64_t);\ndaddr64_t       ubc_offtoblk(struct vnode *, off_t);\noff_t   ubc_getsize(struct vnode *);\nint     ubc_setsize(struct vnode *, off_t);\n\n\nkauth_cred_t ubc_getcred(struct vnode *);\nstruct thread;\nint     ubc_setthreadcred(struct vnode *, struct proc *, struct thread *);\n\nerrno_t ubc_msync(vnode_t, off_t, off_t, off_t *, int);\nint     ubc_pages_resident(vnode_t);\nint     ubc_page_op(vnode_t, off_t, int, ppnum_t *, int *);\nint     ubc_range_op(vnode_t, off_t, off_t, int, int *);\n\n\n/* cluster IO routines */\nvoid    cluster_update_state(vnode_t, vm_object_offset_t, vm_object_offset_t, boolean_t);\n\nint     advisory_read(vnode_t, off_t, off_t, int);\nint     advisory_read_ext(vnode_t, off_t, off_t, int, int (*)(buf_t, void *), void *, int);\n\nint     cluster_read(vnode_t, struct uio *, off_t, int);\nint     cluster_read_ext(vnode_t, struct uio *, off_t, int, int (*)(buf_t, void *), void *);\n\nint     cluster_write(vnode_t, struct uio *, off_t, off_t, off_t, off_t, int);\nint     cluster_write_ext(vnode_t, struct uio *, off_t, off_t, off_t, off_t, int, int (*)(buf_t, void *), void *);\n\nint     cluster_pageout(vnode_t, upl_t, upl_offset_t, off_t, int, off_t, int);\nint     cluster_pageout_ext(vnode_t, upl_t, upl_offset_t, off_t, int, off_t, int, int (*)(buf_t, void *), void *);\n\nint     cluster_pagein(vnode_t, upl_t, upl_offset_t, off_t, int, off_t, int);\nint     cluster_pagein_ext(vnode_t, upl_t, upl_offset_t, off_t, int, off_t, int, int (*)(buf_t, void *), void *);\n\nint     cluster_push(vnode_t, int);\nint     cluster_push_ext(vnode_t, int, int (*)(buf_t, void *), void *);\nint     cluster_push_err(vnode_t, int, int (*)(buf_t, void *), void *, int *);\n\nint     cluster_bp(buf_t);\nint     cluster_bp_ext(buf_t, int (*)(buf_t, void *), void *);\n\nvoid    cluster_zero(upl_t, upl_offset_t, int, buf_t);\n\nint     cluster_copy_upl_data(uio_t, upl_t, int, int *);\nint     cluster_copy_ubc_data(vnode_t, uio_t, int *, int);\n\ntypedef struct cl_direct_read_lock cl_direct_read_lock_t;\ncl_direct_read_lock_t *cluster_lock_direct_read(vnode_t vp, lck_rw_type_t exclusive);\nvoid cluster_unlock_direct_read(cl_direct_read_lock_t *lck);\n\n/* UPL routines */\nint     ubc_create_upl(vnode_t, off_t, int, upl_t *, upl_page_info_t **, int);\nint     ubc_upl_map(upl_t, vm_offset_t *);\nint     ubc_upl_unmap(upl_t);\nint     ubc_upl_map_range(upl_t, vm_offset_t, vm_size_t, vm_prot_t, vm_offset_t *);\nint     ubc_upl_unmap_range(upl_t, vm_offset_t, vm_size_t);\nint     ubc_upl_commit(upl_t);\nint     ubc_upl_commit_range(upl_t, upl_offset_t, upl_size_t, int);\nint     ubc_upl_abort(upl_t, int);\nint     ubc_upl_abort_range(upl_t, upl_offset_t, upl_size_t, int);\nvoid    ubc_upl_range_needed(upl_t, int, int);\n\nupl_page_info_t *ubc_upl_pageinfo(upl_t);\nupl_size_t ubc_upl_maxbufsize(void);\n\nint     is_file_clean(vnode_t, off_t);\n\nerrno_t mach_to_bsd_errno(kern_return_t mach_err);\n\n\n__END_DECLS\n\n#endif  /* _SYS_UBC_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/ucontext.h",
    "content": "/*\n * Copyright (c) 2002-2006 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n\n#ifndef _SYS_UCONTEXT_H_\n#define _SYS_UCONTEXT_H_\n\n#include <sys/cdefs.h>\n#include <sys/_types.h>\n\n#include <machine/_mcontext.h>\n#include <sys/_types/_ucontext.h>\n\n#include <sys/_types/_sigset_t.h>\n\n\n#endif /* _SYS_UCONTEXT_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/ucred.h",
    "content": "/*\n * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/* Copyright (c) 1995, 1997 Apple Computer, Inc. All Rights Reserved */\n/*\n * Copyright (c) 1989, 1993\n *\tThe Regents of the University of California.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *\tThis product includes software developed by the University of\n *\tCalifornia, Berkeley and its contributors.\n * 4. Neither the name of the University nor the names of its contributors\n *    may be used to endorse or promote products derived from this software\n *    without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n *\t@(#)ucred.h\t8.4 (Berkeley) 1/9/95\n */\n/*\n * NOTICE: This file was modified by SPARTA, Inc. in 2005 to introduce\n * support for mandatory and extensible security protections.  This notice\n * is included in support of clause 2.2 (b) of the Apple Public License,\n * Version 2.0.\n */\n\n#ifndef _SYS_UCRED_H_\n#define _SYS_UCRED_H_\n\n#include <sys/appleapiopts.h>\n#include <sys/cdefs.h>\n#include <sys/param.h>\n#include <bsm/audit.h>\n\nstruct label;\n\n#ifdef __APPLE_API_UNSTABLE\nstruct ucred;\nstruct posix_cred;\n\n#ifndef _KAUTH_CRED_T\n#define _KAUTH_CRED_T\ntypedef struct ucred *kauth_cred_t;\ntypedef struct posix_cred *posix_cred_t;\n#endif  /* !_KAUTH_CRED_T */\n\n/*\n * Credential flags that can be set on a credential\n */\n#define CRF_NOMEMBERD   0x00000001      /* memberd opt out by setgroups() */\n#define CRF_MAC_ENFORCE 0x00000002      /* force entry through MAC Framework */\n                                        /* also forces credential cache miss */\n\n/*\n * This is the external representation of struct ucred.\n */\nstruct xucred {\n\tu_int   cr_version;             /* structure layout version */\n\tuid_t   cr_uid;                 /* effective user id */\n\tshort   cr_ngroups;             /* number of advisory groups */\n\tgid_t   cr_groups[NGROUPS];     /* advisory group list */\n};\n#define XUCRED_VERSION  0\n\n#define cr_gid cr_groups[0]\n#define NOCRED ((kauth_cred_t )0)       /* no credential available */\n#define FSCRED ((kauth_cred_t )-1)      /* filesystem credential */\n\n#define IS_VALID_CRED(_cr)      ((_cr) != NOCRED && (_cr) != FSCRED)\n\n#endif /* __APPLE_API_UNSTABLE */\n\n#endif /* !_SYS_UCRED_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/uio.h",
    "content": "/*\n * Copyright (c) 2000-2019 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */\n/*\n * Copyright (c) 1982, 1986, 1993, 1994\n *\tThe Regents of the University of California.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *\tThis product includes software developed by the University of\n *\tCalifornia, Berkeley and its contributors.\n * 4. Neither the name of the University nor the names of its contributors\n *    may be used to endorse or promote products derived from this software\n *    without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n *\t@(#)uio.h\t8.5 (Berkeley) 2/22/94\n */\n\n#ifndef _SYS_UIO_H_\n#define _SYS_UIO_H_\n\n#include <Availability.h>\n#include <sys/cdefs.h>\n#include <sys/_types.h>\n#include <sys/_types/_off_t.h>\n\n/*\n * [XSI] The ssize_t and size_t types shall be defined as described\n * in <sys/types.h>.\n */\n#include <sys/_types/_size_t.h>\n#include <sys/_types/_ssize_t.h>\n\n/*\n * [XSI] Structure whose address is passed as the second parameter to the\n * readv(), preadv(), writev() and pwritev() functions.\n */\n#include <sys/_types/_iovec_t.h>\n\n\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n/*\n * IO direction for uio_t.\n *\tUIO_READ - data moves into iovec(s) associated with uio_t\n *\tUIO_WRITE - data moves out of iovec(s) associated with uio_t\n */\nenum uio_rw { UIO_READ, UIO_WRITE };\n#endif\n\n\n\n__BEGIN_DECLS\nssize_t readv(int, const struct iovec *, int) __DARWIN_ALIAS_C(readv);\nssize_t writev(int, const struct iovec *, int) __DARWIN_ALIAS_C(writev);\n\n#if (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || defined(_DARWIN_C_SOURCE)\n\nssize_t preadv(int, const struct iovec *, int, off_t) __DARWIN_NOCANCEL(preadv) __API_AVAILABLE(macos(11.0), ios(14.0), watchos(7.0), tvos(14.0));\nssize_t pwritev(int, const struct iovec *, int, off_t) __DARWIN_NOCANCEL(pwritev) __API_AVAILABLE(macos(11.0), ios(14.0), watchos(7.0), tvos(14.0));\n\n#endif /* #if (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || defined(_DARWIN_C_SOURCE) */\n\n__END_DECLS\n\n\n#endif /* !_SYS_UIO_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/un.h",
    "content": "/*\n * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/*\n * Copyright (c) 1982, 1986, 1993\n *\tThe Regents of the University of California.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *\tThis product includes software developed by the University of\n *\tCalifornia, Berkeley and its contributors.\n * 4. Neither the name of the University nor the names of its contributors\n *    may be used to endorse or promote products derived from this software\n *    without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n *\t@(#)un.h\t8.3 (Berkeley) 2/19/95\n */\n\n#ifndef _SYS_UN_H_\n#define _SYS_UN_H_\n\n#include <sys/appleapiopts.h>\n#include <sys/cdefs.h>\n#include <sys/_types.h>\n\n/* [XSI] The sa_family_t type shall be defined as described in <sys/socket.h> */\n#include <sys/_types/_sa_family_t.h>\n\n/*\n * [XSI] Definitions for UNIX IPC domain.\n */\nstruct  sockaddr_un {\n\tunsigned char   sun_len;        /* sockaddr len including null */\n\tsa_family_t     sun_family;     /* [XSI] AF_UNIX */\n\tchar            sun_path[104];  /* [XSI] path name (gag) */\n};\n\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n\n/* Level number of get/setsockopt for local domain sockets */\n#define SOL_LOCAL               0\n\n/* Socket options. */\n#define LOCAL_PEERCRED          0x001           /* retrieve peer credentials */\n#define LOCAL_PEERPID           0x002           /* retrieve peer pid */\n#define LOCAL_PEEREPID          0x003           /* retrieve eff. peer pid */\n#define LOCAL_PEERUUID          0x004           /* retrieve peer UUID */\n#define LOCAL_PEEREUUID         0x005           /* retrieve eff. peer UUID */\n#define LOCAL_PEERTOKEN         0x006           /* retrieve peer audit token */\n\n#endif  /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */\n\n\n\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n/* actual length of an initialized sockaddr_un */\n#define SUN_LEN(su) \\\n\t(sizeof(*(su)) - sizeof((su)->sun_path) + strlen((su)->sun_path))\n#endif  /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */\n\n\n#endif /* !_SYS_UN_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/unistd.h",
    "content": "/*\n * Copyright (c) 2000-2013 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */\n/*\n * Copyright (c) 1989, 1993\n *\tThe Regents of the University of California.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *\tThis product includes software developed by the University of\n *\tCalifornia, Berkeley and its contributors.\n * 4. Neither the name of the University nor the names of its contributors\n *    may be used to endorse or promote products derived from this software\n *    without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n *\t@(#)unistd.h\t8.2 (Berkeley) 1/7/94\n */\n\n#ifndef _SYS_UNISTD_H_\n#define _SYS_UNISTD_H_\n\n#include <sys/cdefs.h>\n\n/*\n * Although we have saved user/group IDs, we do not use them in setuid\n * as described in POSIX 1003.1, because the feature does not work for\n * root.  We use the saved IDs in seteuid/setegid, which are not currently\n * part of the POSIX 1003.1 specification.\n */\n#ifdef  _NOT_AVAILABLE\n#define _POSIX_SAVED_IDS        /* saved set-user-ID and set-group-ID */\n#endif\n\n#define _POSIX_VERSION          200112L\n#define _POSIX2_VERSION         200112L\n\n/* execution-time symbolic constants */\n/* may disable terminal special characters */\n#include <sys/_types/_posix_vdisable.h>\n\n#define _POSIX_THREAD_KEYS_MAX 128\n\n/* access function */\n#define F_OK            0       /* test for existence of file */\n#define X_OK            (1<<0)  /* test for execute or search permission */\n#define W_OK            (1<<1)  /* test for write permission */\n#define R_OK            (1<<2)  /* test for read permission */\n\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n/*\n * Extended access functions.\n * Note that we depend on these matching the definitions in sys/kauth.h,\n * but with the bits shifted left by 8.\n */\n#define _READ_OK        (1<<9)  /* read file data / read directory */\n#define _WRITE_OK       (1<<10) /* write file data / add file to directory */\n#define _EXECUTE_OK     (1<<11) /* execute file / search in directory*/\n#define _DELETE_OK      (1<<12) /* delete file / delete directory */\n#define _APPEND_OK      (1<<13) /* append to file / add subdirectory to directory */\n#define _RMFILE_OK      (1<<14) /* - / remove file from directory */\n#define _RATTR_OK       (1<<15) /* read basic attributes */\n#define _WATTR_OK       (1<<16) /* write basic attributes */\n#define _REXT_OK        (1<<17) /* read extended attributes */\n#define _WEXT_OK        (1<<18) /* write extended attributes */\n#define _RPERM_OK       (1<<19) /* read permissions */\n#define _WPERM_OK       (1<<20) /* write permissions */\n#define _CHOWN_OK       (1<<21) /* change ownership */\n\n#define _ACCESS_EXTENDED_MASK (_READ_OK | _WRITE_OK | _EXECUTE_OK | \\\n\t                        _DELETE_OK | _APPEND_OK | \\\n\t                        _RMFILE_OK | _REXT_OK | \\\n\t                        _WEXT_OK | _RATTR_OK | _WATTR_OK | _RPERM_OK | \\\n\t                        _WPERM_OK | _CHOWN_OK)\n#endif\n\n/* whence values for lseek(2) */\n#include <sys/_types/_seek_set.h>\n\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n/* whence values for lseek(2); renamed by POSIX 1003.1 */\n#define L_SET           SEEK_SET\n#define L_INCR          SEEK_CUR\n#define L_XTND          SEEK_END\n#endif\n\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\nstruct accessx_descriptor {\n\tunsigned int ad_name_offset;\n\tint ad_flags;\n\tint ad_pad[2];\n};\n#define ACCESSX_MAX_DESCRIPTORS 100\n#define ACCESSX_MAX_TABLESIZE   (16 * 1024)\n#endif\n\n/* configurable pathname variables */\n#define _PC_LINK_MAX             1\n#define _PC_MAX_CANON            2\n#define _PC_MAX_INPUT            3\n#define _PC_NAME_MAX             4\n#define _PC_PATH_MAX             5\n#define _PC_PIPE_BUF             6\n#define _PC_CHOWN_RESTRICTED     7\n#define _PC_NO_TRUNC             8\n#define _PC_VDISABLE             9\n\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n#define _PC_NAME_CHARS_MAX       10\n#define _PC_CASE_SENSITIVE               11\n#define _PC_CASE_PRESERVING              12\n#define _PC_EXTENDED_SECURITY_NP        13\n#define _PC_AUTH_OPAQUE_NP      14\n#endif\n\n#define _PC_2_SYMLINKS          15      /* Symlink supported in directory */\n#define _PC_ALLOC_SIZE_MIN      16      /* Minimum storage actually allocated */\n#define _PC_ASYNC_IO            17      /* Async I/O [AIO] supported? */\n#define _PC_FILESIZEBITS        18      /* # of bits to represent file size */\n#define _PC_PRIO_IO             19      /* Priority I/O [PIO] supported? */\n#define _PC_REC_INCR_XFER_SIZE  20      /* Recommended increment for next two */\n#define _PC_REC_MAX_XFER_SIZE   21      /* Recommended max file transfer size */\n#define _PC_REC_MIN_XFER_SIZE   22      /* Recommended min file transfer size */\n#define _PC_REC_XFER_ALIGN      23      /* Recommended buffer alignment */\n#define _PC_SYMLINK_MAX         24      /* Max # of bytes in symlink name */\n#define _PC_SYNC_IO             25      /* Sync I/O [SIO] supported? */\n#define _PC_XATTR_SIZE_BITS     26      /* # of bits to represent maximum xattr size */\n#define _PC_MIN_HOLE_SIZE       27      /* Recommended minimum hole size for sparse files */\n\n/* configurable system strings */\n#define _CS_PATH                 1\n\n#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL\n\n#include <machine/_types.h>\n#include <sys/_types/_size_t.h>\n#include <_types/_uint64_t.h>\n#include <_types/_uint32_t.h>\n#include <Availability.h>\n\n__BEGIN_DECLS\n\nint     getattrlistbulk(int, void *, void *, size_t, uint64_t) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_8_0);\nint     getattrlistat(int, const char *, void *, void *, size_t, unsigned long) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_8_0);\nint     setattrlistat(int, const char *, void *, void *, size_t, uint32_t) __OSX_AVAILABLE(10.13) __IOS_AVAILABLE(11.0) __TVOS_AVAILABLE(11.0) __WATCHOS_AVAILABLE(4.0);\n\n__END_DECLS\n\n#endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */\n\n#if __DARWIN_C_LEVEL >= 200809L\n\n#include <machine/_types.h>\n#include <sys/_types/_size_t.h>\n#include <sys/_types/_ssize_t.h>\n#include <sys/_types.h>\n#include <sys/_types/_uid_t.h>\n#include <sys/_types/_gid_t.h>\n#include <Availability.h>\n\n__BEGIN_DECLS\n\nint     faccessat(int, const char *, int, int) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_8_0);\nint     fchownat(int, const char *, uid_t, gid_t, int)  __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_8_0);\nint     linkat(int, const char *, int, const char *, int)       __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_8_0);\nssize_t readlinkat(int, const char *, char *, size_t)   __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_8_0);\nint     symlinkat(const char *, int, const char *) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_8_0);\nint     unlinkat(int, const char *, int) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_8_0);\n\n__END_DECLS\n\n#endif /* __DARWIN_C_LEVEL >= 200809L */\n\n#endif /* !_SYS_UNISTD_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/unpcb.h",
    "content": "/*\n * Copyright (c) 2008-2020 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/*\n * Copyright (c) 1982, 1986, 1989, 1993\n *\tThe Regents of the University of California.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *\tThis product includes software developed by the University of\n *\tCalifornia, Berkeley and its contributors.\n * 4. Neither the name of the University nor the names of its contributors\n *    may be used to endorse or promote products derived from this software\n *    without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n *\t@(#)unpcb.h\t8.1 (Berkeley) 6/2/93\n */\n\n#ifndef _SYS_UNPCB_H_\n#define _SYS_UNPCB_H_\n\n#include <sys/appleapiopts.h>\n#include <sys/queue.h>\n#include <sys/un.h>\n#include <sys/ucred.h>\n#include <sys/socketvar.h>\n\n/*\n * Protocol control block for an active\n * instance of a UNIX internal protocol.\n *\n * A socket may be associated with an vnode in the\n * file system.  If so, the unp_vnode pointer holds\n * a reference count to this vnode, which should be irele'd\n * when the socket goes away.\n *\n * A socket may be connected to another socket, in which\n * case the control block of the socket to which it is connected\n * is given by unp_conn.\n *\n * A socket may be referenced by a number of sockets (e.g. several\n * sockets may be connected to a datagram socket.)  These sockets\n * are in a linked list starting with unp_refs, linked through\n * unp_nextref and null-terminated.  Note that a socket may be referenced\n * by a number of other sockets and may also reference a socket (not\n * necessarily one which is referencing it).  This generates\n * the need for unp_refs and unp_nextref to be separate fields.\n *\n * Stream sockets keep copies of receive sockbuf sb_cc and sb_mbcnt\n * so that changes in the sockbuf may be computed to modify\n * back pressure on the sender accordingly.\n */\n\ntypedef u_quad_t        unp_gen_t;\n\n#if defined(__LP64__)\nstruct _unpcb_list_entry {\n\tu_int32_t   le_next;\n\tu_int32_t   le_prev;\n};\n#define _UCPCB_LIST_HEAD(name, type)    \\\nstruct name {                           \\\n\tu_int32_t\tlh_first;       \\\n};\n#define _UNPCB_LIST_ENTRY(x)            struct _unpcb_list_entry\n#define _UNPCB_PTR(x)                   u_int32_t\n#else\n#define _UCPCB_LIST_HEAD(name, type)    LIST_HEAD(name, type)\n#define _UNPCB_LIST_ENTRY(x)            LIST_ENTRY(x)\n#define _UNPCB_PTR(x)                   x\n#endif\n\n\nstruct  xunpgen {\n\tu_int32_t       xug_len;\n\tu_int           xug_count;\n\tunp_gen_t       xug_gen;\n\tso_gen_t        xug_sogen;\n};\n\n#endif /* _SYS_UNPCB_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/user.h",
    "content": "/*\n * Copyright (c) 2000-2018 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/* Copyright (c) 1995, 1997 Apple Computer, Inc. All Rights Reserved */\n/*\n * Copyright (c) 1982, 1986, 1989, 1991, 1993\n *\tThe Regents of the University of California.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *\tThis product includes software developed by the University of\n *\tCalifornia, Berkeley and its contributors.\n * 4. Neither the name of the University nor the names of its contributors\n *    may be used to endorse or promote products derived from this software\n *    without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n *\t@(#)user.h\t8.2 (Berkeley) 9/23/93\n */\n\n#ifndef _SYS_USER_H_\n#define _SYS_USER_H_\n\n#include <sys/appleapiopts.h>\nstruct waitq_set;\n/* stuff that *used* to be included by user.h, or is now needed */\n#include <errno.h>\n#include <sys/time.h>\n#include <sys/resource.h>\n#include <sys/ucred.h>\n#include <sys/uio.h>\n#include <sys/vm.h>             /* XXX */\n#include <sys/sysctl.h>\n\n\n/*\n * Per process structure containing data that isn't needed in core\n * when the process isn't running (esp. when swapped out).\n * This structure may or may not be at the same kernel address\n * in all processes.\n */\n\nstruct  user {\n\t/* NOT USED ANYMORE */\n};\n\n#endif  /* !_SYS_USER_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/utfconv.h",
    "content": "/*\n * Copyright (c) 2000-2005 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n\n#ifndef _SYS_UTFCONV_H_\n#define _SYS_UTFCONV_H_\n\n#include <sys/appleapiopts.h>\n#include <sys/cdefs.h>\n\n\n#endif /* !_SYS_UTFCONV_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/utsname.h",
    "content": "/*\n * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/* Copyright 1993,1995 NeXT Computer Inc. All Rights Reserved */\n/*-\n * Copyright (c) 1994\n *\tThe Regents of the University of California.  All rights reserved.\n *\n * This code is derived from software contributed to Berkeley by\n * Chuck Karish of Mindcraft, Inc.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *\tThis product includes software developed by the University of\n *\tCalifornia, Berkeley and its contributors.\n * 4. Neither the name of the University nor the names of its contributors\n *    may be used to endorse or promote products derived from this software\n *    without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n *\t@(#)utsname.h\t8.1 (Berkeley) 1/4/94\n */\n\n#ifndef _SYS_UTSNAME_H\n#define _SYS_UTSNAME_H\n\n#include <sys/cdefs.h>\n\n#define _SYS_NAMELEN    256\n\nstruct  utsname {\n\tchar    sysname[_SYS_NAMELEN];  /* [XSI] Name of OS */\n\tchar    nodename[_SYS_NAMELEN]; /* [XSI] Name of this network node */\n\tchar    release[_SYS_NAMELEN];  /* [XSI] Release level */\n\tchar    version[_SYS_NAMELEN];  /* [XSI] Version level */\n\tchar    machine[_SYS_NAMELEN];  /* [XSI] Hardware type */\n};\n\n__BEGIN_DECLS\nint uname(struct utsname *);\n__END_DECLS\n\n#endif  /* !_SYS_UTSNAME_H */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/vadvise.h",
    "content": "/*\n * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */\n/*-\n * Copyright (c) 1982, 1986, 1993\n *\tThe Regents of the University of California.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *\tThis product includes software developed by the University of\n *\tCalifornia, Berkeley and its contributors.\n * 4. Neither the name of the University nor the names of its contributors\n *    may be used to endorse or promote products derived from this software\n *    without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n *\t@(#)vadvise.h\t8.1 (Berkeley) 6/2/93\n */\n\n\n#ifndef _SYS_VADVISE_H_\n#define _SYS_VADVISE_H_\n\n#include <sys/appleapiopts.h>\n\n#ifdef __APPLE_API_OBSOLETE\n/*\n * Parameters to vadvise() to tell system of particular paging\n * behaviour:\n *\tVA_NORM\t\tNormal strategy\n *\tVA_ANOM\t\tSampling page behaviour is not a win, don't bother\n *\t\t\tSuitable during GCs in LISP, or sequential or random\n *\t\t\tpage referencing.\n *\tVA_SEQL\t\tSequential behaviour expected.\n *\tVA_FLUSH\tInvalidate all page table entries.\n */\n#define VA_NORM         0\n#define VA_ANOM         1\n#define VA_SEQL         2\n#define VA_FLUSH        3\n\n#endif /* __APPLE_API_OBSOLETE */\n\n#endif  /* !_SYS_VADVISE_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/vcmd.h",
    "content": "/*\n * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */\n/*-\n * Copyright (c) 1982, 1986, 1993\n *\tThe Regents of the University of California.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *\tThis product includes software developed by the University of\n *\tCalifornia, Berkeley and its contributors.\n * 4. Neither the name of the University nor the names of its contributors\n *    may be used to endorse or promote products derived from this software\n *    without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n *\t@(#)vcmd.h\t8.1 (Berkeley) 6/2/93\n */\n\n#ifndef _SYS_VCMD_H_\n#define _SYS_VCMD_H_\n\n#include <sys/ioctl.h>\n\n#define VPRINT          0100\n#define VPLOT           0200\n#define VPRINTPLOT      0400\n\n#define VGETSTATE       _IOR('v', 0, int)\n#define VSETSTATE       _IOW('v', 1, int)\n#endif /* !_SYS_VCMD_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/vm.h",
    "content": "/*\n * Copyright (c) 2000-2006 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */\n/*\n * Copyright (c) 1991, 1993\n *\tThe Regents of the University of California.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *\tThis product includes software developed by the University of\n *\tCalifornia, Berkeley and its contributors.\n * 4. Neither the name of the University nor the names of its contributors\n *    may be used to endorse or promote products derived from this software\n *    without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n *\t@(#)vm.h\t8.5 (Berkeley) 5/11/95\n */\n/* HISTORY\n *  05-Jun-95  Mac Gillon (mgillon) at NeXT\n *      4.4 code uses this file to import MACH API\n */\n\n#ifndef _SYS_VM_H\n#define _SYS_VM_H\n\n#include <sys/appleapiopts.h>\n#include <sys/cdefs.h>\n\n\n#include <sys/_types/_caddr_t.h> /* caddr_t */\n#include <sys/_types/_int32_t.h> /* int32_t */\n\n/* just to keep kinfo_proc happy */\n/* NOTE: Pointer fields are size variant for LP64 */\nstruct vmspace {\n\tint32_t dummy;\n\tcaddr_t dummy2;\n\tint32_t dummy3[5];\n\tcaddr_t dummy4[3];\n};\n\n\n\n#endif /* _SYS_VM_H */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/vmmeter.h",
    "content": "/*\n * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */\n/*-\n * Copyright (c) 1982, 1986, 1993\n *\tThe Regents of the University of California.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *      This product includes software developed by the University of\n *      California, Berkeley and its contributors.\n * 4. Neither the name of the University nor the names of its contributors\n *    may be used to endorse or promote products derived from this software\n *    without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n *\t@(#)vmmeter.h\t8.2 (Berkeley) 7/10/94\n */\n\n#ifndef _SYS_VMMETER_H_\n#define _SYS_VMMETER_H_\n\n#include <sys/appleapiopts.h>\n#include <stdint.h>\n\n#ifdef __APPLE_API_OBSOLETE\n/*\n * System wide statistics counters.\n */\nstruct vmmeter {\n\t/*\n\t * General system activity.\n\t */\n\tunsigned int v_swtch;           /* context switches */\n\tunsigned int v_trap;            /* calls to trap */\n\tunsigned int v_syscall; /* calls to syscall() */\n\tunsigned int v_intr;            /* device interrupts */\n\tunsigned int v_soft;            /* software interrupts */\n\tunsigned int v_faults;          /* total faults taken */\n\t/*\n\t * Virtual memory activity.\n\t */\n\tunsigned int v_lookups; /* object cache lookups */\n\tunsigned int v_hits;            /* object cache hits */\n\tunsigned int v_vm_faults;       /* number of address memory faults */\n\tunsigned int v_cow_faults;      /* number of copy-on-writes */\n\tunsigned int v_swpin;           /* swapins */\n\tunsigned int v_swpout;          /* swapouts */\n\tunsigned int v_pswpin;          /* pages swapped in */\n\tunsigned int v_pswpout; /* pages swapped out */\n\tunsigned int v_pageins; /* number of pageins */\n\tunsigned int v_pageouts;        /* number of pageouts */\n\tunsigned int v_pgpgin;          /* pages paged in */\n\tunsigned int v_pgpgout; /* pages paged out */\n\tunsigned int v_intrans; /* intransit blocking page faults */\n\tunsigned int v_reactivated;     /* number of pages reactivated from free list */\n\tunsigned int v_rev;             /* revolutions of the hand */\n\tunsigned int v_scan;            /* scans in page out daemon */\n\tunsigned int v_dfree;           /* pages freed by daemon */\n\tunsigned int v_pfree;           /* pages freed by exiting processes */\n\tunsigned int v_zfod;            /* pages zero filled on demand */\n\tunsigned int v_nzfod;           /* number of zfod's created */\n\t/*\n\t * Distribution of page usages.\n\t */\n\tunsigned int v_page_size;       /* page size in bytes */\n\tunsigned int v_kernel_pages;    /* number of pages in use by kernel */\n\tunsigned int v_free_target;     /* number of pages desired free */\n\tunsigned int v_free_min;        /* minimum number of pages desired free */\n\tunsigned int v_free_count;      /* number of pages free */\n\tunsigned int v_wire_count;      /* number of pages wired down */\n\tunsigned int v_active_count;    /* number of pages active */\n\tunsigned int v_inactive_target; /* number of pages desired inactive */\n\tunsigned int v_inactive_count;  /* number of pages inactive */\n};\n\n/* systemwide totals computed every five seconds */\nstruct vmtotal {\n\tint16_t t_rq;           /* length of the run queue */\n\tint16_t t_dw;           /* jobs in ``disk wait'' (neg priority) */\n\tint16_t t_pw;           /* jobs in page wait */\n\tint16_t t_sl;           /* jobs sleeping in core */\n\tint16_t t_sw;           /* swapped out runnable/short block jobs */\n\tint32_t t_vm;           /* total virtual memory */\n\tint32_t t_avm;          /* active virtual memory */\n\tint32_t t_rm;           /* total real memory in use */\n\tint32_t t_arm;          /* active real memory */\n\tint32_t t_vmshr;        /* shared virtual memory */\n\tint32_t t_avmshr;       /* active shared virtual memory */\n\tint32_t t_rmshr;        /* shared real memory */\n\tint32_t t_armshr;       /* active shared real memory */\n\tint32_t t_free;         /* free memory pages */\n};\n\n#endif /*__APPLE_API_OBSOLETE */\n\n#endif /* !_SYS_VMMETER_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/vmparam.h",
    "content": "/*\n * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/*\n * Mach Operating System\n * Copyright (c) 1989 Carnegie-Mellon University\n * Copyright (c) 1988 Carnegie-Mellon University\n * All rights reserved.  The CMU software License Agreement specifies\n * the terms and conditions for use and redistribution.\n */\n/*\n * HISTORY\n */\n\n#ifndef _SYS_VMPARAM_H_\n#define _SYS_VMPARAM_H_\n\n/*\n * Machine dependent constants\n */\n\n#include <machine/vmparam.h>\n\n#endif  /* _SYS_VMPARAM_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/vnioctl.h",
    "content": "/*\n * Copyright (c) 2004-2006 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/*\n * Copyright (c) 1988 University of Utah.\n * Copyright (c) 1990, 1993\n *\tThe Regents of the University of California.  All rights reserved.\n *\n * This code is derived from software contributed to Berkeley by\n * the Systems Programming Group of the University of Utah Computer\n * Science Department.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *\tThis product includes software developed by the University of\n *\tCalifornia, Berkeley and its contributors.\n * 4. Neither the name of the University nor the names of its contributors\n *    may be used to endorse or promote products derived from this software\n *    without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n * from: Utah $Hdr: fdioctl.h 1.1 90/07/09$\n *\n *\t@(#)vnioctl.h\t8.1 (Berkeley) 6/10/93\n *\n * $FreeBSD: src/sys/sys/vnioctl.h,v 1.4 1999/09/17 05:33:58 dillon Exp $\n */\n\n#ifndef _SYS_VNIOCTL_H_\n#define _SYS_VNIOCTL_H_\n\n#include <sys/appleapiopts.h>\n#include <sys/cdefs.h>\n\n\n/*\n * Ioctl definitions for file (vnode) disk pseudo-device.\n */\n\n#define _PATH_VNTAB     \"/etc/vntab\"    /* default config file */\n\ntypedef enum {\n\tvncontrol_readwrite_io_e = 0\n} vncontrol_t;\n\nstruct vn_ioctl {\n\tchar *          vn_file;        /* pathname of file to mount */\n\tint                     vn_size;        /* (returned) size of disk */\n\tvncontrol_t     vn_control;\n};\n\n\n/*\n * Before you can use a unit, it must be configured with VNIOCSET.\n * The configuration persists across opens and closes of the device;\n * an VNIOCCLR must be used to reset a configuration.  An attempt to\n * VNIOCSET an already active unit will return EBUSY.\n */\n#define VNIOCATTACH     _IOWR('F', 0, struct vn_ioctl)  /* attach file */\n#define VNIOCDETACH     _IOWR('F', 1, struct vn_ioctl)  /* detach disk */\n#define VNIOCGSET       _IOWR('F', 2, u_int32_t )               /* set global option */\n#define VNIOCGCLEAR     _IOWR('F', 3, u_int32_t )               /* reset --//-- */\n#define VNIOCUSET       _IOWR('F', 4, u_int32_t )               /* set unit option */\n#define VNIOCUCLEAR     _IOWR('F', 5, u_int32_t )               /* reset --//-- */\n#define VNIOCSHADOW     _IOWR('F', 6, struct vn_ioctl)  /* attach shadow */\n\n#define VN_LABELS       0x1     /* Use disk(/slice) labels */\n#define VN_FOLLOW       0x2     /* Debug flow in vn driver */\n#define VN_DEBUG        0x4     /* Debug data in vn driver */\n#define VN_IO           0x8     /* Debug I/O in vn driver */\n#define VN_DONTCLUSTER  0x10    /* Don't cluster */\n#define VN_RESERVE      0x20    /* Pre-reserve swap */\n\n\n#endif  /* _SYS_VNIOCTL_H_*/\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/vnode.h",
    "content": "/*\n * Copyright (c) 2000-2017 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */\n/*\n * Copyright (c) 1989, 1993\n *\tThe Regents of the University of California.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *\tThis product includes software developed by the University of\n *\tCalifornia, Berkeley and its contributors.\n * 4. Neither the name of the University nor the names of its contributors\n *    may be used to endorse or promote products derived from this software\n *    without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n *\t@(#)vnode.h\t8.17 (Berkeley) 5/20/95\n */\n\n#ifndef _VNODE_H_\n#define _VNODE_H_\n\n#include <stdint.h>\n#include <sys/appleapiopts.h>\n#include <sys/cdefs.h>\n#include <stdint.h>\n\n/*\n * The vnode is the focus of all file activity in UNIX.  There is a\n * unique vnode allocated for each active file, each current directory,\n * each mounted-on file, text file, and the root.\n */\n\n/*\n * Vnode types.  VNON means no type.\n */\nenum vtype      {\n\t/* 0 */\n\tVNON,\n\t/* 1 - 5 */\n\tVREG, VDIR, VBLK, VCHR, VLNK,\n\t/* 6 - 10 */\n\tVSOCK, VFIFO, VBAD, VSTR, VCPLX\n};\n\n/*\n * Vnode tag types.\n * These are for the benefit of external programs only (e.g., pstat)\n * and should NEVER be inspected by the kernel.\n */\nenum vtagtype   {\n\t/* 0 */\n\tVT_NON,\n\t/* 1 reserved, overlaps with (CTL_VFS, VFS_NUMMNTOPS) */\n\tVT_UFS,\n\t/* 2 - 5 */\n\tVT_NFS, VT_MFS, VT_MSDOSFS, VT_LFS,\n\t/* 6 - 10 */\n\tVT_LOFS, VT_FDESC, VT_PORTAL, VT_NULL, VT_UMAP,\n\t/* 11 - 15 */\n\tVT_KERNFS, VT_PROCFS, VT_AFS, VT_ISOFS, VT_MOCKFS,\n\t/* 16 - 20 */\n\tVT_HFS, VT_ZFS, VT_DEVFS, VT_WEBDAV, VT_UDF,\n\t/* 21 - 25 */\n\tVT_AFP, VT_CDDA, VT_CIFS, VT_OTHER, VT_APFS,\n\t/* 26 - 27*/\n\tVT_LOCKERFS, VT_BINDFS,\n};\n\n#define HAVE_VT_LOCKERFS 1\n\n/*\n * flags for VNOP_BLOCKMAP\n */\n#define VNODE_READ      0x01\n#define VNODE_WRITE     0x02\n#define VNODE_BLOCKMAP_NO_TRACK 0x04 // APFS Fusion: Do not track this request\n#define VNODE_CLUSTER_VERIFY 0x08 // Verification will be performed in the cluster layer\n\n\n/* flags for VNOP_ALLOCATE */\n#define PREALLOCATE             0x00000001      /* preallocate allocation blocks */\n#define ALLOCATECONTIG  0x00000002      /* allocate contigious space */\n#define ALLOCATEALL             0x00000004      /* allocate all requested space */\n/* or no space at all */\n#define FREEREMAINDER   0x00000008      /* deallocate allocated but */\n/* unfilled blocks */\n#define ALLOCATEFROMPEOF        0x00000010      /* allocate from the physical eof */\n#define ALLOCATEFROMVOL         0x00000020      /* allocate from the volume offset */\n\n/*\n * Token indicating no attribute value yet assigned. some user source uses this\n */\n#define VNOVAL  (-1)\n\n\n\n/*\n * Structure for vnode level IO compression stats\n */\n\n#define IOCS_BUFFER_NUM_SIZE_BUCKETS         10\n#define IOCS_BUFFER_MAX_BUCKET               9\n#define IOCS_BUFFER_NUM_COMPRESSION_BUCKETS  7\n#define IOCS_BLOCK_NUM_SIZE_BUCKETS          16\n\nstruct io_compression_stats {\n\tuint64_t uncompressed_size;\n\tuint64_t compressed_size;\n\tuint32_t buffer_size_compression_dist[IOCS_BUFFER_NUM_SIZE_BUCKETS][IOCS_BUFFER_NUM_COMPRESSION_BUCKETS];\n\tuint32_t block_compressed_size_dist[IOCS_BLOCK_NUM_SIZE_BUCKETS];\n};\ntypedef struct io_compression_stats *io_compression_stats_t;\n\n#define IOCS_SBE_PATH_LEN             128\n#define IOCS_PATH_START_BYTES_TO_COPY 108\n#define IOCS_PATH_END_BYTES_TO_COPY   20 /* Includes null termination */\n\n#define IOCS_SYSCTL_LIVE                  0x00000001\n#define IOCS_SYSCTL_STORE_BUFFER_RD_ONLY  0x00000002\n#define IOCS_SYSCTL_STORE_BUFFER_MARK     0x00000004\n\nstruct iocs_store_buffer_entry {\n\tchar     path_name[IOCS_SBE_PATH_LEN];\n\tstruct io_compression_stats iocs;\n};\n\n#endif /* !_VNODE_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/vnode_if.h",
    "content": "/*\n * Copyright (c) 2000-2016 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/*\n * Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved\n * Copyright (c) 1992, 1993, 1994, 1995\n *\tThe Regents of the University of California.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *      This product includes software developed by the University of\n *      California, Berkeley and its contributors.\n * 4. Neither the name of the University nor the names of its contributors\n *    may be used to endorse or promote products derived from this software\n *    without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n */\n/*\n * NOTICE: This file was modified by SPARTA, Inc. in 2005 to introduce\n * support for mandatory and extensible security protections.  This notice\n * is included in support of clause 2.2 (b) of the Apple Public License,\n * Version 2.0.\n */\n\n/*\n * Warning: This file is generated automatically.\n * (Modifications made here may easily be lost!)\n *\n * Created by the script:\n *\t@(#)vnode_if.sh\t8.7 (Berkeley) 5/11/95\n */\n\n\n#ifndef _SYS_VNODE_IF_H_\n#define _SYS_VNODE_IF_H_\n\n#include <sys/appleapiopts.h>\n#include <sys/cdefs.h>\n#include <sys/kernel_types.h>\n#include <sys/buf.h>\n#include <mach/memory_object_types.h>\n\n\n#pragma clang diagnostic push\n#pragma clang diagnostic ignored \"-Wdocumentation\"\n\n\n#pragma clang diagnostic pop /* #pragma clang diagnostic ignored \"-Wdocumentation\" */\n#endif /* !_SYS_VNODE_IF_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/vsock.h",
    "content": "/*\n * Copyright (c) 2020 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n\n#ifndef _VSOCK_H_\n#define _VSOCK_H_\n\n#include <sys/cdefs.h>\n\n__BEGIN_DECLS\n\n#include <sys/_types/_sa_family_t.h>\n#include <sys/ucred.h>\n#include <sys/socketvar.h>\n\n#define VMADDR_CID_ANY (-1U)\n#define VMADDR_CID_HYPERVISOR 0\n#define VMADDR_CID_RESERVED 1\n#define VMADDR_CID_HOST 2\n\n#define VMADDR_PORT_ANY (-1U)\n\n#define IOCTL_VM_SOCKETS_GET_LOCAL_CID _IOR('s',  209, uint32_t)\n\nstruct sockaddr_vm {\n\t__uint8_t      svm_len;        /* total length */\n\tsa_family_t    svm_family;     /* Address family: AF_VSOCK */\n\t__uint16_t     svm_reserved1;\n\t__uint32_t     svm_port;       /* Port # in host byte order */\n\t__uint32_t     svm_cid;        /* Address in host byte order */\n} __attribute__((__packed__));\n\ntypedef u_quad_t vsock_gen_t;\n\nstruct xvsockpcb {\n\tu_int32_t      xv_len;            /* length of this structure */\n\tu_int64_t      xv_vsockpp;\n\tu_int32_t      xvp_local_cid;     /* local address cid */\n\tu_int32_t      xvp_local_port;    /* local address port */\n\tu_int32_t      xvp_remote_cid;    /* remote address cid */\n\tu_int32_t      xvp_remote_port;   /* remote address port */\n\tu_int32_t      xvp_rxcnt;         /* bytes received */\n\tu_int32_t      xvp_txcnt;         /* bytes transmitted */\n\tu_int32_t      xvp_peer_rxhiwat;  /* peer's receive buffer */\n\tu_int32_t      xvp_peer_rxcnt;    /* bytes received by peer */\n\tpid_t          xvp_last_pid;      /* last pid */\n\tvsock_gen_t    xvp_gencnt;        /* vsock generation count */\n\tstruct xsocket xv_socket;\n};\n\nstruct  xvsockpgen {\n\tu_int32_t      xvg_len;      /* length of this structure */\n\tu_int64_t      xvg_count;    /* number of PCBs at this time */\n\tvsock_gen_t    xvg_gen;      /* generation count at this time */\n\tso_gen_t       xvg_sogen;    /* current socket generation count */\n};\n\n__END_DECLS\n\n#endif /* _VSOCK_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/vstat.h",
    "content": "/*\n * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/* Copyright (c) 1998 Apple Computer, Inc. All Rights Reserved */\n/*-\n *\t@(#)vstat.h\n */\n\n#ifndef _SYS_VSTAT_H_\n#define _SYS_VSTAT_H_\n\n#include <sys/appleapiopts.h>\n#include <sys/cdefs.h>\n#include <sys/_types/_fsid_t.h>\n\n#warning obsolete header! delete the include from your sources\n\n#ifdef __APPLE_API_OBSOLETE\n\n#include <sys/time.h>\n#include <sys/attr.h>\n\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n\nstruct vstat {\n\tfsid_t                  vst_volid;              /* volume identifier */\n\tfsobj_id_t              vst_nodeid;             /* object's id */\n\tfsobj_type_t            vst_vnodetype;  /* vnode type (VREG, VDIR, etc.) */\n\tfsobj_tag_t             vst_vnodetag;   /* vnode tag (HFS, UFS, etc.) */\n\tmode_t                  vst_mode;               /* inode protection mode */\n\tnlink_t                 vst_nlink;              /* number of hard links */\n\tuid_t                   vst_uid;                /* user ID of the file's owner */\n\tgid_t                   vst_gid;                /* group ID of the file's group */\n\tdev_t                   vst_dev;                /* inode's device */\n\tdev_t                   vst_rdev;               /* device type */\n#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)\n\tstruct  timespec vst_atimespec; /* time of last access */\n\tstruct  timespec vst_mtimespec; /* time of last data modification */\n\tstruct  timespec vst_ctimespec; /* time of last file status change */\n#else\n\ttime_t                  vst_atime;              /* time of last access */\n\tlong                    vst_atimensec;  /* nsec of last access */\n\ttime_t                  vst_mtime;              /* time of last data modification */\n\tlong                    vst_mtimensec;  /* nsec of last data modification */\n\ttime_t                  vst_ctime;              /* time of last file status change */\n\tlong                    vst_ctimensec;  /* nsec of last file status change */\n#endif\n\toff_t                   vst_filesize;   /* file size, in bytes */\n\tquad_t                  vst_blocks;             /* bytes allocated for file */\n\tu_int32_t               vst_blksize;    /* optimal blocksize for I/O */\n\tu_int32_t               vst_flags;              /* user defined flags for file */\n};\n\n#endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */\n#endif /* __APPLE_API_OBSOLETE */\n\n#endif /* !_SYS_VSTAT_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/wait.h",
    "content": "/*\n * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */\n/*\n * Copyright (c) 1982, 1986, 1989, 1993, 1994\n *\tThe Regents of the University of California.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *\tThis product includes software developed by the University of\n *\tCalifornia, Berkeley and its contributors.\n * 4. Neither the name of the University nor the names of its contributors\n *    may be used to endorse or promote products derived from this software\n *    without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n *\t@(#)wait.h\t8.2 (Berkeley) 7/10/94\n */\n\n#ifndef _SYS_WAIT_H_\n#define _SYS_WAIT_H_\n\n#include <sys/cdefs.h>\n#include <sys/_types.h>\n\n/*\n * This file holds definitions relevent to the wait4 system call\n * and the alternate interfaces that use it (wait, wait3, waitpid).\n */\n\n/*\n * [XSI] The type idtype_t shall be defined as an enumeration type whose\n * possible values shall include at least P_ALL, P_PID, and P_PGID.\n */\ntypedef enum {\n\tP_ALL,\n\tP_PID,\n\tP_PGID\n} idtype_t;\n\n/*\n * [XSI] The id_t and pid_t types shall be defined as described\n * in <sys/types.h>\n */\n#include <sys/_types/_pid_t.h>\n#include <sys/_types/_id_t.h>\n\n/*\n * [XSI] The siginfo_t type shall be defined as described in <signal.h>\n * [XSI] The rusage structure shall be defined as described in <sys/resource.h>\n * [XSI] Inclusion of the <sys/wait.h> header may also make visible all\n * symbols from <signal.h> and <sys/resource.h>\n *\n * NOTE:\tThis requirement is currently being satisfied by the direct\n *\t\tinclusion of <sys/signal.h> and <sys/resource.h>, below.\n *\n *\t\tSoftware should not depend on the exposure of anything other\n *\t\tthan the types siginfo_t and struct rusage as a result of\n *\t\tthis inclusion.  If you depend on any types or manifest\n *\t\tvalues othe than siginfo_t and struct rusage from either of\n *\t\tthose files, you should explicitly include them yourself, as\n *\t\twell, or in future releases your stware may not compile\n *\t\twithout modification.\n */\n#include <sys/signal.h>         /* [XSI] for siginfo_t */\n#include <sys/resource.h>       /* [XSI] for struct rusage */\n\n/*\n * Option bits for the third argument of wait4.  WNOHANG causes the\n * wait to not hang if there are no stopped or terminated processes, rather\n * returning an error indication in this case (pid==0).  WUNTRACED\n * indicates that the caller should receive status about untraced children\n * which stop due to signals.  If children are stopped and a wait without\n * this option is done, it is as though they were still running... nothing\n * about them is returned.\n */\n#define WNOHANG         0x00000001  /* [XSI] no hang in wait/no child to reap */\n#define WUNTRACED       0x00000002  /* [XSI] notify on stop, untraced child */\n\n/*\n * Macros to test the exit status returned by wait\n * and extract the relevant values.\n */\n#if defined(_POSIX_C_SOURCE) && !defined(_DARWIN_C_SOURCE)\n#define _W_INT(i)       (i)\n#else\n#define _W_INT(w)       (*(int *)&(w))  /* convert union wait to int */\n#define WCOREFLAG       0200\n#endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */\n\n/* These macros are permited, as they are in the implementation namespace */\n#define _WSTATUS(x)     (_W_INT(x) & 0177)\n#define _WSTOPPED       0177            /* _WSTATUS if process is stopped */\n\n/*\n * [XSI] The <sys/wait.h> header shall define the following macros for\n * analysis of process status values\n */\n#if __DARWIN_UNIX03\n#define WEXITSTATUS(x)  ((_W_INT(x) >> 8) & 0x000000ff)\n#else /* !__DARWIN_UNIX03 */\n#define WEXITSTATUS(x)  (_W_INT(x) >> 8)\n#endif /* !__DARWIN_UNIX03 */\n/* 0x13 == SIGCONT */\n#define WSTOPSIG(x)     (_W_INT(x) >> 8)\n#define WIFCONTINUED(x) (_WSTATUS(x) == _WSTOPPED && WSTOPSIG(x) == 0x13)\n#define WIFSTOPPED(x)   (_WSTATUS(x) == _WSTOPPED && WSTOPSIG(x) != 0x13)\n#define WIFEXITED(x)    (_WSTATUS(x) == 0)\n#define WIFSIGNALED(x)  (_WSTATUS(x) != _WSTOPPED && _WSTATUS(x) != 0)\n#define WTERMSIG(x)     (_WSTATUS(x))\n#if (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))\n#define WCOREDUMP(x)    (_W_INT(x) & WCOREFLAG)\n\n#define W_EXITCODE(ret, sig)    ((ret) << 8 | (sig))\n#define W_STOPCODE(sig)         ((sig) << 8 | _WSTOPPED)\n#endif /* (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) */\n\n/*\n * [XSI] The following symbolic constants shall be defined as possible\n * values for the fourth argument to waitid().\n */\n/* WNOHANG already defined for wait4() */\n/* WUNTRACED defined for wait4() but not for waitid() */\n#define WEXITED         0x00000004  /* [XSI] Processes which have exitted */\n#if __DARWIN_UNIX03\n/* waitid() parameter */\n#define WSTOPPED        0x00000008  /* [XSI] Any child stopped by signal */\n#endif\n#define WCONTINUED      0x00000010  /* [XSI] Any child stopped then continued */\n#define WNOWAIT         0x00000020  /* [XSI] Leave process returned waitable */\n\n\n#if (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))\n/* POSIX extensions and 4.2/4.3 compatability: */\n\n/*\n * Tokens for special values of the \"pid\" parameter to wait4.\n */\n#define WAIT_ANY        (-1)    /* any process */\n#define WAIT_MYPGRP     0       /* any process in my process group */\n\n#include <machine/endian.h>\n\n/*\n * Deprecated:\n * Structure of the information in the status word returned by wait4.\n * If w_stopval==_WSTOPPED, then the second structure describes\n * the information returned, else the first.\n */\nunion wait {\n\tint     w_status;               /* used in syscall */\n\t/*\n\t * Terminated process status.\n\t */\n\tstruct {\n#if __DARWIN_BYTE_ORDER == __DARWIN_LITTLE_ENDIAN\n\t\tunsigned int    w_Termsig:7,    /* termination signal */\n\t\t    w_Coredump:1,               /* core dump indicator */\n\t\t    w_Retcode:8,                /* exit code if w_termsig==0 */\n\t\t    w_Filler:16;                /* upper bits filler */\n#endif\n#if __DARWIN_BYTE_ORDER == __DARWIN_BIG_ENDIAN\n\t\tunsigned int    w_Filler:16,    /* upper bits filler */\n\t\t    w_Retcode:8,                /* exit code if w_termsig==0 */\n\t\t    w_Coredump:1,               /* core dump indicator */\n\t\t    w_Termsig:7;                /* termination signal */\n#endif\n\t} w_T;\n\t/*\n\t * Stopped process status.  Returned\n\t * only for traced children unless requested\n\t * with the WUNTRACED option bit.\n\t */\n\tstruct {\n#if __DARWIN_BYTE_ORDER == __DARWIN_LITTLE_ENDIAN\n\t\tunsigned int    w_Stopval:8,    /* == W_STOPPED if stopped */\n\t\t    w_Stopsig:8,                /* signal that stopped us */\n\t\t    w_Filler:16;                /* upper bits filler */\n#endif\n#if __DARWIN_BYTE_ORDER == __DARWIN_BIG_ENDIAN\n\t\tunsigned int    w_Filler:16,    /* upper bits filler */\n\t\t    w_Stopsig:8,                /* signal that stopped us */\n\t\t    w_Stopval:8;                /* == W_STOPPED if stopped */\n#endif\n\t} w_S;\n};\n#define w_termsig       w_T.w_Termsig\n#define w_coredump      w_T.w_Coredump\n#define w_retcode       w_T.w_Retcode\n#define w_stopval       w_S.w_Stopval\n#define w_stopsig       w_S.w_Stopsig\n\n#endif /* (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) */\n\n#if !(__DARWIN_UNIX03 - 0)\n/*\n * Stopped state value; cannot use waitid() parameter of the same name\n * in the same scope\n */\n#define WSTOPPED        _WSTOPPED\n#endif /* !__DARWIN_UNIX03 */\n\n__BEGIN_DECLS\npid_t   wait(int *) __DARWIN_ALIAS_C(wait);\npid_t   waitpid(pid_t, int *, int) __DARWIN_ALIAS_C(waitpid);\n#ifndef _ANSI_SOURCE\nint     waitid(idtype_t, id_t, siginfo_t *, int) __DARWIN_ALIAS_C(waitid);\n#endif /* !_ANSI_SOURCE */\n#if  (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))\npid_t   wait3(int *, int, struct rusage *);\npid_t   wait4(pid_t, int *, int, struct rusage *);\n#endif /* (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) */\n__END_DECLS\n#endif /* !_SYS_WAIT_H_ */\n"
  },
  {
    "path": "cross-macos/sysroot/macos-12/usr/include/sys/xattr.h",
    "content": "/*\n * Copyright (c) 2004-2012 Apple Inc. All rights reserved.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. The rights granted to you under the License\n * may not be used to create, or enable the creation or redistribution of,\n * unlawful or unlicensed copies of an Apple operating system, or to\n * circumvent, violate, or enable the circumvention or violation of, any\n * terms of an Apple operating system software license agreement.\n *\n * Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_OSREFERENCE_LICENSE_HEADER_END@\n */\n\n#ifndef _SYS_XATTR_H_\n#define _SYS_XATTR_H_\n\n#include <sys/types.h>\n\n/* Options for pathname based xattr calls */\n#define XATTR_NOFOLLOW   0x0001     /* Don't follow symbolic links */\n\n/* Options for setxattr calls */\n#define XATTR_CREATE     0x0002     /* set the value, fail if attr already exists */\n#define XATTR_REPLACE    0x0004     /* set the value, fail if attr does not exist */\n\n/* Set this to bypass authorization checking (eg. if doing auth-related work) */\n#define XATTR_NOSECURITY 0x0008\n\n/* Set this to bypass the default extended attribute file (dot-underscore file) */\n#define XATTR_NODEFAULT  0x0010\n\n/* option for f/getxattr() and f/listxattr() to expose the HFS Compression extended attributes */\n#define XATTR_SHOWCOMPRESSION 0x0020\n\n#define XATTR_MAXNAMELEN   127\n\n/* See the ATTR_CMN_FNDRINFO section of getattrlist(2) for details on FinderInfo */\n#define XATTR_FINDERINFO_NAME     \"com.apple.FinderInfo\"\n\n#define XATTR_RESOURCEFORK_NAME   \"com.apple.ResourceFork\"\n\n\n\n__BEGIN_DECLS\n\nssize_t getxattr(const char *path, const char *name, void *value, size_t size, u_int32_t position, int options);\n\nssize_t fgetxattr(int fd, const char *name, void *value, size_t size, u_int32_t position, int options);\n\nint setxattr(const char *path, const char *name, const void *value, size_t size, u_int32_t position, int options);\n\nint fsetxattr(int fd, const char *name, const void *value, size_t size, u_int32_t position, int options);\n\nint removexattr(const char *path, const char *name, int options);\n\nint fremovexattr(int fd, const char *name, int options);\n\nssize_t listxattr(const char *path, char *namebuff, size_t size, int options);\n\nssize_t flistxattr(int fd, char *namebuff, size_t size, int options);\n\n__END_DECLS\n\n#endif /* _SYS_XATTR_H_ */\n"
  },
  {
    "path": "cross-windows/TraceLoggingProvider.h",
    "content": ""
  },
  {
    "path": "cross-windows/VersionHelpers.h",
    "content": "#include <versionhelpers.h>"
  },
  {
    "path": "cross-windows/Windows.h",
    "content": "#include <windows.h>"
  },
  {
    "path": "cross-windows/src/base/win32-headers.h",
    "content": "// Copyright 2012 the V8 project authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n#ifndef V8_BASE_WIN32_HEADERS_H_\n#define V8_BASE_WIN32_HEADERS_H_\n\n// This file contains defines and typedefs that allow popular Windows types to\n// be used without the overhead of including windows.h.\n// This file no longer includes windows.h but it still sets the defines that\n// tell windows.h to omit some includes so that the V8 source files that do\n// include windows.h will still get the minimal version.\n\n#ifndef WIN32_LEAN_AND_MEAN\n// WIN32_LEAN_AND_MEAN implies NOCRYPT and NOGDI.\n#define WIN32_LEAN_AND_MEAN\n#endif\n#ifndef NOMINMAX\n#define NOMINMAX\n#endif\n#ifndef NOKERNEL\n#define NOKERNEL\n#endif\n#ifndef NOUSER\n#define NOUSER\n#endif\n#ifndef NOSERVICE\n#define NOSERVICE\n#endif\n#ifndef NOSOUND\n#define NOSOUND\n#endif\n#ifndef NOMCX\n#define NOMCX\n#endif\n#ifndef _WIN32_WINNT\n#error This should be set in build config files. See build\\config\\win\\BUILD.gn\n#endif\n\n#include <signal.h>  // For raise().\n#include <time.h>  // For LocalOffset() implementation.\n#if !defined(__MINGW32__) || defined(__MINGW64_VERSION_MAJOR)\n#include <errno.h>           // For STRUNCATE\n#endif  // !defined(__MINGW32__) || defined(__MINGW64_VERSION_MAJOR)\n#include <limits.h>  // For INT_MAX and al.\n#include <process.h>  // For _beginthreadex().\n#include <stdlib.h>\n\n// typedef and define the most commonly used Windows integer types.\n\ntypedef int BOOL;             // NOLINT(runtime/int)\ntypedef unsigned long DWORD;  // NOLINT(runtime/int)\ntypedef long LONG;            // NOLINT(runtime/int)\ntypedef void* LPVOID;\ntypedef void* PVOID;\ntypedef void* HANDLE;\n\n#define WINAPI __stdcall\n\n#if defined(_WIN64)\ntypedef unsigned __int64 ULONG_PTR, *PULONG_PTR;\n#else\ntypedef __w64 unsigned long ULONG_PTR, *PULONG_PTR;  // NOLINT(runtime/int)\n#endif\n\ntypedef struct _RTL_SRWLOCK SRWLOCK;\ntypedef struct _RTL_CONDITION_VARIABLE CONDITION_VARIABLE;\ntypedef struct _RTL_CRITICAL_SECTION CRITICAL_SECTION;\ntypedef struct _RTL_CRITICAL_SECTION_DEBUG* PRTL_CRITICAL_SECTION_DEBUG;\n\n// Declare V8 versions of some Windows structures. These are needed for\n// when we need a concrete type but don't want to pull in Windows.h. We can't\n// declare the Windows types so we declare our types and cast to the Windows\n// types in a few places. The sizes must match the Windows types so we verify\n// that with static asserts in platform-win32.cc.\n// ChromeToWindowsType functions are provided for pointer conversions.\n\nstruct V8_SRWLOCK {\n  PVOID Ptr;\n};\n\nstruct V8_CONDITION_VARIABLE {\n  PVOID Ptr;\n};\n\nstruct V8_CRITICAL_SECTION {\n  PRTL_CRITICAL_SECTION_DEBUG DebugInfo;\n  LONG LockCount;\n  LONG RecursionCount;\n  HANDLE OwningThread;\n  HANDLE LockSemaphore;\n  ULONG_PTR SpinCount;\n};\n\ninline SRWLOCK* V8ToWindowsType(V8_SRWLOCK* p) {\n  return reinterpret_cast<SRWLOCK*>(p);\n}\n\ninline const SRWLOCK* V8ToWindowsType(const V8_SRWLOCK* p) {\n  return reinterpret_cast<const SRWLOCK*>(p);\n}\n\ninline CONDITION_VARIABLE* V8ToWindowsType(V8_CONDITION_VARIABLE* p) {\n  return reinterpret_cast<CONDITION_VARIABLE*>(p);\n}\n\ninline const CONDITION_VARIABLE* V8ToWindowsType(\n    const V8_CONDITION_VARIABLE* p) {\n  return reinterpret_cast<const CONDITION_VARIABLE*>(p);\n}\n\ninline CRITICAL_SECTION* V8ToWindowsType(V8_CRITICAL_SECTION* p) {\n  return reinterpret_cast<CRITICAL_SECTION*>(p);\n}\n\ninline const CRITICAL_SECTION* V8ToWindowsType(const V8_CRITICAL_SECTION* p) {\n  return reinterpret_cast<const CRITICAL_SECTION*>(p);\n}\n\n/// Begin custom config.\n\nextern \"C\" {\n\n#define MEM_COALESCE_PLACEHOLDERS 0x00000001\n#define MEM_PRESERVE_PLACEHOLDER  0x00000002\n#define MEM_REPLACE_PLACEHOLDER 0x00004000\n#define MEM_RESERVE_PLACEHOLDER 0x00040000\n\n#include <minwindef.h>\n#include <winnt.h>\n#undef DELETE\n#undef IN\n\n// V8 will use it's own bit operations.\n#undef RotateRight32\n#undef RotateLeft32\n\n}\n\n/// End custom config.\n\n#endif  // V8_BASE_WIN32_HEADERS_H_\n"
  },
  {
    "path": "parse_deps.py",
    "content": "#!/usr/bin/env python\n\n# Parses DEPS file and outputs json.\n# The DEPS file is just python code so we capture the vars in exec and convert to json.\n\nimport sys\nimport json\n\ndef Var(arg):\n    return '@' + arg\n\ndef main():\n    deps_file = open(sys.argv[1], \"r\")\n    deps_str = deps_file.read()\n    deps_file.close()\n\n    out = {}\n    exec(deps_str, globals(), out)\n    print(json.dumps(out))\n\nif __name__ == \"__main__\":\n    main()"
  },
  {
    "path": "patches/v8.patch",
    "content": "diff --git a/BUILD.gn b/BUILD.gn\nindex e7b5853..1aa161a 100644\n--- a/BUILD.gn\n+++ b/BUILD.gn\n@@ -1342,7 +1342,7 @@ config(\"toolchain\") {\n     }\n   }\n \n-  if (is_win) {\n+  if (is_win && !use_zig_tc) {\n     cflags += [\n       \"/wd4245\",  # Conversion with signed/unsigned mismatch.\n       \"/wd4267\",  # Conversion with possible loss of data.\n@@ -1364,7 +1364,7 @@ config(\"toolchain\") {\n     ]\n   }\n \n-  if (!is_clang && is_win) {\n+  if (!is_clang && is_win && !use_zig_tc) {\n     cflags += [\n       \"/wd4506\",  # Benign \"no definition for inline function\"\n \ndiff --git a/src/ast/ast.cc b/src/ast/ast.cc\nindex 34a26d9..bc79e17 100644\n--- a/src/ast/ast.cc\n+++ b/src/ast/ast.cc\n@@ -30,6 +30,10 @@\n #include \"src/strings/string-stream.h\"\n #include \"src/zone/zone-list-inl.h\"\n \n+// Turn off mingw defines since we're using them as tokens in the file.\n+#pragma push_macro(\"VOID\")\n+#undef VOID\n+\n namespace v8 {\n namespace internal {\n \n@@ -1140,5 +1144,7 @@ const char* CallRuntime::debug_name() {\n #endif  // DEBUG\n }\n \n+#pragma pop_macro(\"VOID\")\n+\n }  // namespace internal\n }  // namespace v8\ndiff --git a/src/ast/prettyprinter.cc b/src/ast/prettyprinter.cc\nindex e0cb7da..043b92e 100644\n--- a/src/ast/prettyprinter.cc\n+++ b/src/ast/prettyprinter.cc\n@@ -15,6 +15,10 @@\n #include \"src/regexp/regexp-flags.h\"\n #include \"src/strings/string-builder-inl.h\"\n \n+// Turn off mingw defines since we're using them as tokens in the file.\n+#pragma push_macro(\"VOID\")\n+#undef VOID\n+\n namespace v8 {\n namespace internal {\n \n@@ -1484,5 +1488,7 @@ void AstPrinter::VisitSuperCallReference(SuperCallReference* node) {\n \n #endif  // DEBUG\n \n+#pragma pop_macro(\"VOID\")\n+\n }  // namespace internal\n }  // namespace v8\ndiff --git a/src/base/bits.h b/src/base/bits.h\nindex 2d61878..831b91c 100644\n--- a/src/base/bits.h\n+++ b/src/base/bits.h\n@@ -243,7 +243,6 @@ inline uint32_t RoundDownToPowerOfTwo32(uint32_t value) {\n   return result;\n }\n \n-\n // Precondition: 0 <= shift < 32\n inline constexpr uint32_t RotateRight32(uint32_t value, uint32_t shift) {\n   return (value >> shift) | (value << ((32 - shift) & 31));\ndiff --git a/src/base/platform/platform-win32.cc b/src/base/platform/platform-win32.cc\nindex 0eedaba..14638de 100644\n--- a/src/base/platform/platform-win32.cc\n+++ b/src/base/platform/platform-win32.cc\n@@ -78,14 +78,14 @@ inline void MemoryFence() {\n \n #endif  // __MINGW64_VERSION_MAJOR\n \n-\n+// Already included by mingw\n+/*\n int localtime_s(tm* out_tm, const time_t* time) {\n   tm* posix_local_time_struct = localtime_r(time, out_tm);\n   if (posix_local_time_struct == nullptr) return 1;\n   return 0;\n }\n \n-\n int fopen_s(FILE** pFile, const char* filename, const char* mode) {\n   *pFile = fopen(filename, mode);\n   return *pFile != nullptr ? 0 : 1;\n@@ -128,6 +128,7 @@ int strncpy_s(char* dest, size_t dest_size, const char* source, size_t count) {\n   *dest = 0;\n   return 0;\n }\n+*/\n \n #endif  // __MINGW32__\n \ndiff --git a/src/compiler/revectorizer.cc b/src/compiler/revectorizer.cc\nindex a680934..d433ec4 100644\n--- a/src/compiler/revectorizer.cc\n+++ b/src/compiler/revectorizer.cc\n@@ -739,7 +739,7 @@ Node* Revectorizer::VectorizeTree(PackNode* pnode) {\n                   edge.to()->op()->mnemonic());\n \n             if (!input_128) {\n-              TRACE(\"Create ExtractF128(%lu) node from #%d\\n\", i,\n+              TRACE(\"Create ExtractF128(%zu) node from #%d\\n\", i,\n                     new_node->id());\n               input_128 = graph()->NewNode(\n                   mcgraph()->machine()->ExtractF128(int32_t(i)), new_node);\ndiff --git a/src/interpreter/bytecode-generator.cc b/src/interpreter/bytecode-generator.cc\nindex 706d897..5b0aac0 100644\n--- a/src/interpreter/bytecode-generator.cc\n+++ b/src/interpreter/bytecode-generator.cc\n@@ -36,6 +36,10 @@\n #include \"src/parsing/token.h\"\n #include \"src/utils/ostreams.h\"\n \n+// Turn off mingw defines since we're using them as tokens in the file.\n+#pragma push_macro(\"VOID\")\n+#undef VOID\n+\n namespace v8 {\n namespace internal {\n namespace interpreter {\n@@ -7411,3 +7415,5 @@ FeedbackSlot BytecodeGenerator::GetDummyCompareICSlot() {\n }  // namespace interpreter\n }  // namespace internal\n }  // namespace v8\n+\n+#pragma push_macro(\"VOID\")\ndiff --git a/src/interpreter/bytecode-generator.h b/src/interpreter/bytecode-generator.h\nindex 63174d4..6188067 100644\n--- a/src/interpreter/bytecode-generator.h\n+++ b/src/interpreter/bytecode-generator.h\n@@ -13,6 +13,10 @@\n #include \"src/objects/feedback-vector.h\"\n #include \"src/objects/function-kind.h\"\n \n+// Turn off mingw defines since we're using them as tokens in the file.\n+#pragma push_macro(\"VOID\")\n+#undef VOID\n+\n namespace v8 {\n namespace internal {\n \n@@ -562,4 +566,6 @@ class BytecodeGenerator final : public AstVisitor<BytecodeGenerator> {\n }  // namespace internal\n }  // namespace v8\n \n+#pragma pop_macro(\"VOID\")\n+\n #endif  // V8_INTERPRETER_BYTECODE_GENERATOR_H_\ndiff --git a/src/parsing/keywords-gen.h b/src/parsing/keywords-gen.h\nindex 3a8101b..232a16c 100644\n--- a/src/parsing/keywords-gen.h\n+++ b/src/parsing/keywords-gen.h\n@@ -10,6 +10,12 @@\n \n #include \"src/parsing/token.h\"\n \n+// Turn off mingw defines since we're using them as tokens in the file.\n+#pragma push_macro(\"CONST\")\n+#pragma push_macro(\"VOID\")\n+#undef CONST\n+#undef VOID\n+\n namespace v8 {\n namespace internal {\n \n@@ -174,4 +180,7 @@ inline Token::Value PerfectKeywordHash::GetToken(const char* str, int len) {\n }  // namespace internal\n }  // namespace v8\n \n+#pragma pop_macro(\"VOID\")\n+#pragma pop_macro(\"CONST\")\n+\n #endif  // V8_PARSING_KEYWORDS_GEN_H_\ndiff --git a/src/parsing/parser-base.h b/src/parsing/parser-base.h\nindex 740a02e..a3dbd19 100644\n--- a/src/parsing/parser-base.h\n+++ b/src/parsing/parser-base.h\n@@ -31,6 +31,10 @@\n #include \"src/regexp/regexp.h\"\n #include \"src/zone/zone-chunk-list.h\"\n \n+// Turn off mingw defines since we're using them as tokens in the file.\n+#pragma push_macro(\"CONST\")\n+#undef CONST\n+\n namespace v8 {\n namespace internal {\n \n@@ -6548,4 +6552,6 @@ void ParserBase<Impl>::CheckClassFieldName(IdentifierT name, bool is_static) {\n }  // namespace internal\n }  // namespace v8\n \n+#pragma pop_macro(\"CONST\")\n+\n #endif  // V8_PARSING_PARSER_BASE_H_\ndiff --git a/src/parsing/parser.cc b/src/parsing/parser.cc\nindex aba8ca6..47ca6f1 100644\n--- a/src/parsing/parser.cc\n+++ b/src/parsing/parser.cc\n@@ -33,6 +33,10 @@\n #include \"src/tracing/trace-event.h\"\n #include \"src/zone/zone-list-inl.h\"\n \n+// Turn off mingw defines since we're using them as tokens in the file.\n+#pragma push_macro(\"CONST\")\n+#undef CONST\n+\n namespace v8 {\n namespace internal {\n \n@@ -3681,3 +3685,5 @@ Statement* Parser::CheckCallable(Variable* var, Expression* error, int pos) {\n \n }  // namespace internal\n }  // namespace v8\n+\n+#pragma pop_macro(\"CONST\")\ndiff --git a/src/parsing/token.h b/src/parsing/token.h\nindex dabbff0..db8f327 100644\n--- a/src/parsing/token.h\n+++ b/src/parsing/token.h\n@@ -10,6 +10,12 @@\n #include \"src/base/logging.h\"\n #include \"src/common/globals.h\"\n \n+// Turn off mingw defines since we're using them as tokens in the file.\n+#pragma push_macro(\"CONST\")\n+#pragma push_macro(\"VOID\")\n+#undef CONST\n+#undef VOID\n+\n namespace v8 {\n namespace internal {\n \n@@ -349,4 +355,7 @@ class V8_EXPORT_PRIVATE Token {\n }  // namespace internal\n }  // namespace v8\n \n+#pragma pop_macro(\"VOID\")\n+#pragma pop_macro(\"CONST\")\n+\n #endif  // V8_PARSING_TOKEN_H_\ndiff --git a/src/profiler/heap-snapshot-generator.cc b/src/profiler/heap-snapshot-generator.cc\nindex 763a540..6637f15 100644\n--- a/src/profiler/heap-snapshot-generator.cc\n+++ b/src/profiler/heap-snapshot-generator.cc\n@@ -400,7 +400,8 @@ HeapSnapshot::HeapSnapshot(HeapProfiler* profiler,\n   static_assert(kSystemPointerSize != 4 || sizeof(HeapGraphEdge) == 12);\n   static_assert(kSystemPointerSize != 8 || sizeof(HeapGraphEdge) == 24);\n   static_assert(kSystemPointerSize != 4 || sizeof(HeapEntry) == 32);\n-#if V8_CC_MSVC\n+// Since clang MINGW will use -mms-bitfields by default, it should have the same struct layout as MSVC.\n+#if V8_CC_MSVC || V8_CC_MINGW\n   static_assert(kSystemPointerSize != 8 || sizeof(HeapEntry) == 48);\n #else   // !V8_CC_MSVC\n   static_assert(kSystemPointerSize != 8 || sizeof(HeapEntry) == 40);\n"
  },
  {
    "path": "patches/v8_build.patch",
    "content": "diff --git a/config/BUILD.gn b/config/BUILD.gn\nindex 35c9a6275..37fd23e98 100644\n--- a/config/BUILD.gn\n+++ b/config/BUILD.gn\n@@ -289,7 +289,7 @@ group(\"shared_library_deps\") {\n # Executable configs -----------------------------------------------------------\n \n # Windows linker setup for EXEs and DLLs.\n-if (is_win) {\n+if (is_win && !use_zig_tc) {\n   _windows_linker_configs = [\n     \"//build/config/win:sdk_link\",\n     \"//build/config/win:common_linker_setup\",\n@@ -300,9 +300,9 @@ if (is_win) {\n config(\"executable_config\") {\n   configs = []\n \n-  if (is_win) {\n+  if (is_win && !use_zig_tc) {\n     configs += _windows_linker_configs\n-  } else if (is_mac) {\n+  } else if (is_mac && !use_zig_tc) {\n     configs += [ \"//build/config/mac:mac_dynamic_flags\" ]\n   } else if (is_ios) {\n     configs += [\n@@ -332,9 +332,9 @@ config(\"executable_config\") {\n config(\"shared_library_config\") {\n   configs = []\n \n-  if (is_win) {\n+  if (is_win && !use_zig_tc) {\n     configs += _windows_linker_configs\n-  } else if (is_mac) {\n+  } else if (is_mac && !use_zig_tc) {\n     configs += [ \"//build/config/mac:mac_dynamic_flags\" ]\n   } else if (is_ios) {\n     configs += [\ndiff --git a/config/BUILDCONFIG.gn b/config/BUILDCONFIG.gn\nindex cc7e92ddb..2d1db7e2a 100644\n--- a/config/BUILDCONFIG.gn\n+++ b/config/BUILDCONFIG.gn\n@@ -158,6 +158,15 @@ declare_args() {\n   # DON'T ADD MORE FLAGS HERE. Read the comment above.\n }\n \n+declare_args() {\n+  use_zig_tc = false\n+  cxx_use_ld = \"ldd\"\n+  zig_cc = \"\"\n+  zig_cxx = \"\"\n+  host_zig_cc = \"\"\n+  host_zig_cxx = \"\"\n+}\n+\n declare_args() {\n   # Debug build. Enabling official builds automatically sets is_debug to false.\n   is_debug = !is_official_build\n@@ -354,7 +363,7 @@ default_compiler_configs = [\n   \"//build/config/sanitizers:default_sanitizer_flags\",\n ]\n \n-if (is_win) {\n+if (is_win && !use_zig_tc) {\n   default_compiler_configs += [\n     \"//build/config/win:default_cfg_compiler\",\n     \"//build/config/win:default_crt\",\n@@ -411,7 +420,7 @@ set_defaults(\"rust_proc_macro\") {\n \n # Compute the set of configs common to all linked targets (shared libraries,\n # loadable modules, executables) to avoid duplication below.\n-if (is_win) {\n+if (is_win && !use_zig_tc) {\n   # Many targets remove these configs, so they are not contained within\n   # //build/config:executable_config for easy removal.\n   _linker_configs = [\n@@ -421,7 +430,7 @@ if (is_win) {\n     # that shouldn't use the windows subsystem.\n     \"//build/config/win:console\",\n   ]\n-} else if (is_mac) {\n+} else if (is_mac && !use_zig_tc) {\n   _linker_configs = [ \"//build/config/mac:strip_all\" ]\n } else {\n   _linker_configs = []\n@@ -433,7 +442,7 @@ default_executable_configs = default_compiler_configs + [\n                                \"//build/config:executable_config\",\n                              ] + _linker_configs\n \n-if (is_win) {\n+if (is_win && !use_zig_tc) {\n   # Turn on linker CFI for executables, and position it so it can be removed\n   # if needed.\n   default_executable_configs += [ \"//build/config/win:cfi_linker\" ]\n@@ -449,7 +458,7 @@ default_shared_library_configs = default_compiler_configs + [\n                                    \"//build/config:default_libs\",\n                                    \"//build/config:shared_library_config\",\n                                  ] + _linker_configs\n-if (is_win) {\n+if (is_win && !use_zig_tc) {\n   # Turn on linker CFI for DLLs, and position it so it can be removed if needed.\n   default_shared_library_configs += [ \"//build/config/win:cfi_linker\" ]\n }\ndiff --git a/config/compiler/BUILD.gn b/config/compiler/BUILD.gn\nindex 50be57ff8..ddac52169 100644\n--- a/config/compiler/BUILD.gn\n+++ b/config/compiler/BUILD.gn\n@@ -263,7 +263,7 @@ config(\"compiler\") {\n   # System-specific flags. If your compiler flags apply to one of the\n   # categories here, add it to the associated file to keep this shared config\n   # smaller.\n-  if (is_win) {\n+  if (is_win && !use_zig_tc) {\n     configs += [ \"//build/config/win:compiler\" ]\n   } else if (is_android) {\n     configs += [ \"//build/config/android:compiler\" ]\n@@ -271,7 +271,7 @@ config(\"compiler\") {\n     configs += [ \"//build/config/linux:compiler\" ]\n   } else if (is_nacl) {\n     configs += [ \"//build/config/nacl:compiler\" ]\n-  } else if (is_mac) {\n+  } else if (is_mac && !use_zig_tc) {\n     configs += [ \"//build/config/mac:compiler\" ]\n   } else if (is_ios) {\n     configs += [ \"//build/config/ios:compiler\" ]\n@@ -292,6 +292,11 @@ config(\"compiler\") {\n     \":compiler_deterministic\",\n   ]\n \n+  if (use_zig_tc) {\n+    # We'll provide the target flags from build.zig.\n+    configs -= [ \":compiler_cpu_abi\" ]\n+  }\n+\n   # Here we enable -fno-delete-null-pointer-checks, which makes various nullptr\n   # operations (e.g. dereferencing) into defined behavior. This avoids deletion\n   # of some security-critical code: see https://crbug.com/1139129.\n@@ -344,7 +349,7 @@ config(\"compiler\") {\n     }\n \n     if (use_lld) {\n-      ldflags += [ \"-fuse-ld=lld\" ]\n+      ldflags += [ \"-fuse-ld=${cxx_use_ld}\" ]\n       if (lld_path != \"\") {\n         ldflags += [ \"-B$lld_path\" ]\n       }\n@@ -562,7 +567,7 @@ config(\"compiler\") {\n     }\n \n     # TODO(crbug.com/1235145): Investigate why/if this should be needed.\n-    if (is_win) {\n+    if (is_win && !use_zig_tc) {\n       cflags += [ \"/clang:-ffp-contract=off\" ]\n     } else {\n       cflags += [ \"-ffp-contract=off\" ]\n@@ -621,7 +626,7 @@ config(\"compiler\") {\n       # support \"c++20\"/\"gnu++20\".\n       cflags_cc += [ \"-std=${standard_prefix}++2a\" ]\n     }\n-  } else if (is_win) {\n+  } else if (is_win && !use_zig_tc) {\n     cflags_c += [ \"/std:c11\" ]\n     if (use_cxx17 || (!is_clang && defined(msvc_use_cxx17) && msvc_use_cxx17)) {\n       cflags_cc += [ \"/std:c++17\" ]\n@@ -1473,7 +1478,7 @@ config(\"runtime_library\") {\n   # System-specific flags. If your compiler flags apply to one of the\n   # categories here, add it to the associated file to keep this shared config\n   # smaller.\n-  if (is_win) {\n+  if (is_win && !use_zig_tc) {\n     configs += [ \"//build/config/win:runtime_library\" ]\n   } else if (is_linux || is_chromeos) {\n     configs += [ \"//build/config/linux:runtime_library\" ]\n@@ -1483,7 +1488,9 @@ config(\"runtime_library\") {\n   } else if (is_ios) {\n     configs += [ \"//build/config/ios:runtime_library\" ]\n   } else if (is_mac) {\n-    configs += [ \"//build/config/mac:runtime_library\" ]\n+    if (!use_zig_tc) {\n+      configs += [ \"//build/config/mac:runtime_library\" ]\n+    }\n   } else if (is_android) {\n     configs += [ \"//build/config/android:runtime_library\" ]\n   }\n@@ -1504,7 +1511,7 @@ config(\"default_warnings\") {\n   cflags_cc = []\n   ldflags = []\n \n-  if (is_win) {\n+  if (is_win && !use_zig_tc) {\n     if (treat_warnings_as_errors) {\n       cflags += [ \"/WX\" ]\n     }\n@@ -1684,7 +1691,7 @@ config(\"prevent_unsafe_narrowing\") {\n # part of Chromium.\n \n config(\"chromium_code\") {\n-  if (is_win) {\n+  if (is_win && !use_zig_tc) {\n     if (is_clang) {\n       cflags = [ \"/W4\" ]  # Warning level 4.\n \n@@ -1771,7 +1778,7 @@ config(\"no_chromium_code\") {\n   cflags_cc = []\n   defines = []\n \n-  if (is_win) {\n+  if (is_win && !use_zig_tc) {\n     if (is_clang) {\n       cflags += [ \"/W3\" ]  # Warning level 3.\n     }\n@@ -1848,7 +1855,7 @@ config(\"rtti\") {\n config(\"no_rtti\") {\n   # Some sanitizer configs may require RTTI to be left enabled globally\n   if (!use_rtti) {\n-    if (is_win) {\n+    if (is_win && !use_zig_tc) {\n       cflags_cc = [ \"/GR-\" ]\n     } else {\n       cflags_cc = [ \"-fno-rtti\" ]\n@@ -1890,7 +1897,7 @@ config(\"thin_archive\") {\n   # archives.\n   # TODO(crbug.com/1221615): Enable on is_apple if use_lld once that no longer\n   # confuses lldb.\n-  if ((is_posix && !is_nacl && !is_apple) || is_fuchsia) {\n+  if ((is_posix && !is_nacl && !is_apple) || is_fuchsia || use_zig_tc) {\n     arflags = [ \"-T\" ]\n   } else if (is_win && use_lld) {\n     arflags = [ \"/llvmlibthin\" ]\n@@ -1982,7 +1989,7 @@ config(\"no_incompatible_pointer_warnings\") {\n \n # Shared settings for both \"optimize\" and \"optimize_max\" configs.\n # IMPORTANT: On Windows \"/O1\" and \"/O2\" must go before the common flags.\n-if (is_win) {\n+if (is_win && !use_zig_tc) {\n   common_optimize_on_cflags = [\n     \"/Ob2\",  # Both explicit and auto inlining.\n     \"/Oy-\",  # Disable omitting frame pointers, must be after /O2.\n@@ -2088,7 +2095,7 @@ config(\"default_stack_frames\") {\n \n # Default \"optimization on\" config.\n config(\"optimize\") {\n-  if (is_win) {\n+  if (is_win && !use_zig_tc) {\n     if (chrome_pgo_phase != 2) {\n       # Favor size over speed, /O1 must be before the common flags.\n       # /O1 implies /Os and /GF.\n@@ -2199,7 +2206,7 @@ config(\"optimize_max\") {\n     configs = [ \"//build/config/nacl:irt_optimize\" ]\n   } else {\n     ldflags = common_optimize_on_ldflags\n-    if (is_win) {\n+    if (is_win && !use_zig_tc) {\n       # Favor speed over size, /O2 must be before the common flags.\n       # /O2 implies /Ot, /Oi, and /GF.\n       cflags = [ \"/O2\" ] + common_optimize_on_cflags\n@@ -2232,7 +2239,7 @@ config(\"optimize_speed\") {\n     configs = [ \"//build/config/nacl:irt_optimize\" ]\n   } else {\n     ldflags = common_optimize_on_ldflags\n-    if (is_win) {\n+    if (is_win && !use_zig_tc) {\n       # Favor speed over size, /O2 must be before the common flags.\n       # /O2 implies /Ot, /Oi, and /GF.\n       cflags = [ \"/O2\" ] + common_optimize_on_cflags\ndiff --git a/config/linux/BUILD.gn b/config/linux/BUILD.gn\nindex 131bb71d1..5cde9fff4 100644\n--- a/config/linux/BUILD.gn\n+++ b/config/linux/BUILD.gn\n@@ -42,7 +42,10 @@ config(\"runtime_library\") {\n \n   if ((!is_chromeos || default_toolchain != \"//build/toolchain/cros:target\") &&\n       (!use_custom_libcxx || current_cpu == \"mipsel\")) {\n-    libs = [ \"atomic\" ]\n+    if (!use_zig_tc) {\n+      # -latomic won't be found when using zig tc, it's already compiled from zig libcxx source\n+      libs = [ \"atomic\" ]\n+    }\n   }\n }\n \ndiff --git a/config/sysroot.gni b/config/sysroot.gni\nindex dea380727..2f493a04f 100644\n--- a/config/sysroot.gni\n+++ b/config/sysroot.gni\n@@ -65,7 +65,7 @@ if (sysroot == \"\") {\n                       \"string\") == \"True\",\n           \"Missing sysroot ($sysroot). To fix, run: build/linux/sysroot_scripts/install-sysroot.py --arch=$_script_arch\")\n     }\n-  } else if (is_mac) {\n+  } else if (is_mac && !use_zig_tc) {\n     import(\"//build/config/mac/mac_sdk.gni\")\n     sysroot = mac_sdk_path\n   } else if (is_ios) {\ndiff --git a/toolchain/gcc_toolchain.gni b/toolchain/gcc_toolchain.gni\nindex 48f931764..21db4578c 100644\n--- a/toolchain/gcc_toolchain.gni\n+++ b/toolchain/gcc_toolchain.gni\n@@ -361,11 +361,13 @@ template(\"gcc_toolchain\") {\n       extra_ldflags = \"\"\n     }\n \n+    if (!use_zig_tc) {\n     if (system_headers_in_deps) {\n       md = \"-MD\"\n     } else {\n       md = \"-MMD\"\n     }\n+    }\n \n     enable_linker_map = defined(invoker.enable_linker_map) &&\n                         invoker.enable_linker_map && generate_linker_map\n@@ -380,7 +382,11 @@ template(\"gcc_toolchain\") {\n     tool(\"cc\") {\n       depfile = \"{{output}}.d\"\n       precompiled_header_type = \"gcc\"\n-      command = \"$cc $md -MF $depfile ${rebuild_string}{{defines}} {{include_dirs}} {{cflags}} {{cflags_c}}${extra_cppflags}${extra_cflags} -c {{source}} -o {{output}}\"\n+      if (use_zig_tc) {\n+        command = \"$cc ${rebuild_string}{{defines}} {{include_dirs}} {{cflags}} {{cflags_c}}${extra_cppflags}${extra_cflags} -c {{source}} -o {{output}}\"\n+      } else {\n+        command = \"$cc $md -MF $depfile ${rebuild_string}{{defines}} {{include_dirs}} {{cflags}} {{cflags_c}}${extra_cppflags}${extra_cflags} -c {{source}} -o {{output}}\"\n+      }\n       depsformat = \"gcc\"\n       description = \"CC {{output}}\"\n       outputs = [ \"$object_subdir/{{source_name_part}}.o\" ]\n@@ -389,7 +395,11 @@ template(\"gcc_toolchain\") {\n     tool(\"cxx\") {\n       depfile = \"{{output}}.d\"\n       precompiled_header_type = \"gcc\"\n-      command = \"$cxx $md -MF $depfile ${rebuild_string}{{defines}} {{include_dirs}} {{cflags}} {{cflags_cc}}${extra_cppflags}${extra_cxxflags} -c {{source}} -o {{output}}\"\n+      if (use_zig_tc) {\n+        command = \"$cxx ${rebuild_string}{{defines}} {{include_dirs}} {{cflags}} {{cflags_cc}}${extra_cppflags}${extra_cxxflags} -c {{source}} -o {{output}}\"\n+      } else {\n+        command = \"$cxx $md -MF $depfile ${rebuild_string}{{defines}} {{include_dirs}} {{cflags}} {{cflags_cc}}${extra_cppflags}${extra_cxxflags} -c {{source}} -o {{output}}\"\n+      }\n       depsformat = \"gcc\"\n       description = \"CXX {{output}}\"\n       outputs = [ \"$object_subdir/{{source_name_part}}.o\" ]\n@@ -398,7 +408,11 @@ template(\"gcc_toolchain\") {\n     tool(\"asm\") {\n       # For GCC we can just use the C compiler to compile assembly.\n       depfile = \"{{output}}.d\"\n-      command = \"$asm $md -MF $depfile ${rebuild_string}{{defines}} {{include_dirs}} {{asmflags}}${extra_asmflags} -c {{source}} -o {{output}}\"\n+      if (use_zig_tc) {\n+        command = \"$asm ${rebuild_string}{{defines}} {{include_dirs}} {{asmflags}}${extra_asmflags} -c {{source}} -o {{output}}\"\n+      } else {\n+        command = \"$asm $md -MF $depfile ${rebuild_string}{{defines}} {{include_dirs}} {{asmflags}}${extra_asmflags} -c {{source}} -o {{output}}\"\n+      }\n       depsformat = \"gcc\"\n       description = \"ASM {{output}}\"\n       outputs = [ \"$object_subdir/{{source_name_part}}.o\" ]\n@@ -412,7 +426,11 @@ template(\"gcc_toolchain\") {\n       } else {\n         rspfile = \"{{output}}.rsp\"\n         rspfile_content = \"{{inputs}}\"\n-        command = \"\\\"$ar\\\" {{arflags}} -r -c -s -D {{output}} @\\\"$rspfile\\\"\"\n+        if (use_zig_tc) {\n+          command = \"$ar {{arflags}} -r -c -s -D {{output}} @\\\"$rspfile\\\"\"\n+        } else {\n+          command = \"\\\"$ar\\\" {{arflags}} -r -c -s -D {{output}} @\\\"$rspfile\\\"\"\n+        }\n       }\n \n       # Remove the output file first so that ar doesn't try to modify the\n"
  },
  {
    "path": "src/binding.cpp",
    "content": "// Based on https://github.com/denoland/rusty_v8/blob/main/src/binding.cc\n\n#include <cassert>\n#include \"include/libplatform/libplatform.h\"\n#include \"include/v8.h\"\n#include \"src/api/api.h\"\n\ntemplate <class T, class... Args>\nclass Wrapper {\n    public:\n        Wrapper(T* buf, Args... args) : inner_(args...) {}\n    private:\n        T inner_;\n};\n\ntemplate <class T, class... Args>\nvoid construct_in_place(T* buf, Args... args) {\n    new (buf) Wrapper<T, Args...>(buf, std::forward<Args>(args)...);\n}\n\ntemplate <class T>\ninline static T* local_to_ptr(v8::Local<T> local) {\n    return *local;\n}\n\ntemplate <class T>\ninline static const v8::Local<T> ptr_to_local(const T* ptr) {\n    static_assert(sizeof(v8::Local<T>) == sizeof(T*), \"\");\n    auto local = *reinterpret_cast<const v8::Local<T>*>(&ptr);\n    assert(*local == ptr);\n    return local;\n}\n\ntemplate <class T>\ninline static const v8::MaybeLocal<T> ptr_to_maybe_local(const T* ptr) {\n    static_assert(sizeof(v8::MaybeLocal<T>) == sizeof(T*), \"\");\n    return *reinterpret_cast<const v8::MaybeLocal<T>*>(&ptr);\n}\n\ntemplate <class T>\ninline static T* maybe_local_to_ptr(v8::MaybeLocal<T> local) {\n    return *local.FromMaybe(v8::Local<T>());\n}\n\ntemplate <class T>\ninline static v8::Local<T>* const_ptr_array_to_local_array(\n        const T* const ptr_array[]) {\n    static_assert(sizeof(v8::Local<T>) == sizeof(T*), \"\");\n    auto mut_ptr_array = const_cast<T**>(ptr_array);\n    auto mut_local_array = reinterpret_cast<v8::Local<T>*>(mut_ptr_array);\n    return mut_local_array;\n}\n\nstruct SharedPtr {\n    void* a;\n    void* b;\n};\n\n// The destructor of V is never called.\n// P is not allowed to have a destructor.\ntemplate <class P>\nstruct make_pod {\n    template <class V>\n    inline make_pod(V&& value) : pod_(helper<V>(std::move(value))) {}\n    template <class V>\n    inline make_pod(const V& value) : pod_(helper<V>(value)) {}\n    inline operator P() { return pod_; }\n\n    private:\n        P pod_;\n\n    // This helper exists to avoid calling the destructor.\n    // Using a union is a C++ trick to achieve this.\n    template <class V>\n    union helper {\n        static_assert(std::is_pod<P>::value, \"type P must a pod type\");\n        static_assert(sizeof(V) == sizeof(P), \"type P must be same size as type V\");\n        static_assert(alignof(V) == alignof(P), \"alignment of type P must be compatible with that of type V\");\n\n        inline helper(V&& value) : value_(std::move(value)) {}\n        inline helper(const V& value) : value_(value) {}\n        inline ~helper() {}\n\n        inline operator P() {\n            // Do a memcpy here avoid undefined behavior.\n            P result;\n            memcpy(&result, this, sizeof result);\n            return result;\n        }\n\n        private:\n            V value_;\n    };\n};\n\nextern \"C\" {\n\n// Platform\n\nv8::Platform* v8__Platform__NewDefaultPlatform(\n        int thread_pool_size,\n        bool idle_task_support) {\n    return v8::platform::NewDefaultPlatform(\n        thread_pool_size,  \n        idle_task_support ? v8::platform::IdleTaskSupport::kEnabled : v8::platform::IdleTaskSupport::kDisabled,\n        v8::platform::InProcessStackDumping::kDisabled,\n        nullptr\n    ).release();\n}\n\nvoid v8__Platform__DELETE(v8::Platform* self) { delete self; }\n\nbool v8__Platform__PumpMessageLoop(\n        v8::Platform* platform,\n        v8::Isolate* isolate,\n        bool wait_for_work) {\n    return v8::platform::PumpMessageLoop(\n        platform, isolate,\n        wait_for_work ? v8::platform::MessageLoopBehavior::kWaitForWork : v8::platform::MessageLoopBehavior::kDoNotWait);\n}\n\n// Root\n\nconst v8::Primitive* v8__Undefined(v8::Isolate* isolate) {\n    return local_to_ptr(v8::Undefined(isolate));\n}\n\nconst v8::Primitive* v8__Null(v8::Isolate* isolate) {\n    return local_to_ptr(v8::Null(isolate));\n}\n\nconst v8::Boolean* v8__True(v8::Isolate* isolate) {\n    return local_to_ptr(v8::True(isolate));\n}\n\nconst v8::Boolean* v8__False(v8::Isolate* isolate) {\n    return local_to_ptr(v8::False(isolate));\n}\n\nconst v8::Uint8Array* v8__Uint8Array__New(\n        const v8::ArrayBuffer& buf,\n        size_t byte_offset,\n        size_t length) {\n    return local_to_ptr(\n        v8::Uint8Array::New(ptr_to_local(&buf), byte_offset, length)\n    );\n}\n\n// V8\n\nconst char* v8__V8__GetVersion() { return v8::V8::GetVersion(); }\n\nvoid v8__V8__InitializePlatform(v8::Platform* platform) {\n    v8::V8::InitializePlatform(platform);\n}\n\nvoid v8__V8__Initialize() { v8::V8::Initialize(); }\n\nint v8__V8__Dispose() { return v8::V8::Dispose(); }\n\nvoid v8__V8__DisposePlatform() { v8::V8::DisposePlatform(); }\n\n// Isolate\n\nv8::Isolate* v8__Isolate__New(const v8::Isolate::CreateParams& params) {\n    return v8::Isolate::New(params);\n}\n\nvoid v8__Isolate__Dispose(v8::Isolate* isolate) { isolate->Dispose(); }\n\nvoid v8__Isolate__Enter(v8::Isolate* isolate) { isolate->Enter(); }\n\nvoid v8__Isolate__Exit(v8::Isolate* isolate) { isolate->Exit(); }\n\nconst v8::Context* v8__Isolate__GetCurrentContext(v8::Isolate* isolate) {\n    return local_to_ptr(isolate->GetCurrentContext());\n}\n\nsize_t v8__Isolate__CreateParams__SIZEOF() {\n    return sizeof(v8::Isolate::CreateParams);\n}\n\nvoid v8__Isolate__CreateParams__CONSTRUCT(v8::Isolate::CreateParams* buf) {\n    // Use in place new constructor otherwise special fields like shared_ptr will attempt to do copy and fail if the buffer had undefined values.\n    new (buf) v8::Isolate::CreateParams();\n}\n\nconst v8::Value* v8__Isolate__ThrowException(\n        v8::Isolate* isolate,\n        const v8::Value& exception) {\n    return local_to_ptr(isolate->ThrowException(ptr_to_local(&exception)));\n}\n\nvoid v8__Isolate__SetPromiseRejectCallback(\n        v8::Isolate* isolate,\n        v8::PromiseRejectCallback callback) {\n    isolate->SetPromiseRejectCallback(callback);\n}\n\nv8::MicrotasksPolicy v8__Isolate__GetMicrotasksPolicy(const v8::Isolate* self) {\n    return self->GetMicrotasksPolicy();\n}\n\nvoid v8__Isolate__SetMicrotasksPolicy(\n        v8::Isolate* self,\n        v8::MicrotasksPolicy policy) {\n    self->SetMicrotasksPolicy(policy);\n}\n\nvoid v8__Isolate__PerformMicrotaskCheckpoint(v8::Isolate* self) {\n    self->PerformMicrotaskCheckpoint();\n}\n\nbool v8__Isolate__AddMessageListener(\n        v8::Isolate* self,\n        v8::MessageCallback callback) {\n    return self->AddMessageListener(callback);\n}\n\nbool v8__Isolate__AddMessageListenerWithErrorLevel(\n        v8::Isolate* self,\n        v8::MessageCallback callback,\n        int message_levels,\n        const v8::Value& data) {\n    return self->AddMessageListenerWithErrorLevel(callback, message_levels, ptr_to_local(&data));\n}\n\nvoid v8__Isolate__SetCaptureStackTraceForUncaughtExceptions(\n        v8::Isolate* isolate,\n        bool capture,\n        int frame_limit) {\n    isolate->SetCaptureStackTraceForUncaughtExceptions(capture, frame_limit);\n}\n\nvoid v8__Isolate__TerminateExecution(v8::Isolate* self) {\n    self->TerminateExecution();\n}\n\nbool v8__Isolate__IsExecutionTerminating(v8::Isolate* self) {\n    return self->IsExecutionTerminating();\n}\n\nvoid v8__Isolate__CancelTerminateExecution(v8::Isolate* self) {\n    self->CancelTerminateExecution();\n}\n\nvoid v8__Isolate__LowMemoryNotification(v8::Isolate* self) {\n    self->LowMemoryNotification();\n}\n\nvoid v8__Isolate__GetHeapStatistics(\n        v8::Isolate* self,\n        v8::HeapStatistics* stats) {\n    self->GetHeapStatistics(stats);\n}\n\nsize_t v8__HeapStatistics__SIZEOF() {\n    return sizeof(v8::HeapStatistics);\n}\n\n// ArrayBuffer\n\nv8::ArrayBuffer::Allocator* v8__ArrayBuffer__Allocator__NewDefaultAllocator() {\n    return v8::ArrayBuffer::Allocator::NewDefaultAllocator();\n}\n\nvoid v8__ArrayBuffer__Allocator__DELETE(v8::ArrayBuffer::Allocator* self) { delete self; }\n\nv8::BackingStore* v8__ArrayBuffer__NewBackingStore(\n        v8::Isolate* isolate,\n        size_t byte_len) {\n    std::unique_ptr<v8::BackingStore> store = v8::ArrayBuffer::NewBackingStore(isolate, byte_len);\n    return store.release();\n}\n\nv8::BackingStore* v8__ArrayBuffer__NewBackingStore2(\n        void* data,\n        size_t byte_len,\n        v8::BackingStoreDeleterCallback deleter,\n        void* deleter_data) {\n    std::unique_ptr<v8::BackingStore> store = v8::ArrayBuffer::NewBackingStore(data, byte_len, deleter, deleter_data);\n    return store.release();\n}\n\nvoid* v8__BackingStore__Data(const v8::BackingStore& self) { return self.Data(); }\n\nsize_t v8__BackingStore__ByteLength(const v8::BackingStore& self) { return self.ByteLength(); }\n\nbool v8__BackingStore__IsShared(const v8::BackingStore& self) { return self.IsShared(); }\n\nSharedPtr v8__BackingStore__TO_SHARED_PTR(v8::BackingStore* unique_ptr) {\n    return make_pod<SharedPtr>(std::shared_ptr<v8::BackingStore>(unique_ptr));\n}\n\nvoid std__shared_ptr__v8__BackingStore__reset(std::shared_ptr<v8::BackingStore>* self) { self->reset(); }\n\nv8::BackingStore* std__shared_ptr__v8__BackingStore__get(const std::shared_ptr<v8::BackingStore>& self) { return self.get(); }\n\nlong std__shared_ptr__v8__BackingStore__use_count(const std::shared_ptr<v8::BackingStore>& self) { return self.use_count(); }\n\nconst v8::ArrayBuffer* v8__ArrayBuffer__New(\n        v8::Isolate* isolate, size_t byte_len) {\n    return local_to_ptr(v8::ArrayBuffer::New(isolate, byte_len));\n}\n\nconst v8::ArrayBuffer* v8__ArrayBuffer__New2(\n        v8::Isolate* isolate,\n        const std::shared_ptr<v8::BackingStore>& backing_store) {\n    return local_to_ptr(v8::ArrayBuffer::New(isolate, backing_store));\n}\n\nsize_t v8__ArrayBuffer__ByteLength(const v8::ArrayBuffer& self) { return self.ByteLength(); }\n\nSharedPtr v8__ArrayBuffer__GetBackingStore(const v8::ArrayBuffer& self) {\n    return make_pod<SharedPtr>(ptr_to_local(&self)->GetBackingStore());\n}\n\n// ArrayBufferView\n\nconst v8::ArrayBuffer* v8__ArrayBufferView__Buffer(const v8::ArrayBufferView& self) {\n    return local_to_ptr(ptr_to_local(&self)->Buffer());\n}\n\n// HandleScope\n\nvoid v8__HandleScope__CONSTRUCT(v8::HandleScope* buf, v8::Isolate* isolate) {\n    // We can't do in place new, since new is overloaded for HandleScope.\n    // Use in place construct instead.\n    construct_in_place<v8::HandleScope>(buf, isolate);\n}\n\nvoid v8__HandleScope__DESTRUCT(v8::HandleScope* scope) { scope->~HandleScope(); }\n\n// Context\n\nv8::Context* v8__Context__New(\n        v8::Isolate* isolate,\n        const v8::ObjectTemplate* global_tmpl,\n        const v8::Value* global_obj) {\n    return local_to_ptr(\n        v8::Context::New(isolate, nullptr, ptr_to_maybe_local(global_tmpl), ptr_to_maybe_local(global_obj))\n    );\n}\n\nvoid v8__Context__Enter(const v8::Context& context) { ptr_to_local(&context)->Enter(); }\n\nvoid v8__Context__Exit(const v8::Context& context) { ptr_to_local(&context)->Exit(); }\n\nv8::Isolate* v8__Context__GetIsolate(const v8::Context& self) {\n\treturn ptr_to_local(&self)->GetIsolate();\n}\n\nconst v8::Object* v8__Context__Global(\n        const v8::Context& self) {\n    return local_to_ptr(ptr_to_local(&self)->Global());\n}\n\nconst v8::Value* v8__Context__GetEmbedderData(\n        const v8::Context& self,\n        int idx) {\n    return local_to_ptr(ptr_to_local(&self)->GetEmbedderData(idx));\n}\n\nvoid v8__Context__SetEmbedderData(\n        const v8::Context& self,\n        int idx,\n        const v8::Value& val) {\n    ptr_to_local(&self)->SetEmbedderData(idx, ptr_to_local(&val));\n}\n\n// ScriptOrigin\n\nvoid v8__ScriptOrigin__CONSTRUCT(\n        v8::ScriptOrigin* buf,\n        v8::Isolate* isolate,\n        const v8::Value& resource_name) {\n    new (buf) v8::ScriptOrigin(isolate, ptr_to_local(&resource_name));\n}\n\nvoid v8__ScriptOrigin__CONSTRUCT2(\n        v8::ScriptOrigin* buf,\n        v8::Isolate* isolate,\n        const v8::Value& resource_name,\n        int resource_line_offset,\n        int resource_column_offset,\n        bool resource_is_shared_cross_origin,\n        int script_id,\n        const v8::Value& source_map_url,\n        bool resource_is_opaque,\n        bool is_wasm,\n        bool is_module,\n        const v8::Data& host_defined_options) {\n    new (buf) v8::ScriptOrigin(\n        isolate, ptr_to_local(&resource_name),\n        resource_line_offset, resource_column_offset, resource_is_shared_cross_origin, script_id,\n        ptr_to_local(&source_map_url), resource_is_opaque, is_wasm, is_module, ptr_to_local(&host_defined_options)\n    );\n}\n\n// Script\n\nv8::Script* v8__Script__Compile(\n        const v8::Context& context,\n        const v8::String& src,\n        const v8::ScriptOrigin& origin) {\n    return maybe_local_to_ptr(\n        v8::Script::Compile(ptr_to_local(&context), ptr_to_local(&src), const_cast<v8::ScriptOrigin*>(&origin))\n    );\n}\n\nv8::Value* v8__Script__Run(\n        const v8::Script& script,\n        const v8::Context& context) {\n    return maybe_local_to_ptr(ptr_to_local(&script)->Run(ptr_to_local(&context)));\n}\n\n// ScriptCompiler\n\nsize_t v8__ScriptCompiler__Source__SIZEOF() {\n    return sizeof(v8::ScriptCompiler::Source);\n}\n\nvoid v8__ScriptCompiler__Source__CONSTRUCT(\n        const v8::String& src,\n        v8::ScriptCompiler::CachedData* cached_data,\n        v8::ScriptCompiler::Source* out) {\n    new (out) v8::ScriptCompiler::Source(ptr_to_local(&src), cached_data);\n}\n\nvoid v8__ScriptCompiler__Source__CONSTRUCT2(\n        const v8::String& src,\n        const v8::ScriptOrigin* origin,\n        v8::ScriptCompiler::CachedData* cached_data,\n        v8::ScriptCompiler::Source* out) {\n    new (out) v8::ScriptCompiler::Source(ptr_to_local(&src), *origin, cached_data);\n}\n\nvoid v8__ScriptCompiler__Source__DESTRUCT(v8::ScriptCompiler::Source* self) {\n    self->~Source();\n}\n\nsize_t v8__ScriptCompiler__CachedData__SIZEOF() {\n    return sizeof(v8::ScriptCompiler::CachedData);\n}\n\nv8::ScriptCompiler::CachedData* v8__ScriptCompiler__CachedData__NEW(\n        const uint8_t* data,\n        int length) {\n    return new v8::ScriptCompiler::CachedData(\n        data, length, v8::ScriptCompiler::CachedData::BufferNotOwned\n    );\n}\n\nvoid v8__ScriptCompiler__CachedData__DELETE(v8::ScriptCompiler::CachedData* self) {\n    delete self;\n}\n\nconst v8::Module* v8__ScriptCompiler__CompileModule(\n        v8::Isolate* isolate,\n        v8::ScriptCompiler::Source* source,\n        v8::ScriptCompiler::CompileOptions options,\n        v8::ScriptCompiler::NoCacheReason reason) {\n    v8::MaybeLocal<v8::Module> maybe_local = v8::ScriptCompiler::CompileModule(isolate, source, options, reason);\n    return maybe_local_to_ptr(maybe_local);\n}\n\n// Module\n\nv8::Module::Status v8__Module__GetStatus(const v8::Module& self) {\n    return self.GetStatus();\n}\n\nconst v8::Value* v8__Module__GetException(const v8::Module& self) {\n    return local_to_ptr(self.GetException());\n}\n\nconst v8::FixedArray* v8__Module__GetModuleRequests(const v8::Module& self) {\n    return local_to_ptr(self.GetModuleRequests());\n}\n\nvoid v8__Module__InstantiateModule(\n        const v8::Module& self,\n        const v8::Context& ctx,\n        v8::Module::ResolveModuleCallback cb,\n        v8::Maybe<bool>* out) {\n    *out = ptr_to_local(&self)->InstantiateModule(ptr_to_local(&ctx), cb);\n}\n\nconst v8::Value* v8__Module__Evaluate(\n        const v8::Module& self,\n        const v8::Context& ctx) {\n    return maybe_local_to_ptr(ptr_to_local(&self)->Evaluate(ptr_to_local(&ctx)));\n}\n\nint v8__Module__GetIdentityHash(const v8::Module& self) {\n    return self.GetIdentityHash();\n}\n\nint v8__Module__ScriptId(const v8::Module& self) {\n    return self.ScriptId();\n}\n\n// ModuleRequest\n\nconst v8::String* v8__ModuleRequest__GetSpecifier(const v8::ModuleRequest& self) {\n    return local_to_ptr(self.GetSpecifier());\n}\n\nint v8__ModuleRequest__GetSourceOffset(const v8::ModuleRequest& self) {\n    return self.GetSourceOffset();\n}\n\n// FixedArray\n\nint v8__FixedArray__Length(const v8::FixedArray& self) {\n    return self.Length();\n}\n\nconst v8::Data* v8__FixedArray__Get(\n        const v8::FixedArray& self,\n        const v8::Context& ctx,\n        int idx) {\n    return local_to_ptr(ptr_to_local(&self)->Get(ptr_to_local(&ctx), idx));\n}\n\n// String\n\nv8::String* v8__String__NewFromUtf8(\n        v8::Isolate* isolate,\n        const char* data,\n        v8::NewStringType type,\n        int length) {\n    return maybe_local_to_ptr(\n        v8::String::NewFromUtf8(isolate, data, type, length)\n    );\n}\n\nint v8__String__WriteUtf8(\n        const v8::String& str,\n        v8::Isolate* isolate,\n        char* buffer,\n        int length,\n        int* nchars_ref,\n        int options) {\n    return str.WriteUtf8(isolate, buffer, length, nchars_ref, options);\n}\n\nint v8__String__Utf8Length(const v8::String& self, v8::Isolate* isolate) {\n    return self.Utf8Length(isolate);\n}\n\n// Boolean\n\nconst v8::Boolean* v8__Boolean__New(\n        v8::Isolate* isolate,\n        bool value) {\n    return local_to_ptr(v8::Boolean::New(isolate, value));\n}\n\n// Number\n\nconst v8::Number* v8__Number__New(\n        v8::Isolate* isolate,\n        double value) {\n    return *v8::Number::New(isolate, value);\n}\n\n// Integer\n\nconst v8::Integer* v8__Integer__New(\n        v8::Isolate* isolate,\n        int32_t value) {\n    return *v8::Integer::New(isolate, value);\n}\n\nconst v8::Integer* v8__Integer__NewFromUnsigned(\n        v8::Isolate* isolate,\n        uint32_t value) {\n    return *v8::Integer::NewFromUnsigned(isolate, value);\n}\n\nint64_t v8__Integer__Value(const v8::Integer& self) { return self.Value(); }\n\n// BigInt\n\nconst v8::BigInt* v8__BigInt__New(\n        v8::Isolate* iso, \n        int64_t val) {\n    return local_to_ptr(v8::BigInt::New(iso, val));\n}\n\nconst v8::BigInt* v8__BigInt__NewFromUnsigned(\n        v8::Isolate* iso,\n        uint64_t val) {\n    return local_to_ptr(v8::BigInt::NewFromUnsigned(iso, val));\n}\n\nuint64_t v8__BigInt__Uint64Value(\n        const v8::BigInt& self,\n        bool* lossless) {\n    return ptr_to_local(&self)->Uint64Value(lossless);\n}\n\nint64_t v8__BigInt__Int64Value(\n        const v8::BigInt& self,\n        bool* lossless) {\n    return ptr_to_local(&self)->Int64Value(lossless);\n}\n\n// Promise\n\nconst v8::Promise::Resolver* v8__Promise__Resolver__New(\n        const v8::Context& ctx) {\n    return maybe_local_to_ptr(\n        v8::Promise::Resolver::New(ptr_to_local(&ctx))\n    );\n}\n\nconst v8::Promise* v8__Promise__Resolver__GetPromise(\n        const v8::Promise::Resolver& self) {\n    return local_to_ptr(ptr_to_local(&self)->GetPromise());\n}\n\nvoid v8__Promise__Resolver__Resolve(\n        const v8::Promise::Resolver& self,\n        const v8::Context& ctx,\n        const v8::Value& value,\n        v8::Maybe<bool>* out) {\n    *out = ptr_to_local(&self)->Resolve(\n        ptr_to_local(&ctx), ptr_to_local(&value)\n    );\n}\n\nvoid v8__Promise__Resolver__Reject(\n        const v8::Promise::Resolver& self,\n        const v8::Context& ctx,\n        const v8::Value& value,\n        v8::Maybe<bool>* out) {\n    *out = ptr_to_local(&self)->Reject(\n        ptr_to_local(&ctx),\n        ptr_to_local(&value)\n    );\n}\n\nconst v8::Promise* v8__Promise__Catch(\n        const v8::Promise& self,\n        const v8::Context& ctx,\n        const v8::Function& handler) {\n    return maybe_local_to_ptr(\n        ptr_to_local(&self)->Catch(ptr_to_local(&ctx), ptr_to_local(&handler))\n    );\n}\n\nconst v8::Promise* v8__Promise__Then(\n        const v8::Promise& self,\n        const v8::Context& ctx,\n        const v8::Function& handler) {\n    return maybe_local_to_ptr(\n        ptr_to_local(&self)->Then(ptr_to_local(&ctx), ptr_to_local(&handler))\n    );\n}\n\nconst v8::Promise* v8__Promise__Then2(\n        const v8::Promise& self,\n        const v8::Context& ctx,\n        const v8::Function& on_fulfilled,\n        const v8::Function& on_rejected) {\n    return maybe_local_to_ptr(\n        ptr_to_local(&self)->Then(\n            ptr_to_local(&ctx),\n            ptr_to_local(&on_fulfilled),\n            ptr_to_local(&on_rejected)\n        )\n    );\n}\n\nv8::Promise::PromiseState v8__Promise__State(const v8::Promise& self) {\n    return ptr_to_local(&self)->State();\n}\n\nvoid v8__Promise__MarkAsHandled(const v8::Promise& self) {\n    ptr_to_local(&self)->MarkAsHandled();\n}\n\nconst v8::Value* v8__Promise__Result(const v8::Promise& self) {\n    return local_to_ptr(ptr_to_local(&self)->Result());\n}\n\n// Value\n\nconst v8::String* v8__Value__ToString(\n        const v8::Value& self,\n        const v8::Context& ctx) {\n    return maybe_local_to_ptr(self.ToString(ptr_to_local(&ctx)));\n}\n\nconst v8::String* v8__Value__ToDetailString(\n        const v8::Value& self,\n        const v8::Context& ctx) {\n    return maybe_local_to_ptr(self.ToDetailString(ptr_to_local(&ctx)));\n}\n\nbool v8__Value__BooleanValue(\n        const v8::Value& self,\n        v8::Isolate* isolate) {\n    return self.BooleanValue(isolate);\n}\n\nvoid v8__Value__Uint32Value(\n        const v8::Value& self,\n        const v8::Context& ctx,\n        v8::Maybe<uint32_t>* out) {\n    *out = self.Uint32Value(ptr_to_local(&ctx));\n}\n\nvoid v8__Value__Int32Value(\n        const v8::Value& self,\n        const v8::Context& ctx,\n        v8::Maybe<int32_t>* out) {\n    *out = self.Int32Value(ptr_to_local(&ctx));\n}\n\nvoid v8__Value__NumberValue(\n        const v8::Value& self,\n        const v8::Context& ctx,\n        v8::Maybe<double>* out) {\n    *out = self.NumberValue(ptr_to_local(&ctx));\n}\n\nbool v8__Value__IsFunction(const v8::Value& self) { return self.IsFunction(); }\n\nbool v8__Value__IsAsyncFunction(const v8::Value& self) { return self.IsAsyncFunction(); }\n\nbool v8__Value__IsObject(const v8::Value& self) { return self.IsObject(); }\n\nbool v8__Value__IsString(const v8::Value& self) { return self.IsString(); }\n\nbool v8__Value__IsArray(const v8::Value& self) { return self.IsArray(); }\n\nbool v8__Value__IsArrayBuffer(const v8::Value& self) { return self.IsArrayBuffer(); }\n\nbool v8__Value__IsArrayBufferView(const v8::Value& self) { return self.IsArrayBufferView(); }\n\nbool v8__Value__IsUint8Array(const v8::Value& self) { return self.IsUint8Array(); }\n\nbool v8__Value__IsExternal(const v8::Value& self) { return self.IsExternal(); }\n\nbool v8__Value__IsTrue(const v8::Value& self) { return self.IsTrue(); }\n\nbool v8__Value__IsFalse(const v8::Value& self) { return self.IsFalse(); }\n\nbool v8__Value__IsUndefined(const v8::Value& self) { return self.IsUndefined(); }\n\nbool v8__Value__IsNull(const v8::Value& self) { return self.IsNull(); }\n\nbool v8__Value__IsNullOrUndefined(const v8::Value& self) { return self.IsNullOrUndefined(); }\n\nbool v8__Value__IsNativeError(const v8::Value& self) { return self.IsNativeError(); }\n\nbool v8__Value__IsBigInt(const v8::Value& self) {\n    return self.IsBigInt();\n}\n\nbool v8__Value__IsBigIntObject(const v8::Value& self) {\n    return self.IsBigIntObject();\n}\n\nvoid v8__Value__InstanceOf(\n        const v8::Value& self,\n        const v8::Context& ctx,\n        const v8::Object& object,\n        v8::Maybe<bool>* out) {\n    *out = ptr_to_local(&self)->InstanceOf(ptr_to_local(&ctx), ptr_to_local(&object));\n}\n\n// Template\n\nvoid v8__Template__Set(\n        const v8::Template& self,\n        const v8::Name& key,\n        const v8::Data& value,\n        v8::PropertyAttribute attr) {\n    ptr_to_local(&self)->Set(ptr_to_local(&key), ptr_to_local(&value), attr);\n}\n\nvoid v8__Template__SetAccessorProperty__DEFAULT(\n        const v8::Template& self,\n        const v8::Name& key,\n        const v8::FunctionTemplate& getter) {\n    ptr_to_local(&self)->SetAccessorProperty(ptr_to_local(&key), ptr_to_local(&getter));\n}\n\n// ObjectTemplate\n\nconst v8::ObjectTemplate* v8__ObjectTemplate__New__DEFAULT(\n        v8::Isolate* isolate) {\n    return local_to_ptr(v8::ObjectTemplate::New(isolate));\n}\n\nconst v8::ObjectTemplate* v8__ObjectTemplate__New(\n        v8::Isolate* isolate, const v8::FunctionTemplate& constructor) {\n    return local_to_ptr(v8::ObjectTemplate::New(isolate, ptr_to_local(&constructor)));\n}\n\nconst v8::Object* v8__ObjectTemplate__NewInstance(\n        const v8::ObjectTemplate& self, const v8::Context& ctx) {\n    return maybe_local_to_ptr(\n        ptr_to_local(&self)->NewInstance(ptr_to_local(&ctx))\n    );\n}\n\nvoid v8__ObjectTemplate__SetInternalFieldCount(\n        const v8::ObjectTemplate& self,\n        int value) {\n    ptr_to_local(&self)->SetInternalFieldCount(value);\n}\n\nvoid v8__ObjectTemplate__SetAccessor__DEFAULT(\n        const v8::ObjectTemplate& self,\n        const v8::Name& key,\n        v8::AccessorNameGetterCallback getter) {\n    ptr_to_local(&self)->SetAccessor(ptr_to_local(&key), getter);\n}\n\nvoid v8__ObjectTemplate__SetAccessor__DEFAULT2(\n        const v8::ObjectTemplate& self,\n        const v8::Name& key,\n        v8::AccessorNameGetterCallback getter,\n        v8::AccessorNameSetterCallback setter) {\n    ptr_to_local(&self)->SetAccessor(ptr_to_local(&key), getter, setter);\n}\n\n// Array\n\nconst v8::Array* v8__Array__New(\n        v8::Isolate* isolate,\n        int length) {\n    return local_to_ptr(v8::Array::New(isolate, length));\n}\n\nconst v8::Array* v8__Array__New2(\n        v8::Isolate* isolate,\n        const v8::Value* const elements[],\n        size_t length) {\n    return local_to_ptr(\n        v8::Array::New(isolate, const_ptr_array_to_local_array(elements), length)\n    );\n}\n\nuint32_t v8__Array__Length(const v8::Array& self) { return self.Length(); }\n\n// Object\n\nconst v8::Object* v8__Object__New(\n        v8::Isolate* isolate) {\n    return local_to_ptr(v8::Object::New(isolate));\n}\n\nvoid v8__Object__SetInternalField(\n        const v8::Object& self,\n        int index,\n        const v8::Value& value) {\n    ptr_to_local(&self)->SetInternalField(index, ptr_to_local(&value));\n}\n\nconst v8::Value* v8__Object__GetInternalField(\n        const v8::Object& self,\n        int index) {\n    return local_to_ptr(ptr_to_local(&self)->GetInternalField(index));\n}\n\nconst v8::Value* v8__Object__Get(\n        const v8::Object& self,\n        const v8::Context& ctx,\n        const v8::Value& key) {\n    return maybe_local_to_ptr(\n        ptr_to_local(&self)->Get(ptr_to_local(&ctx), ptr_to_local(&key))\n    );\n}\n\nconst v8::Value* v8__Object__GetIndex(\n        const v8::Object& self,\n        const v8::Context& ctx,\n        uint32_t idx) {\n    return maybe_local_to_ptr(\n        ptr_to_local(&self)->Get(ptr_to_local(&ctx), idx)\n    );\n}\n\nvoid v8__Object__Set(\n        const v8::Object& self,\n        const v8::Context& ctx,\n        const v8::Value& key,\n        const v8::Value& value,\n        v8::Maybe<bool>* out) {\n    *out = ptr_to_local(&self)->Set(\n        ptr_to_local(&ctx),\n        ptr_to_local(&key),\n        ptr_to_local(&value)\n    );\n}\n\nvoid v8__Object__DefineOwnProperty(\n        const v8::Object& self,\n        const v8::Context& ctx,\n        const v8::Name& key,\n        const v8::Value& value,\n        v8::PropertyAttribute attr,\n        v8::Maybe<bool>* out) {\n    *out = ptr_to_local(&self)->DefineOwnProperty(\n        ptr_to_local(&ctx),\n        ptr_to_local(&key),\n        ptr_to_local(&value),\n        attr\n    );\n}\n\nv8::Isolate* v8__Object__GetIsolate(const v8::Object& self) {\n    return ptr_to_local(&self)->GetIsolate();\n}\n\nconst v8::Context* v8__Object__GetCreationContext(const v8::Object& self) {\n    return maybe_local_to_ptr(ptr_to_local(&self)->GetCreationContext());\n}\n\nint v8__Object__GetIdentityHash(const v8::Object& self) {\n    return ptr_to_local(&self)->GetIdentityHash();\n}\n\nvoid v8__Object__Has(\n        const v8::Object& self,\n        const v8::Context& ctx,\n        const v8::Value& key,\n        v8::Maybe<bool>* out) {\n    *out = ptr_to_local(&self)->Has(\n        ptr_to_local(&ctx), ptr_to_local(&key)\n    );\n}\n\nvoid v8__Object__HasIndex(\n        const v8::Object& self,\n        const v8::Context& ctx,\n        uint32_t idx,\n        v8::Maybe<bool>* out) {\n    *out = ptr_to_local(&self)->Has(ptr_to_local(&ctx), idx);\n}\n\nconst v8::Array* v8__Object__GetOwnPropertyNames(\n        const v8::Object* self,\n        const v8::Context* ctx) {\n    return maybe_local_to_ptr(\n        ptr_to_local(self)->GetOwnPropertyNames(ptr_to_local(ctx))\n    );\n}\n\nconst v8::Array* v8__Object__GetPropertyNames(\n        const v8::Object* self,\n        const v8::Context* ctx) {\n    return maybe_local_to_ptr(\n        ptr_to_local(self)->GetPropertyNames(ptr_to_local(ctx))\n    );\n}\n\nvoid v8__Object__SetAlignedPointerInInternalField(\n        const v8::Object* self,\n        int idx,\n        void* ptr) {\n    ptr_to_local(self)->SetAlignedPointerInInternalField(idx, ptr);\n}\n\n// FunctionCallbackInfo\n\nv8::Isolate* v8__FunctionCallbackInfo__GetIsolate(\n        const v8::FunctionCallbackInfo<v8::Value>& self) {\n    return self.GetIsolate();\n}\n\nint v8__FunctionCallbackInfo__Length(\n        const v8::FunctionCallbackInfo<v8::Value>& self) {\n    return self.Length();\n}\n\nconst v8::Value* v8__FunctionCallbackInfo__INDEX(\n        const v8::FunctionCallbackInfo<v8::Value>& self, int i) {\n    return local_to_ptr(self[i]);\n}\n\nvoid v8__FunctionCallbackInfo__GetReturnValue(\n        const v8::FunctionCallbackInfo<v8::Value>& self,\n        v8::ReturnValue<v8::Value>* out) {\n    // Can't return incomplete type to C so copy to res pointer.\n    *out = self.GetReturnValue();\n}\n\nconst v8::Object* v8__FunctionCallbackInfo__This(\n        const v8::FunctionCallbackInfo<v8::Value>& self) {\n    return local_to_ptr(self.This());\n}\n\nconst v8::Value* v8__FunctionCallbackInfo__Data(\n        const v8::FunctionCallbackInfo<v8::Value>& self) {\n    return local_to_ptr(self.Data());\n}\n\n// PropertyCallbackInfo\n\nv8::Isolate* v8__PropertyCallbackInfo__GetIsolate(\n        const v8::PropertyCallbackInfo<v8::Value>& self) {\n    return self.GetIsolate();\n}\n\nvoid v8__PropertyCallbackInfo__GetReturnValue(\n        const v8::PropertyCallbackInfo<v8::Value>& self,\n        v8::ReturnValue<v8::Value>* out) {\n    *out = self.GetReturnValue();\n}\n\nconst v8::Object* v8__PropertyCallbackInfo__This(\n        const v8::PropertyCallbackInfo<v8::Value>& self) {\n    return local_to_ptr(self.This());\n}\n\nconst v8::Value* v8__PropertyCallbackInfo__Data(\n        const v8::PropertyCallbackInfo<v8::Value>& self) {\n    return local_to_ptr(self.Data());\n}\n\n// PromiseRejectMessage\n\nv8::PromiseRejectEvent v8__PromiseRejectMessage__GetEvent(const v8::PromiseRejectMessage& self) {\n    return self.GetEvent();\n}\n\nconst v8::Promise* v8__PromiseRejectMessage__GetPromise(const v8::PromiseRejectMessage& self) {\n    return local_to_ptr(self.GetPromise());\n}\n\nconst v8::Value* v8__PromiseRejectMessage__GetValue(const v8::PromiseRejectMessage& self) {\n    return local_to_ptr(self.GetValue());\n}\n\nsize_t v8__PromiseRejectMessage__SIZEOF() {\n    return sizeof(v8::PromiseRejectMessage);\n}\n\n// ReturnValue\n\nvoid v8__ReturnValue__Set(\n        v8::ReturnValue<v8::Value> self,\n        const v8::Value& value) {\n    self.Set(ptr_to_local(&value));\n}\n\nconst v8::Value* v8__ReturnValue__Get(\n        v8::ReturnValue<v8::Value> self) {\n    return local_to_ptr(self.Get());\n}\n\n// FunctionTemplate\n\nconst v8::FunctionTemplate* v8__FunctionTemplate__New__DEFAULT(\n        v8::Isolate* isolate) {\n    return local_to_ptr(v8::FunctionTemplate::New(isolate));\n}\n\nconst v8::FunctionTemplate* v8__FunctionTemplate__New__DEFAULT2(\n        v8::Isolate* isolate,\n        v8::FunctionCallback callback_or_null) {\n    return local_to_ptr(v8::FunctionTemplate::New(isolate, callback_or_null));\n}\n\nconst v8::FunctionTemplate* v8__FunctionTemplate__New__DEFAULT3(\n        v8::Isolate* isolate,\n        v8::FunctionCallback callback_or_null,\n        const v8::Value& data) {\n    return local_to_ptr(v8::FunctionTemplate::New(isolate, callback_or_null, ptr_to_local(&data)));\n}\n\nconst v8::ObjectTemplate* v8__FunctionTemplate__InstanceTemplate(\n        const v8::FunctionTemplate& self) {\n    return local_to_ptr(ptr_to_local(&self)->InstanceTemplate());\n}\n\nconst v8::ObjectTemplate* v8__FunctionTemplate__PrototypeTemplate(\n        const v8::FunctionTemplate& self) {\n    return local_to_ptr(ptr_to_local(&self)->PrototypeTemplate());\n}\n\nconst v8::Function* v8__FunctionTemplate__GetFunction(\n        const v8::FunctionTemplate& self, const v8::Context& context) {\n    return maybe_local_to_ptr(\n        ptr_to_local(&self)->GetFunction(ptr_to_local(&context))\n    );\n}\n\nvoid v8__FunctionTemplate__SetClassName(\n        const v8::FunctionTemplate& self,\n        const v8::String& name) {\n    ptr_to_local(&self)->SetClassName(ptr_to_local(&name));\n}\n\nvoid v8__FunctionTemplate__ReadOnlyPrototype(\n        const v8::FunctionTemplate& self) {\n    ptr_to_local(&self)->ReadOnlyPrototype();\n}\n\n// Function\n\nconst v8::Function* v8__Function__New__DEFAULT(\n        const v8::Context& ctx,\n        v8::FunctionCallback callback) {\n    return maybe_local_to_ptr(\n        v8::Function::New(ptr_to_local(&ctx), callback)\n    );\n}\n\nconst v8::Function* v8__Function__New__DEFAULT2(\n        const v8::Context& ctx,\n        v8::FunctionCallback callback,\n        const v8::Value& data) {\n    return maybe_local_to_ptr(\n        v8::Function::New(ptr_to_local(&ctx), callback, ptr_to_local(&data))\n    );\n}\n\nconst v8::Value* v8__Function__Call(\n        const v8::Function& self,\n        const v8::Context& context,\n        const v8::Value& recv,\n        int argc,\n        const v8::Value* const argv[]) {\n    return maybe_local_to_ptr(\n        ptr_to_local(&self)->Call(\n            ptr_to_local(&context),\n            ptr_to_local(&recv),\n            argc, const_ptr_array_to_local_array(argv)\n        )\n    );\n}\n\nconst v8::Object* v8__Function__NewInstance(\n        const v8::Function& self,\n        const v8::Context& context,\n        int argc,\n        const v8::Value* const argv[]) {\n    return maybe_local_to_ptr(\n        ptr_to_local(&self)->NewInstance(\n            ptr_to_local(&context),\n            argc,\n            const_ptr_array_to_local_array(argv)\n        )\n    );\n}\n\nconst v8::Value* v8__Function__GetName(const v8::Function& self) {\n    return local_to_ptr(self.GetName());\n}\n\nvoid v8__Function__SetName(\n        const v8::Function& self,\n        const v8::String& name) {\n    return ptr_to_local(&self)->SetName(ptr_to_local(&name));\n}\n\n// External\n\nconst v8::External* v8__External__New(\n        v8::Isolate* isolate, \n        void* value) {\n    return local_to_ptr(v8::External::New(isolate, value));\n}\n\nvoid* v8__External__Value(const v8::External& self) { return self.Value(); }\n\n// Persistent\n\nvoid v8__Persistent__New(\n        v8::Isolate* isolate,\n        // Allow passing in a data pointer which includes values, templates, context, and more.\n        const v8::Data& data,\n        v8::Persistent<v8::Data>* out) {\n    new (out) v8::Persistent<v8::Data>(isolate, ptr_to_local(&data));\n}\n\nvoid v8__Persistent__Reset(v8::Persistent<v8::Data>* self) {\n    // v8::Persistent by default uses NonCopyablePersistentTraits which will create a bad copy if we accept v8::Persistent<v8::Data> as the arg.\n    // Instead we operate on its pointer.\n    self->Reset();\n}\n\nvoid v8__Persistent__SetWeak(v8::Persistent<v8::Data>* self) {\n    self->SetWeak();\n}\n\nvoid v8__Persistent__SetWeakFinalizer(\n        v8::Persistent<v8::Data>* self,\n        void* finalizer_ctx,\n        v8::WeakCallbackInfo<void>::Callback finalizer_cb,\n        v8::WeakCallbackType type) {\n    self->SetWeak(finalizer_ctx, finalizer_cb, type);\n}\n\n// WeakCallbackInfo\n\nv8::Isolate* v8__WeakCallbackInfo__GetIsolate(\n        const v8::WeakCallbackInfo<void>& self) {\n    return self.GetIsolate();\n}\n\nvoid* v8__WeakCallbackInfo__GetParameter(\n        const v8::WeakCallbackInfo<void>& self) {\n    return self.GetParameter();\n}\n\nvoid* v8__WeakCallbackInfo__GetInternalField(\n        const v8::WeakCallbackInfo<void>& self,\n        int idx) {\n    return self.GetInternalField(idx);\n}\n\n// Exception\n\nconst v8::Value* v8__Exception__Error(const v8::String& message) {\n    return local_to_ptr(v8::Exception::Error(ptr_to_local(&message)));\n}\n\nconst v8::Value* v8__Exception__TypeError(const v8::String& message) {\n    return local_to_ptr(v8::Exception::TypeError(ptr_to_local(&message)));\n}\n\nconst v8::Value* v8__Exception__SyntaxError(const v8::String& message) {\n    return local_to_ptr(v8::Exception::SyntaxError(ptr_to_local(&message)));\n}\n\nconst v8::Value* v8__Exception__ReferenceError(const v8::String& message) {\n    return local_to_ptr(v8::Exception::ReferenceError(ptr_to_local(&message)));\n}\n\nconst v8::Value* v8__Exception__RangeError(const v8::String& message) {\n    return local_to_ptr(v8::Exception::RangeError(ptr_to_local(&message)));\n}\n\nconst v8::StackTrace* v8__Exception__GetStackTrace(const v8::Value& exception) {\n    return local_to_ptr(v8::Exception::GetStackTrace(ptr_to_local(&exception)));\n}\n\nconst v8::Message* v8__Exception__CreateMessage(\n        v8::Isolate* isolate,\n        const v8::Value& exception) {\n    return local_to_ptr(v8::Exception::CreateMessage(isolate, ptr_to_local(&exception)));\n}\n\n// TryCatch\n\nsize_t v8__TryCatch__SIZEOF() {\n    return sizeof(v8::TryCatch);\n}\n\nvoid v8__TryCatch__CONSTRUCT(\n        v8::TryCatch* buf, v8::Isolate* isolate) {\n    construct_in_place<v8::TryCatch>(buf, isolate);\n}\n\nvoid v8__TryCatch__DESTRUCT(v8::TryCatch* self) { self->~TryCatch(); }\n\nconst v8::Value* v8__TryCatch__Exception(const v8::TryCatch& self) {\n    return local_to_ptr(self.Exception());\n}\n\nconst v8::Message* v8__TryCatch__Message(const v8::TryCatch& self) {\n    return local_to_ptr(self.Message());\n}\n\nbool v8__TryCatch__HasCaught(const v8::TryCatch& self) {\n    return self.HasCaught();\n}\n\nconst v8::Value* v8__TryCatch__StackTrace(\n        const v8::TryCatch& self,\n        const v8::Context& context) {\n    return maybe_local_to_ptr(self.StackTrace(ptr_to_local(&context)));\n}\n\nbool v8__TryCatch__IsVerbose(const v8::TryCatch& self) { return self.IsVerbose(); }\n\nvoid v8__TryCatch__SetVerbose(\n        v8::TryCatch* self,\n        bool value) {\n    self->SetVerbose(value);\n}\n\nconst v8::Value* v8__TryCatch__ReThrow(v8::TryCatch* self) {\n    return local_to_ptr(self->ReThrow());\n}\n\n// Message\n\nconst v8::String* v8__Message__Get(const v8::Message& self) {\n    return local_to_ptr(self.Get());\n}\n\nconst v8::String* v8__Message__GetSourceLine(\n        const v8::Message& self,\n        const v8::Context& context) {\n    return maybe_local_to_ptr(self.GetSourceLine(ptr_to_local(&context)));\n}\n\nconst v8::Value* v8__Message__GetScriptResourceName(const v8::Message& self) {\n    return local_to_ptr(self.GetScriptResourceName());\n}\n\nint v8__Message__GetLineNumber(\n        const v8::Message& self,\n        const v8::Context& context) {\n    v8::Maybe<int> maybe = self.GetLineNumber(ptr_to_local(&context));\n    return maybe.FromMaybe(-1);\n}\n\nint v8__Message__GetStartColumn(const v8::Message& self) { return self.GetStartColumn(); }\n\nint v8__Message__GetEndColumn(const v8::Message& self) { return self.GetEndColumn(); }\n\nconst v8::StackTrace* v8__Message__GetStackTrace(const v8::Message& self) { return local_to_ptr(self.GetStackTrace()); }\n\n// StackTrace\n\nint v8__StackTrace__GetFrameCount(const v8::StackTrace& self) { return self.GetFrameCount(); }\n\nconst v8::StackFrame* v8__StackTrace__GetFrame(\n        const v8::StackTrace& self,\n        v8::Isolate* isolate,\n        uint32_t idx) {\n    return local_to_ptr(self.GetFrame(isolate, idx));\n}\n\nconst v8::StackTrace* v8__StackTrace__CurrentStackTrace__STATIC(\n        v8::Isolate* isolate,\n        int frame_limit) {\n    return local_to_ptr(v8::StackTrace::CurrentStackTrace(isolate, frame_limit));\n}\n\nconst v8::String* v8__StackTrace__CurrentScriptNameOrSourceURL__STATIC(v8::Isolate* isolate) {\n    return local_to_ptr(v8::StackTrace::CurrentScriptNameOrSourceURL(isolate));\n}\n\n// StackFrame\n\nint v8__StackFrame__GetLineNumber(const v8::StackFrame& self) { return self.GetLineNumber(); }\n\nint v8__StackFrame__GetColumn(const v8::StackFrame& self) { return self.GetColumn(); }\n\nint v8__StackFrame__GetScriptId(const v8::StackFrame& self) { return self.GetScriptId(); }\n\nconst v8::String* v8__StackFrame__GetScriptName(const v8::StackFrame& self) { \n    return local_to_ptr(self.GetScriptName());\n}\n\nconst v8::String* v8__StackFrame__GetScriptNameOrSourceURL(const v8::StackFrame& self) { \n    return local_to_ptr(self.GetScriptNameOrSourceURL());\n}\n\nconst v8::String* v8__StackFrame__GetFunctionName(const v8::StackFrame& self) {\n    return local_to_ptr(self.GetFunctionName());\n}\n\nbool v8__StackFrame__IsEval(const v8::StackFrame& self) { return self.IsEval(); }\n\nbool v8__StackFrame__IsConstructor(const v8::StackFrame& self) { return self.IsConstructor(); }\n\nbool v8__StackFrame__IsWasm(const v8::StackFrame& self) { return self.IsWasm(); }\n\nbool v8__StackFrame__IsUserJavaScript(const v8::StackFrame& self) { return self.IsUserJavaScript(); }\n\n// JSON\n\nconst v8::Value* v8__JSON__Parse(\n        const v8::Context& ctx,\n        const v8::String& json) {\n    return maybe_local_to_ptr(\n        v8::JSON::Parse(ptr_to_local(&ctx), ptr_to_local(&json)));\n}\n\nconst v8::String* v8__JSON__Stringify(\n        const v8::Context& ctx,\n        const v8::Value& val,\n        const v8::String& gap) {\n    return maybe_local_to_ptr(\n        v8::JSON::Stringify(ptr_to_local(&ctx), ptr_to_local(&val), ptr_to_local(&gap)));\n}\n\n// Misc.\n\nvoid v8__base__SetDcheckFunction(void (*func)(const char*, int, const char*)) {\n    v8::base::SetDcheckFunction(func);\n}\n\n}"
  },
  {
    "path": "src/binding.h",
    "content": "#include <stdint.h>\n#include <stddef.h>\n#include <stdbool.h>\n\ntypedef uintptr_t usize;\ntypedef struct Data Data;\ntypedef struct ArrayBuffer ArrayBuffer;\ntypedef struct ArrayBufferAllocator ArrayBufferAllocator;\ntypedef struct CreateParams CreateParams;\ntypedef struct Isolate Isolate;\ntypedef struct StackTrace StackTrace;\ntypedef struct StackFrame StackFrame;\ntypedef struct FixedArray FixedArray;\ntypedef struct Module Module;\ntypedef struct FunctionTemplate FunctionTemplate;\ntypedef struct Message Message;\ntypedef struct Name Name;\ntypedef struct Context Context;\n// Internally, all Value types have a base InternalAddress struct.\ntypedef uintptr_t InternalAddress;\n// Super type.\ntypedef Data Value;\ntypedef Value Object;\ntypedef Value String;\ntypedef Value Function;\ntypedef Value Number;\ntypedef Value Primitive;\ntypedef Value Integer;\ntypedef Value BigInt;\ntypedef Value Array;\ntypedef Value Uint8Array;\ntypedef Value ArrayBufferView;\ntypedef Value External;\ntypedef Value Boolean;\ntypedef Value Promise;\ntypedef Value PromiseResolver;\ntypedef enum CompileOptions {\n    kNoCompileOptions = 0,\n    kConsumeCodeCache = 1,\n    kEagerCompile = 2,\n} CompileOptions;\ntypedef enum NoCacheReason {\n    kNoCacheNoReason = 0,\n    kNoCacheBecauseCachingDisabled,\n    kNoCacheBecauseNoResource,\n    kNoCacheBecauseInlineScript,\n    kNoCacheBecauseModule,\n    kNoCacheBecauseStreamingSource,\n    kNoCacheBecauseInspector,\n    kNoCacheBecauseScriptTooSmall,\n    kNoCacheBecauseCacheTooCold,\n    kNoCacheBecauseV8Extension,\n    kNoCacheBecauseExtensionModule,\n    kNoCacheBecausePacScript,\n    kNoCacheBecauseInDocumentWrite,\n    kNoCacheBecauseResourceWithNoCacheHandler,\n    kNoCacheBecauseDeferredProduceCodeCache\n} NoCacheReason;\ntypedef enum PromiseRejectEvent {\n    kPromiseRejectWithNoHandler = 0,\n    kPromiseHandlerAddedAfterReject = 1,\n    kPromiseRejectAfterResolved = 2,\n    kPromiseResolveAfterResolved = 3,\n} PromiseRejectEvent;\ntypedef struct PromiseRejectMessage PromiseRejectMessage;\ntypedef void (*PromiseRejectCallback)(PromiseRejectMessage);\ntypedef enum MessageErrorLevel {\n    kMessageLog = (1 << 0),\n    kMessageDebug = (1 << 1),\n    kMessageInfo = (1 << 2),\n    kMessageError = (1 << 3),\n    kMessageWarning = (1 << 4),\n    kMessageAll = kMessageLog | kMessageDebug | kMessageInfo | kMessageError |\n                  kMessageWarning,\n} MessageErrorLevel;\ntypedef void (*MessageCallback)(const Message* message, const Value* data);\ntypedef usize UniquePtr;\ntypedef struct SharedPtr {\n    usize a;\n    usize b;\n} SharedPtr;\ntypedef uintptr_t IntAddress; // v8::internal::Address\n\ntypedef struct MaybeU32 {\n    bool has_value;\n    uint32_t value;\n} MaybeU32;\ntypedef struct MaybeI32 {\n    bool has_value;\n    int32_t value;\n} MaybeI32;\ntypedef struct MaybeF64 {\n    bool has_value;\n    double value;\n} MaybeF64;\ntypedef struct MaybeBool {\n    bool has_value;\n    bool value;\n} MaybeBool;\ntypedef enum PropertyAttribute {\n    /** None. **/\n    None = 0,\n    /** ReadOnly, i.e., not writable. **/\n    ReadOnly = 1 << 0,\n    /** DontEnum, i.e., not enumerable. **/\n    DontEnum = 1 << 1,\n    /** DontDelete, i.e., not configurable. **/\n    DontDelete = 1 << 2\n} PropertyAttribute;\n\n// Platform\ntypedef struct Platform Platform;\nPlatform* v8__Platform__NewDefaultPlatform(int thread_pool_size, int idle_task_support);\nvoid v8__Platform__DELETE(Platform* platform);\nbool v8__Platform__PumpMessageLoop(Platform* platform, Isolate* isolate, bool wait_for_work);\n\n// Root\nconst Primitive* v8__Undefined(Isolate* isolate);\nconst Primitive* v8__Null(Isolate* isolate);\nconst Boolean* v8__True(Isolate* isolate);\nconst Boolean* v8__False(Isolate* isolate);\nconst Uint8Array* v8__Uint8Array__New(\n    const ArrayBuffer* buf,\n    size_t byte_offset,\n    size_t length);\n\n// V8\nvoid v8__V8__InitializePlatform(Platform* platform);\nvoid v8__V8__Initialize();\nint v8__V8__Dispose();\nvoid v8__V8__DisposePlatform();\nconst char* v8__V8__GetVersion();\n\n// Microtask\ntypedef enum MicrotasksPolicy { kExplicit, kScoped, kAuto } MicrotasksPolicy;\n\n// Isolate\nIsolate* v8__Isolate__New(CreateParams* params);\nvoid v8__Isolate__Enter(Isolate* isolate);\nvoid v8__Isolate__Exit(Isolate* isolate);\nvoid v8__Isolate__Dispose(Isolate* isolate);\nContext* v8__Isolate__GetCurrentContext(Isolate* isolate);\nconst Value* v8__Isolate__ThrowException(\n    Isolate* isolate,\n    const Value* exception);\nvoid v8__Isolate__SetPromiseRejectCallback(\n    Isolate* isolate,\n    PromiseRejectCallback callback);\nMicrotasksPolicy v8__Isolate__GetMicrotasksPolicy(const Isolate* self);\nvoid v8__Isolate__SetMicrotasksPolicy(\n    Isolate* self,\n    MicrotasksPolicy policy);\nvoid v8__Isolate__PerformMicrotaskCheckpoint(Isolate* self);\nbool v8__Isolate__AddMessageListener(\n    Isolate* self,\n    MessageCallback callback);\nbool v8__Isolate__AddMessageListenerWithErrorLevel(\n    Isolate* self,\n    MessageCallback callback,\n    int message_levels,\n    const Value* data);\nvoid v8__Isolate__SetCaptureStackTraceForUncaughtExceptions(\n    Isolate* isolate,\n    bool capture,\n    int frame_limit);\nvoid v8__Isolate__TerminateExecution(Isolate* self);\nbool v8__Isolate__IsExecutionTerminating(Isolate* self);\nvoid v8__Isolate__CancelTerminateExecution(Isolate* self);\nvoid v8__Isolate__LowMemoryNotification(Isolate* self);\ntypedef struct HeapStatistics {\n    size_t total_heap_size;\n    size_t total_heap_size_executable;\n    size_t total_physical_size;\n    size_t total_available_size;\n    size_t used_heap_size;\n    size_t heap_size_limit;\n    size_t malloced_memory;\n    size_t external_memory;\n    size_t peak_malloced_memory;\n    bool does_zap_garbage;\n    size_t number_of_native_contexts;\n    size_t number_of_detached_contexts;\n    size_t total_global_handles_size;\n    size_t used_global_handles_size;\n} HeapStatistics;\nvoid v8__Isolate__GetHeapStatistics(\n    Isolate* self,\n    HeapStatistics* stats);\nusize v8__HeapStatistics__SIZEOF();\n\ntypedef struct StartupData {\n    const char* data;\n    int raw_size;\n} StartupData;\n\ntypedef struct ResourceConstraints {\n    usize code_range_size_;\n    usize max_old_generation_size_;\n    usize max_young_generation_size_;\n    usize initial_old_generation_size_;\n    usize initial_young_generation_size_;\n    uint32_t* stack_limit_;\n} ResourceConstraints;\n\ntypedef struct CreateParams {\n    void* code_event_handler; // JitCodeEventHandler\n    ResourceConstraints constraints;\n    StartupData* snapshot_blob;\n    void* counter_lookup_callback;\n    void* create_histogram_callback; // CreateHistogramCallback\n    void* add_histogram_sample_callback; // AddHistogramSampleCallback\n    ArrayBufferAllocator* array_buffer_allocator;\n    SharedPtr array_buffer_allocator_shared;\n    const intptr_t* external_references;\n    bool allow_atomics_wait;\n    bool only_terminate_in_safe_scope;\n    int embedder_wrapper_type_index;\n    int embedder_wrapper_object_index;\n    void* fatal_error_callback;\n    void* oom_error_callback;\n} CreateParams;\nusize v8__Isolate__CreateParams__SIZEOF();\nvoid v8__Isolate__CreateParams__CONSTRUCT(CreateParams* buf);\n\n// FixedArray\nint v8__FixedArray__Length(const FixedArray* self);\nconst Data* v8__FixedArray__Get(\n    const FixedArray* self,\n    const Context* ctx,\n    int idx);\n\n// ArrayBuffer\ntypedef void (*PromiseRejectCallback)(PromiseRejectMessage);\ntypedef void (*BackingStoreDeleterCallback)(void* data, size_t len, void* deleter_data);\ntypedef struct BackingStore BackingStore;\nArrayBufferAllocator* v8__ArrayBuffer__Allocator__NewDefaultAllocator();\nvoid v8__ArrayBuffer__Allocator__DELETE(ArrayBufferAllocator* self);\nBackingStore* v8__ArrayBuffer__NewBackingStore(\n    Isolate* isolate,\n    size_t byte_len);\nBackingStore* v8__ArrayBuffer__NewBackingStore2(\n    void* data,\n    size_t byte_len,\n    BackingStoreDeleterCallback deleter,\n    void* deleter_data);\nvoid* v8__BackingStore__Data(const BackingStore* self);\nsize_t v8__BackingStore__ByteLength(const BackingStore* self);\nbool v8__BackingStore__IsShared(const BackingStore* self);\nSharedPtr v8__BackingStore__TO_SHARED_PTR(BackingStore* unique_ptr);\nvoid std__shared_ptr__v8__BackingStore__reset(SharedPtr* self);\nBackingStore* std__shared_ptr__v8__BackingStore__get(const SharedPtr* self);\nlong std__shared_ptr__v8__BackingStore__use_count(const SharedPtr* self);\nconst ArrayBuffer* v8__ArrayBuffer__New(Isolate* isolate, size_t byte_len);\nconst ArrayBuffer* v8__ArrayBuffer__New2(Isolate* isolate, const SharedPtr* backing_store);\nsize_t v8__ArrayBuffer__ByteLength(const ArrayBuffer* self);\nSharedPtr v8__ArrayBuffer__GetBackingStore(const ArrayBuffer* self);\n\n// ArrayBufferView\nconst ArrayBuffer* v8__ArrayBufferView__Buffer(const ArrayBufferView* self);\n\n// HandleScope\ntypedef struct HandleScope {\n    // internal vars.\n    Isolate* isolate_;\n    InternalAddress* prev_next_;\n    InternalAddress* prev_limit_;\n} HandleScope;\nvoid v8__HandleScope__CONSTRUCT(HandleScope* buf, Isolate* isolate);\nvoid v8__HandleScope__DESTRUCT(HandleScope* scope);\n\n// Message\nconst String* v8__Message__Get(const Message* self);\nconst String* v8__Message__GetSourceLine(const Message* self, const Context* context);\nconst Value* v8__Message__GetScriptResourceName(const Message* self);\nint v8__Message__GetLineNumber(const Message* self, const Context* context);\nint v8__Message__GetStartColumn(const Message* self);\nint v8__Message__GetEndColumn(const Message* self);\nconst StackTrace* v8__Message__GetStackTrace(const Message* self);\n\n// TryCatch\ntypedef struct TryCatch {\n    void* isolate_;\n    struct TryCatch* next_;\n    void* exception_;\n    void* message_obj_;\n    IntAddress js_stack_comparable_address_;\n    usize flags;\n} TryCatch;\nusize v8__TryCatch__SIZEOF();\nvoid v8__TryCatch__CONSTRUCT(TryCatch* buf, Isolate* isolate);\nvoid v8__TryCatch__DESTRUCT(TryCatch* self);\nconst Value* v8__TryCatch__Exception(const TryCatch* self);\nconst Message* v8__TryCatch__Message(const TryCatch* self);\nbool v8__TryCatch__HasCaught(const TryCatch* self);\nconst Value* v8__TryCatch__StackTrace(const TryCatch* self, const Context* context);\nbool v8__TryCatch__IsVerbose(const TryCatch* self);\nvoid v8__TryCatch__SetVerbose(\n    TryCatch* self, \n    bool value);\nconst Value* v8__TryCatch__ReThrow(TryCatch* self);\n\n// StackTrace\nint v8__StackTrace__GetFrameCount(const StackTrace* self);\nconst StackFrame* v8__StackTrace__GetFrame(\n    const StackTrace* self,\n    Isolate* isolate,\n    uint32_t idx);\nconst StackTrace* v8__StackTrace__CurrentStackTrace__STATIC(Isolate* isolate, int frame_limit);\nconst String* v8__StackTrace__CurrentScriptNameOrSourceURL__STATIC(Isolate* isolate);\n\n// StackFrame\nint v8__StackFrame__GetLineNumber(const StackFrame* self);\nint v8__StackFrame__GetColumn(const StackFrame* self);\nint v8__StackFrame__GetScriptId(const StackFrame* self);\nconst String* v8__StackFrame__GetScriptName(const StackFrame* self);\nconst String* v8__StackFrame__GetScriptNameOrSourceURL(const StackFrame* self);\nconst String* v8__StackFrame__GetFunctionName(const StackFrame* self);\nbool v8__StackFrame__IsEval(const StackFrame* self);\nbool v8__StackFrame__IsConstructor(const StackFrame* self);\nbool v8__StackFrame__IsWasm(const StackFrame* self);\nbool v8__StackFrame__IsUserJavaScript(const StackFrame* self);\n\n// Context\ntypedef struct Context Context;\ntypedef struct ObjectTemplate ObjectTemplate;\nContext* v8__Context__New(Isolate* isolate, const ObjectTemplate* global_tmpl, const Value* global_obj);\nvoid v8__Context__Enter(const Context* context);\nvoid v8__Context__Exit(const Context* context);\nIsolate* v8__Context__GetIsolate(const Context* context);\nconst Object* v8__Context__Global(const Context* self);\nconst Value* v8__Context__GetEmbedderData(\n    const Context* self,\n    int idx);\nvoid v8__Context__SetEmbedderData(\n    const Context* self,\n    int idx,\n    const Value* val);\n\n// Boolean\nconst Boolean* v8__Boolean__New(\n    Isolate* isolate,\n    bool value);\n\n// String\ntypedef enum NewStringType {\n    /**\n     * Create a new string, always allocating new storage memory.\n     */\n    kNormal,\n\n    /**\n     * Acts as a hint that the string should be created in the\n     * old generation heap space and be deduplicated if an identical string\n     * already exists.\n     */\n    kInternalized\n} NewStringType;\ntypedef enum WriteOptions {\n    NO_OPTIONS = 0,\n    HINT_MANY_WRITES_EXPECTED = 1,\n    NO_NULL_TERMINATION = 2,\n    PRESERVE_ONE_BYTE_NULL = 4,\n    // Used by WriteUtf8 to replace orphan surrogate code units with the\n    // unicode replacement character. Needs to be set to guarantee valid UTF-8\n    // output.\n    REPLACE_INVALID_UTF8 = 8\n} WriteOptions;\nString* v8__String__NewFromUtf8(Isolate* isolate, const char* data, NewStringType type, int length);\nint v8__String__WriteUtf8(const String* str, Isolate* isolate, const char* buf, int len, int* nchars, WriteOptions options);\nint v8__String__Utf8Length(const String* str, Isolate* isolate);\n\n// Value\nString* v8__Value__ToString(\n    const Value* self,\n    const Context* ctx);\nconst String* v8__Value__ToDetailString(\n    const Value* self,\n    const Context* ctx);\nbool v8__Value__BooleanValue(\n    const Value* self,\n    Isolate* isolate);\nvoid v8__Value__Uint32Value(\n    const Value* self,\n    const Context* ctx,\n    MaybeU32* out);\nvoid v8__Value__Int32Value(\n    const Value* self,\n    const Context* ctx,\n    MaybeI32* out);\nvoid v8__Value__NumberValue(\n    const Value* self,\n    const Context* context,\n    MaybeF64* out);\nbool v8__Value__IsFunction(const Value* self);\nbool v8__Value__IsAsyncFunction(const Value* self);\nbool v8__Value__IsObject(const Value* self);\nbool v8__Value__IsString(const Value* self);\nbool v8__Value__IsArray(const Value* self);\nbool v8__Value__IsArrayBuffer(const Value* self);\nbool v8__Value__IsArrayBufferView(const Value* self);\nbool v8__Value__IsUint8Array(const Value* self);\nbool v8__Value__IsExternal(const Value* self);\nbool v8__Value__IsTrue(const Value* self);\nbool v8__Value__IsFalse(const Value* self);\nbool v8__Value__IsUndefined(const Value* self);\nbool v8__Value__IsNull(const Value* self);\nbool v8__Value__IsNullOrUndefined(const Value* self);\nbool v8__Value__IsNativeError(const Value* self);\nbool v8__Value__IsBigInt(const Value* self);\nbool v8__Value__IsBigIntObject(const Value* self);\nvoid v8__Value__InstanceOf(\n    const Value* self,\n    const Context* ctx,\n    const Object* object,\n    MaybeBool* out);\n\n// Promise\ntypedef enum PromiseState { kPending, kFulfilled, kRejected } PromiseState;\nconst PromiseResolver* v8__Promise__Resolver__New(\n    const Context* ctx);\nconst Promise* v8__Promise__Resolver__GetPromise(\n    const PromiseResolver* self);\nvoid v8__Promise__Resolver__Resolve(\n    const PromiseResolver* self,\n    const Context* ctx,\n    const Value* value,\n    MaybeBool* out);\nvoid v8__Promise__Resolver__Reject(\n    const PromiseResolver* self,\n    const Context* ctx,\n    const Value* value,\n    MaybeBool* out);\nconst Promise* v8__Promise__Catch(\n    const Promise* self,\n    const Context* ctx,\n    const Function* handler);\nconst Promise* v8__Promise__Then(\n    const Promise* self,\n    const Context* ctx,\n    const Function* handler);\nconst Promise* v8__Promise__Then2(\n    const Promise* self,\n    const Context* ctx,\n    const Function* on_fulfilled,\n    const Function* on_rejected);\nPromiseState v8__Promise__State(const Promise* self);\nvoid v8__Promise__MarkAsHandled(const Promise* self);\nconst Value* v8__Promise__Result(const Promise* self);\n\n// Array\nconst Array* v8__Array__New(\n    Isolate* isolate,\n    int length);\nconst Array* v8__Array__New2(\n    Isolate* isolate,\n    const Value* const elements[],\n    size_t length);\nuint32_t v8__Array__Length(const Array* self);\n\n// Object\nconst Object* v8__Object__New(Isolate* isolate);\nconst Value* v8__Object__GetInternalField(\n    const Object* self,\n    int index);\nvoid v8__Object__SetInternalField(\n    const Object* self,\n    int index,\n    const Value* value);\nconst Value* v8__Object__Get(\n    const Object* self,\n    const Context* ctx,\n    const Value* key);\nconst Value* v8__Object__GetIndex(\n    const Object* self,\n    const Context* ctx,\n    uint32_t idx);\nvoid v8__Object__Set(\n    const Object* self,\n    const Context* ctx,\n    const Value* key,\n    const Value* value,\n    MaybeBool* out);\nvoid v8__Object__DefineOwnProperty(\n    const Object* self,\n    const Context* ctx,\n    const Name* key,\n    const Value* value,\n    PropertyAttribute attr,\n    MaybeBool* out);\nIsolate* v8__Object__GetIsolate(const Object* self);\nconst Context* v8__Object__GetCreationContext(const Object* self);\nint v8__Object__GetIdentityHash(const Object* self);\nvoid v8__Object__Has(\n    const Object* self,\n    const Context* ctx,\n    const Value* key,\n    MaybeBool* out);\nvoid v8__Object__HasIndex(\n    const Object* self,\n    const Context* ctx,\n    uint32_t idx,\n    MaybeBool* out);\nconst Array* v8__Object__GetOwnPropertyNames(\n    const Object* self,\n    const Context* ctx);\nconst Array* v8__Object__GetPropertyNames(\n    const Object* self,\n    const Context* ctx);\nvoid v8__Object__SetAlignedPointerInInternalField(\n    const Object* self,\n    int idx,\n    void* ptr);\n\n// Exception\nconst Value* v8__Exception__Error(const String* message);\nconst Value* v8__Exception__TypeError(const String* message);\nconst Value* v8__Exception__SyntaxError(const String* message);\nconst Value* v8__Exception__ReferenceError(const String* message);\nconst Value* v8__Exception__RangeError(const String* message);\nconst StackTrace* v8__Exception__GetStackTrace(const Value* exception);\nconst Message* v8__Exception__CreateMessage(\n    Isolate* isolate,\n    const Value* exception);\n\n// Number\nconst Number* v8__Number__New(\n    Isolate* isolate,\n    double value);\n\n// Integer\nconst Integer* v8__Integer__New(\n    Isolate* isolate,\n    int32_t value);\nconst Integer* v8__Integer__NewFromUnsigned(\n    Isolate* isolate,\n    uint32_t value);\nint64_t v8__Integer__Value(const Integer* self);\n\n// BigInt\nconst BigInt* v8__BigInt__New(\n    Isolate* iso, \n    int64_t val);\nconst BigInt* v8__BigInt__NewFromUnsigned(\n    Isolate* iso,\n    uint64_t val);\nuint64_t v8__BigInt__Uint64Value(\n    const BigInt* self,\n    bool* lossless);\nint64_t v8__BigInt__Int64Value(\n    const BigInt* self,\n    bool* lossless);\n\n// Template\ntypedef struct Template Template;\nvoid v8__Template__Set(\n    const Template* self,\n    const Name* key,\n    const Data* value,\n    PropertyAttribute attr);\nvoid v8__Template__SetAccessorProperty__DEFAULT(\n    const Template* self,\n    const Name* key,\n    const FunctionTemplate* getter);\n\n// FunctionCallbackInfo\ntypedef struct FunctionCallbackInfo FunctionCallbackInfo;\ntypedef struct ReturnValue {\n    uintptr_t addr;\n} ReturnValue;\nIsolate* v8__FunctionCallbackInfo__GetIsolate(\n    const FunctionCallbackInfo* self);\nint v8__FunctionCallbackInfo__Length(\n    const FunctionCallbackInfo* self);\nconst Value* v8__FunctionCallbackInfo__INDEX(\n    const FunctionCallbackInfo* self, int i);\nvoid v8__FunctionCallbackInfo__GetReturnValue(\n    const FunctionCallbackInfo* self,\n    ReturnValue* res);\nconst Object* v8__FunctionCallbackInfo__This(\n    const FunctionCallbackInfo* self);\nconst Value* v8__FunctionCallbackInfo__Data(\n    const FunctionCallbackInfo* self);\n\n// PropertyCallbackInfo\ntypedef struct PropertyCallbackInfo PropertyCallbackInfo;\nIsolate* v8__PropertyCallbackInfo__GetIsolate(\n    const PropertyCallbackInfo* self);\nvoid v8__PropertyCallbackInfo__GetReturnValue(\n    const PropertyCallbackInfo* self,\n    ReturnValue* res);\nconst Object* v8__PropertyCallbackInfo__This(\n    const PropertyCallbackInfo* self);\nconst Value* v8__PropertyCallbackInfo__Data(\n    const PropertyCallbackInfo* self);\n\n// PromiseRejectMessage\nstruct PromiseRejectMessage {\n    uintptr_t promise;\n    PromiseRejectEvent event;\n    uintptr_t value;\n};\nPromiseRejectEvent v8__PromiseRejectMessage__GetEvent(\n    const PromiseRejectMessage* self);\nconst Promise* v8__PromiseRejectMessage__GetPromise(\n    const PromiseRejectMessage* self);\nconst Value* v8__PromiseRejectMessage__GetValue(\n    const PromiseRejectMessage* self);\nusize v8__PromiseRejectMessage__SIZEOF();\n\n// ReturnValue\nvoid v8__ReturnValue__Set(\n    const ReturnValue self,\n    const Value* value);\nconst Value* v8__ReturnValue__Get(\n    const ReturnValue self);\n\n// FunctionTemplate\ntypedef void (*FunctionCallback)(const FunctionCallbackInfo*);\nconst FunctionTemplate* v8__FunctionTemplate__New__DEFAULT(\n    Isolate* isolate);\nconst FunctionTemplate* v8__FunctionTemplate__New__DEFAULT2(\n    Isolate* isolate,\n    FunctionCallback callback_or_null);\nconst FunctionTemplate* v8__FunctionTemplate__New__DEFAULT3(\n    Isolate* isolate,\n    FunctionCallback callback_or_null,\n    const Value* data);\nconst ObjectTemplate* v8__FunctionTemplate__InstanceTemplate(\n    const FunctionTemplate* self);\nconst ObjectTemplate* v8__FunctionTemplate__PrototypeTemplate(\n    const FunctionTemplate* self);\nconst Function* v8__FunctionTemplate__GetFunction(\n    const FunctionTemplate* self, const Context* context);\nvoid v8__FunctionTemplate__SetClassName(\n    const FunctionTemplate* self,\n    const String* name);\nvoid v8__FunctionTemplate__ReadOnlyPrototype(\n    const FunctionTemplate* self);\n\n// Function\nconst Function* v8__Function__New__DEFAULT(\n    const Context* ctx,\n    FunctionCallback callback);\nconst Function* v8__Function__New__DEFAULT2(\n    const Context* ctx,\n    FunctionCallback callback,\n    const Value* data);\nconst Value* v8__Function__Call(\n    const Function* self,\n    const Context* context,\n    const Value* recv,\n    int argc,\n    const Value* const argv[]);\nconst Object* v8__Function__NewInstance(\n    const Function* self,\n    const Context* context,\n    int argc,\n    const Value* const argv[]);\nconst Value* v8__Function__GetName(const Function* self);\nvoid v8__Function__SetName(const Function* self, const String* name);\n\n// External\nconst External* v8__External__New(\n    Isolate* isolate, \n    void* value);\nvoid* v8__External__Value(\n    const External* self);\n\n// Persistent\ntypedef struct Persistent {\n    uintptr_t data_ptr;\n} Persistent;\nvoid v8__Persistent__New(\n    Isolate* isolate,\n    const Data* data,\n    Persistent* out);\nvoid v8__Persistent__Reset(\n    Persistent* self);\nvoid v8__Persistent__SetWeak(\n    Persistent* self);\ntypedef struct WeakCallbackInfo WeakCallbackInfo;\ntypedef void (*WeakCallback)(const WeakCallbackInfo*);\ntypedef enum WeakCallbackType {\n    kParameter,\n    kInternalFields,\n    kFinalizer\n} WeakCallbackType;\nvoid v8__Persistent__SetWeakFinalizer(\n    Persistent* self,\n    void* finalizer_ctx,\n    WeakCallback finalizer_cb,\n    WeakCallbackType type);\n\n// WeakCallbackInfo\nIsolate* v8__WeakCallbackInfo__GetIsolate(const WeakCallbackInfo* self);\nvoid* v8__WeakCallbackInfo__GetParameter(const WeakCallbackInfo* self);\nvoid* v8__WeakCallbackInfo__GetInternalField(\n    const WeakCallbackInfo* self,\n    int idx);\n\n// ObjectTemplate\ntypedef struct ObjectTemplate ObjectTemplate;\nObjectTemplate* v8__ObjectTemplate__New__DEFAULT(\n    Isolate* isolate);\nObjectTemplate* v8__ObjectTemplate__New(\n    Isolate* isolate, const FunctionTemplate* templ);\nObject* v8__ObjectTemplate__NewInstance(\n    const ObjectTemplate* self, const Context* ctx);\nvoid v8__ObjectTemplate__SetInternalFieldCount(\n    const ObjectTemplate* self,\n    int value);\ntypedef void (*AccessorNameGetterCallback)(const Name*, const PropertyCallbackInfo*);\ntypedef void (*AccessorNameSetterCallback)(const Name*, const Value*, const PropertyCallbackInfo*);\nvoid v8__ObjectTemplate__SetAccessor__DEFAULT(\n    const ObjectTemplate* self,\n    const Name* key,\n    AccessorNameGetterCallback getter);\nvoid v8__ObjectTemplate__SetAccessor__DEFAULT2(\n    const ObjectTemplate* self,\n    const Name* key,\n    AccessorNameGetterCallback getter,\n    AccessorNameSetterCallback setter);\n\n// ScriptOrigin\ntypedef struct ScriptOriginOptions {\n    const int flags_;\n} ScriptOriginOptions;\ntypedef struct ScriptOrigin {\n    Isolate* isolate_;\n    Value* resource_name_;\n    int resource_line_offset_;\n    int resource_column_offset_;\n    ScriptOriginOptions options_;\n    int script_id_;\n    Value* source_map_url_;\n    void* host_defined_options_;\n} ScriptOrigin;\nvoid v8__ScriptOrigin__CONSTRUCT(ScriptOrigin* buf, Isolate* isolate, const Value* resource_name);\nvoid v8__ScriptOrigin__CONSTRUCT2(\n    ScriptOrigin* buf,\n    Isolate* isolate,\n    const Value* resource_name,\n    int resource_line_offset,\n    int resource_column_offset,\n    bool resource_is_shared_cross_origin,\n    int script_id,\n    const Value* source_map_url,\n    bool resource_is_opaque,\n    bool is_wasm,\n    bool is_module,\n    const Data* host_defined_options\n);\n\n// ScriptCompiler\ntypedef struct ScriptCompilerSource {\n    String* source_string;\n\n    // Origin information\n    Value* resource_name;\n    int resource_line_offset;\n    int resource_column_offset;\n    ScriptOriginOptions resource_options;\n    Value* source_map_url;\n    Data* host_defined_options;\n\n    // Cached data from previous compilation (if a kConsume*Cache flag is\n    // set), or hold newly generated cache data (kProduce*Cache flags) are\n    // set when calling a compile method.\n    UniquePtr cached_data;\n    UniquePtr consume_cache_task;\n} ScriptCompilerSource;\ntypedef enum BufferPolicy {\n    BufferNotOwned,\n    BufferOwned\n} BufferPolicy;\ntypedef struct ScriptCompilerCachedData {\n    const uint8_t* data;\n    int length;\n    bool rejected;\n    BufferPolicy buffer_policy;\n} ScriptCompilerCachedData;\nsize_t v8__ScriptCompiler__Source__SIZEOF();\nvoid v8__ScriptCompiler__Source__CONSTRUCT(\n    const String* src,\n    ScriptCompilerCachedData* cached_data,\n    ScriptCompilerSource* out);\nvoid v8__ScriptCompiler__Source__CONSTRUCT2(\n    const String* src,\n    const ScriptOrigin* origin,\n    ScriptCompilerCachedData* cached_data,\n    ScriptCompilerSource* out);\nvoid v8__ScriptCompiler__Source__DESTRUCT(ScriptCompilerSource* self);\nsize_t v8__ScriptCompiler__CachedData__SIZEOF();\nScriptCompilerCachedData* v8__ScriptCompiler__CachedData__NEW(\n    const uint8_t* data,\n    int length);\nvoid v8__ScriptCompiler__CachedData__DELETE(ScriptCompilerCachedData* self);\nconst Module* v8__ScriptCompiler__CompileModule(\n    Isolate* isolate,\n    ScriptCompilerSource* source,\n    CompileOptions options,\n    NoCacheReason reason);\n\n// Script\ntypedef struct Script Script;\nScript* v8__Script__Compile(const Context* context, const String* src, const ScriptOrigin* origin);\nValue* v8__Script__Run(const Script* script, const Context* context);\n\n// Module\ntypedef enum ModuleStatus {\n    kUninstantiated,\n    kInstantiating,\n    kInstantiated,\n    kEvaluating,\n    kEvaluated,\n    kErrored\n} ModuleStatus;\nModuleStatus v8__Module__GetStatus(const Module* self);\nconst Value* v8__Module__GetException(const Module* self);\nconst FixedArray* v8__Module__GetModuleRequests(const Module* self);\ntypedef const Module* (*ResolveModuleCallback)(\n    const Context* ctx, const String* spec,\n    const FixedArray* import_assertions, const Module* referrer);\nvoid v8__Module__InstantiateModule(\n    const Module* self,\n    const Context* ctx,\n    ResolveModuleCallback cb,\n    MaybeBool* out);\nconst Value* v8__Module__Evaluate(const Module* self, const Context* ctx);\nint v8__Module__GetIdentityHash(const Module* self);\nint v8__Module__ScriptId(const Module* self);\n\n// ModuleRequest\ntypedef Data ModuleRequest;\nconst String* v8__ModuleRequest__GetSpecifier(const ModuleRequest* self);\nint v8__ModuleRequest__GetSourceOffset(const ModuleRequest* self);\n\n// JSON\nconst Value* v8__JSON__Parse(\n    const Context* ctx,\n    const String* json);\nconst String* v8__JSON__Stringify(\n    const Context* ctx,\n    const Value* val,\n    const String* gap);\n\n// Misc.\nvoid v8__base__SetDcheckFunction(void (*func)(const char*, int, const char*));\n"
  },
  {
    "path": "src/shell.zig",
    "content": "const std = @import(\"std\");\nconst v8 = @import(\"v8.zig\");\n\n// Demo js repl.\n\npub fn main() !void {\n    repl();\n    std.process.exit(0);\n}\n\nfn repl() void {\n    var gpa = std.heap.GeneralPurposeAllocator(.{}){};\n    defer _ = gpa.deinit();\n    const alloc = gpa.allocator();\n\n    var input_buf = std.ArrayList(u8).init(alloc);\n    defer input_buf.deinit();\n\n    const platform = v8.Platform.initDefault(0, true);\n    defer platform.deinit();\n\n    v8.initV8Platform(platform);\n    defer v8.deinitV8Platform();\n\n    v8.initV8();\n    defer _ = v8.deinitV8();\n\n    var params = v8.initCreateParams();\n    params.array_buffer_allocator = v8.createDefaultArrayBufferAllocator();\n    defer v8.destroyArrayBufferAllocator(params.array_buffer_allocator.?);\n    var isolate = v8.Isolate.init(&params);\n    defer isolate.deinit();\n\n    isolate.enter();\n    defer isolate.exit();\n\n    var hscope: v8.HandleScope = undefined;\n    hscope.init(isolate);\n    defer hscope.deinit();\n\n    var context = v8.Context.init(isolate, null, null);\n    context.enter();\n    defer context.exit();\n\n    const origin = v8.String.initUtf8(isolate, \"(shell)\");\n\n    printFmt(\n        \\\\JS Repl\n        \\\\exit with Ctrl+D or \"exit()\"\n        \\\\\n    , .{});\n\n    while (true) {\n        printFmt(\"\\n> \", .{});\n        if (getInput(&input_buf)) |input| {\n            if (std.mem.eql(u8, input, \"exit()\")) {\n                break;\n            }\n\n            var res: ExecuteResult = undefined;\n            defer res.deinit();\n            executeString(alloc, isolate, input, origin, &res);\n            if (res.success) {\n                printFmt(\"{s}\", .{res.result.?});\n            } else {\n                printFmt(\"{s}\", .{res.err.?});\n            }\n\n            while (platform.pumpMessageLoop(isolate, false)) {\n                continue;\n            }\n        } else {\n            printFmt(\"\\n\", .{});\n            return;\n        }\n    }\n}\n\nfn getInput(input_buf: *std.ArrayList(u8)) ?[]const u8 {\n    input_buf.clearRetainingCapacity();\n    std.io.getStdIn().reader().readUntilDelimiterArrayList(input_buf, '\\n', 1e9) catch |err| {\n        if (err == error.EndOfStream) {\n            return null;\n        } else {\n            unreachable;\n        }\n    };\n    return input_buf.items;\n}\n\npub fn printFmt(comptime format: []const u8, args: anytype) void {\n    const stdout = std.io.getStdOut().writer();\n    stdout.print(format, args) catch unreachable;\n}\n\npub const ExecuteResult = struct {\n    const Self = @This();\n\n    alloc: std.mem.Allocator,\n    result: ?[]const u8,\n    err: ?[]const u8,\n    success: bool,\n\n    pub fn deinit(self: Self) void {\n        if (self.result) |result| {\n            self.alloc.free(result);\n        }\n        if (self.err) |err| {\n            self.alloc.free(err);\n        }\n    }\n};\n\npub fn executeString(alloc: std.mem.Allocator, isolate: v8.Isolate, src: []const u8, src_origin: v8.String, result: *ExecuteResult) void {\n    var hscope: v8.HandleScope = undefined;\n    hscope.init(isolate);\n    defer hscope.deinit();\n\n    var try_catch: v8.TryCatch = undefined;\n    try_catch.init(isolate);\n    defer try_catch.deinit();\n\n    const origin = v8.ScriptOrigin.initDefault(isolate, src_origin.toValue());\n\n    const context = isolate.getCurrentContext();\n\n    const js_src = v8.String.initUtf8(isolate, src);\n\n    const script = v8.Script.compile(context, js_src, origin) catch {\n        setResultError(alloc, isolate, try_catch, result);\n        return;\n    };\n    const script_res = script.run(context) catch {\n        setResultError(alloc, isolate, try_catch, result);\n        return;\n    };\n    result.* = .{\n        .alloc = alloc,\n        .result = valueToUtf8Alloc(alloc, isolate, context, script_res),\n        .err = null,\n        .success = true,\n    };\n}\n\nfn setResultError(alloc: std.mem.Allocator, isolate: v8.Isolate, try_catch: v8.TryCatch, result: *ExecuteResult) void {\n    result.* = .{\n        .alloc = alloc,\n        .result = null,\n        .err = getTryCatchErrorString(alloc, isolate, try_catch),\n        .success = false,\n    };\n}\n\npub fn valueToUtf8Alloc(alloc: std.mem.Allocator, isolate: v8.Isolate, ctx: v8.Context, any_value: anytype) []const u8 {\n    const val = v8.getValue(any_value);\n    const str = val.toString(ctx) catch unreachable;\n    const len = str.lenUtf8(isolate);\n    const buf = alloc.alloc(u8, len) catch unreachable;\n    _ = str.writeUtf8(isolate, buf);\n    return buf;\n}\n\npub fn getTryCatchErrorString(alloc: std.mem.Allocator, isolate: v8.Isolate, try_catch: v8.TryCatch) []const u8 {\n    var hscope: v8.HandleScope = undefined;\n    hscope.init(isolate);\n    defer hscope.deinit();\n\n    const ctx = isolate.getCurrentContext();\n\n    if (try_catch.getMessage()) |message| {\n        var buf = std.ArrayList(u8).init(alloc);\n        const writer = buf.writer();\n\n        // Append source line.\n        const source_line = message.getSourceLine(ctx).?;\n        _ = appendValueAsUtf8(&buf, isolate, ctx, source_line);\n        writer.writeAll(\"\\n\") catch unreachable;\n\n        // Print wavy underline.\n        const col_start = message.getStartColumn().?;\n        const col_end = message.getEndColumn().?;\n\n        var i: u32 = 0;\n        while (i < col_start) : (i += 1) {\n            writer.writeByte(' ') catch unreachable;\n        }\n        while (i < col_end) : (i += 1) {\n            writer.writeByte('^') catch unreachable;\n        }\n        writer.writeByte('\\n') catch unreachable;\n\n        if (try_catch.getStackTrace(ctx)) |trace| {\n            _ = appendValueAsUtf8(&buf, isolate, ctx, trace);\n            writer.writeByte('\\n') catch unreachable;\n        }\n\n        return buf.toOwnedSlice() catch unreachable;\n    } else {\n        // V8 didn't provide any extra information about this error, just get exception str.\n        const exception = try_catch.getException().?;\n        return valueToUtf8Alloc(alloc, isolate, ctx, exception);\n    }\n}\n\npub fn appendValueAsUtf8(arr: *std.ArrayList(u8), isolate: v8.Isolate, ctx: v8.Context, any_value: anytype) []const u8 {\n    const val = v8.getValue(any_value);\n    const str = val.toString(ctx) catch unreachable;\n    const len = str.lenUtf8(isolate);\n    const start = arr.items.len;\n    arr.resize(start + len) catch unreachable;\n    _ = str.writeUtf8(isolate, arr.items[start..arr.items.len]);\n    return arr.items[start..];\n}\n"
  },
  {
    "path": "src/test.zig",
    "content": "const std = @import(\"std\");\nconst t = std.testing;\nconst v8 = @import(\"./v8.zig\");\n\ntest {\n    // Based on https://chromium.googlesource.com/v8/v8/+/branch-heads/6.8/samples/hello-world.cc\n\n    const platform = v8.Platform.initDefault(0, true);\n    defer platform.deinit();\n\n    std.log.info(\"v8 version: {s}\\n\", .{v8.getVersion()});\n\n    v8.initV8Platform(platform);\n    v8.initV8();\n    defer {\n        _ = v8.deinitV8();\n        v8.deinitV8Platform();\n    }\n\n    var params = v8.initCreateParams();\n    params.array_buffer_allocator = v8.createDefaultArrayBufferAllocator();\n    defer v8.destroyArrayBufferAllocator(params.array_buffer_allocator.?);\n\n    var isolate = v8.Isolate.init(&params);\n    defer isolate.deinit();\n\n    isolate.enter();\n    defer isolate.exit();\n\n    // Create a stack-allocated handle scope.\n    var hscope: v8.HandleScope = undefined;\n    hscope.init(isolate);\n    defer hscope.deinit();\n\n    // Create a new context.\n    var context = v8.Context.init(isolate, null, null);\n    context.enter();\n    defer context.exit();\n\n    // Create a string containing the JavaScript source code.\n    const source = v8.String.initUtf8(isolate, \"'Hello' + ', World! 🍏🍓' + Math.sin(Math.PI/2)\");\n\n    // Compile the source code.\n    const script = try v8.Script.compile(context, source, null);\n\n    // Run the script to get the result.\n    const value = try script.run(context);\n\n    // Convert the result to an UTF8 string and print it.\n    const res = valueToRawUtf8Alloc(t.allocator, isolate, context, value);\n    defer t.allocator.free(res);\n\n    std.log.info(\"{s}\", .{res});\n    try t.expectEqualStrings(res, \"Hello, World! 🍏🍓1\");\n}\n\npub fn valueToRawUtf8Alloc(alloc: std.mem.Allocator, isolate: v8.Isolate, ctx: v8.Context, val: v8.Value) []const u8 {\n    const str = val.toString(ctx) catch unreachable;\n    const len = str.lenUtf8(isolate);\n    const buf = alloc.alloc(u8, len) catch unreachable;\n    _ = str.writeUtf8(isolate, buf);\n    return buf;\n}\n"
  },
  {
    "path": "src/v8.zig",
    "content": "const std = @import(\"std\");\nconst t = std.testing;\n\nconst c = @cImport({\n    @cInclude(\"binding.h\");\n});\n\npub const PropertyAttribute = struct {\n    pub const None = c.None;\n    pub const ReadOnly = c.ReadOnly;\n};\n\npub const PromiseRejectEvent = struct {\n    pub const kPromiseRejectWithNoHandler = c.kPromiseRejectWithNoHandler;\n    pub const kPromiseHandlerAddedAfterReject = c.kPromiseHandlerAddedAfterReject;\n    pub const kPromiseRejectAfterResolved = c.kPromiseRejectAfterResolved;\n    pub const kPromiseResolveAfterResolved = c.kPromiseResolveAfterResolved;\n};\n\npub const MessageErrorLevel = struct {\n    pub const kMessageLog = c.kMessageLog;\n    pub const kMessageDebug = c.kMessageDebug;\n    pub const kMessageInfo = c.kMessageInfo;\n    pub const kMessageError = c.kMessageError;\n    pub const kMessageWarning = c.kMessageWarning;\n    pub const kMessageAll = c.kMessageAll;\n};\n\n/// [V8]\n/// Policy for running microtasks:\n/// - explicit: microtasks are invoked with the\n///     Isolate::PerformMicrotaskCheckpoint() method;\n/// - scoped: microtasks invocation is controlled by MicrotasksScope objects;\n/// - auto: microtasks are invoked when the script call depth decrements to zero.\npub const MicrotasksPolicy = struct {\n    pub const kExplicit = c.kExplicit;\n    pub const kScoped = c.kScoped;\n    pub const kAuto = c.kAuto;\n};\n\n// Currently, user callback functions passed into FunctionTemplate will need to have this declared as a param and then\n// converted to FunctionCallbackInfo to get a nicer interface.\npub const C_FunctionCallbackInfo = c.FunctionCallbackInfo;\npub const C_PropertyCallbackInfo = c.PropertyCallbackInfo;\npub const C_WeakCallbackInfo = c.WeakCallbackInfo;\npub const C_PromiseRejectMessage = c.PromiseRejectMessage;\n\npub const C_Message = c.Message;\npub const C_Value = c.Value;\npub const C_Context = c.Context;\npub const C_Data = c.Data;\npub const C_FixedArray = c.FixedArray;\npub const C_Module = c.Module;\npub const C_InternalAddress = c.InternalAddress;\n\npub const MessageCallback = c.MessageCallback;\npub const FunctionCallback = c.FunctionCallback;\npub const AccessorNameGetterCallback = c.AccessorNameGetterCallback;\npub const AccessorNameSetterCallback = c.AccessorNameSetterCallback;\n\npub const CreateParams = c.CreateParams;\n\npub const Name = c.Name;\n\npub const SharedPtr = c.SharedPtr;\n\nconst Root = @This();\n\npub const Platform = struct {\n    const Self = @This();\n\n    handle: *c.Platform,\n\n    /// Must be called first before initV8Platform and initV8\n    /// Returns a new instance of the default v8::Platform implementation.\n    ///\n    /// |thread_pool_size| is the number of worker threads to allocate for\n    /// background jobs. If a value of zero is passed, a suitable default\n    /// based on the current number of processors online will be chosen.\n    /// If |idle_task_support| is enabled then the platform will accept idle\n    /// tasks (IdleTasksEnabled will return true) and will rely on the embedder\n    /// calling v8::platform::RunIdleTasks to process the idle tasks.\n    pub fn initDefault(thread_pool_size: u32, idle_task_support: bool) Self {\n        return .{\n            .handle = c.v8__Platform__NewDefaultPlatform(@intCast(thread_pool_size), if (idle_task_support) 1 else 0).?,\n        };\n    }\n\n    pub fn deinit(self: Self) void {\n        c.v8__Platform__DELETE(self.handle);\n    }\n\n    /// [V8]\n    /// Pumps the message loop for the given isolate.\n    ///\n    /// The caller has to make sure that this is called from the right thread.\n    /// Returns true if a task was executed, and false otherwise. If the call to\n    /// PumpMessageLoop is nested within another call to PumpMessageLoop, only\n    /// nestable tasks may run. Otherwise, any task may run. Unless requested through\n    /// the |behavior| parameter, this call does not block if no task is pending. The\n    /// |platform| has to be created using |NewDefaultPlatform|.\n    pub fn pumpMessageLoop(self: Self, isolate: Isolate, wait_for_work: bool) bool {\n        return c.v8__Platform__PumpMessageLoop(self.handle, isolate.handle, wait_for_work);\n    }\n};\n\npub fn getVersion() []const u8 {\n    const str = c.v8__V8__GetVersion();\n    const idx = std.mem.indexOfSentinel(u8, 0, str);\n    return str[0..idx];\n}\n\n/// [v8]\n/// Sets the v8::Platform to use. This should be invoked before V8 is\n/// initialized.\npub fn initV8Platform(platform: Platform) void {\n    c.v8__V8__InitializePlatform(platform.handle);\n}\n\n/// [v8]\n/// Initializes V8. This function needs to be called before the first Isolate\n/// is created. It always returns true.\npub fn initV8() void {\n    c.v8__V8__Initialize();\n}\n\n/// [v8]\n/// Releases any resources used by v8 and stops any utility thread\n/// that may be running.  Note that disposing v8 is permanent, it\n/// cannot be reinitialized.\n///\n/// It should generally not be necessary to dispose v8 before exiting\n/// a process, this should happen automatically.  It is only necessary\n/// to use if the process needs the resources taken up by v8.\npub fn deinitV8() bool {\n    return c.v8__V8__Dispose() == 1;\n}\n\n/// [v8]\n/// Clears all references to the v8::Platform. This should be invoked after\n/// V8 was disposed.\npub fn deinitV8Platform() void {\n    c.v8__V8__DisposePlatform();\n}\n\npub fn initCreateParams() c.CreateParams {\n    var params: c.CreateParams = undefined;\n    c.v8__Isolate__CreateParams__CONSTRUCT(&params);\n    return params;\n}\n\npub fn createDefaultArrayBufferAllocator() *c.ArrayBufferAllocator {\n    return c.v8__ArrayBuffer__Allocator__NewDefaultAllocator().?;\n}\n\npub fn destroyArrayBufferAllocator(alloc: *c.ArrayBufferAllocator) void {\n    c.v8__ArrayBuffer__Allocator__DELETE(alloc);\n}\n\npub const Exception = struct {\n    pub fn initError(msg: String) Value {\n        return .{\n            .handle = c.v8__Exception__Error(msg.handle).?,\n        };\n    }\n\n    pub fn initTypeError(msg: String) Value {\n        return .{\n            .handle = c.v8__Exception__TypeError(msg.handle).?,\n        };\n    }\n\n    pub fn initSyntaxError(msg: String) Value {\n        return .{\n            .handle = c.v8__Exception__SyntaxError(msg.handle).?,\n        };\n    }\n\n    pub fn initReferenceError(msg: String) Value {\n        return .{\n            .handle = c.v8__Exception__ReferenceError(msg.handle).?,\n        };\n    }\n\n    pub fn initRangeError(msg: String) Value {\n        return .{\n            .handle = c.v8__Exception__RangeError(msg.handle).?,\n        };\n    }\n\n    pub fn initMessage(iso: Isolate, exception: Value) Message {\n        return .{\n            .handle = c.v8__Exception__CreateMessage(iso.handle, exception.handle).?,\n        };\n    }\n\n    /// [v8]\n    /// Returns the original stack trace that was captured at the creation time\n    /// of a given exception, or an empty handle if not available.\n    pub fn getStackTrace(exception: Value) ?StackTrace {\n        if (c.v8__Exception__GetStackTrace(exception.handle)) |handle| {\n            return StackTrace{\n                .handle = handle,\n            };\n        } else return null;\n    }\n};\n\n/// Contains Isolate related methods and convenience methods for creating js values.\npub const Isolate = struct {\n    const Self = @This();\n\n    handle: *c.Isolate,\n\n    pub fn init(params: *const c.CreateParams) Self {\n        // const ptr = @intToPtr(*c.CreateParams, @ptrToInt(params));\n        return .{\n            .handle = c.v8__Isolate__New(@constCast(params)).?,\n        };\n    }\n\n    /// [V8]\n    /// Disposes the isolate.  The isolate must not be entered by any\n    /// thread to be disposable.\n    pub fn deinit(self: Self) void {\n        c.v8__Isolate__Dispose(self.handle);\n    }\n\n    /// [V8]\n    /// Sets this isolate as the entered one for the current thread.\n    /// Saves the previously entered one (if any), so that it can be\n    /// restored when exiting.  Re-entering an isolate is allowed.\n    /// [Notes]\n    /// This is equivalent to initing an Isolate Scope.\n    pub fn enter(self: *Self) void {\n        c.v8__Isolate__Enter(self.handle);\n    }\n\n    /// [V8]\n    /// Exits this isolate by restoring the previously entered one in the\n    /// current thread.  The isolate may still stay the same, if it was\n    /// entered more than once.\n    ///\n    /// Requires: this == Isolate::GetCurrent().\n    /// [Notes]\n    /// This is equivalent to deiniting an Isolate Scope.\n    pub fn exit(self: *Self) void {\n        c.v8__Isolate__Exit(self.handle);\n    }\n\n    pub fn getCurrentContext(self: Self) Context {\n        return .{\n            .handle = c.v8__Isolate__GetCurrentContext(self.handle).?,\n        };\n    }\n\n    /// It seems stack trace is only captured if the value is wrapped in an Exception.initError.\n    pub fn throwException(self: Self, value: anytype) Value {\n        return .{\n            .handle = c.v8__Isolate__ThrowException(self.handle, getValueHandle(value)).?,\n        };\n    }\n\n    /// [V8]\n    /// Set callback to notify about promise reject with no handler, or\n    /// revocation of such a previous notification once the handler is added.\n    pub fn setPromiseRejectCallback(self: Self, callback: c.PromiseRejectCallback) void {\n        c.v8__Isolate__SetPromiseRejectCallback(self.handle, callback);\n    }\n\n    pub fn getMicrotasksPolicy(self: Self) c.MicrotasksPolicy {\n        return c.v8__Isolate__GetMicrotasksPolicy(self.handle);\n    }\n\n    pub fn setMicrotasksPolicy(self: Self, policy: c.MicrotasksPolicy) void {\n        c.v8__Isolate__SetMicrotasksPolicy(self.handle, policy);\n    }\n\n    pub fn performMicrotasksCheckpoint(self: Self) void {\n        c.v8__Isolate__PerformMicrotaskCheckpoint(self.handle);\n    }\n\n    pub fn addMessageListener(self: Self, callback: c.MessageCallback) bool {\n        return c.v8__Isolate__AddMessageListener(self.handle, callback);\n    }\n\n    pub fn addMessageListenerWithErrorLevel(self: Self, callback: c.MessageCallback, message_levels: c_int, value: Value) bool {\n        return c.v8__Isolate__AddMessageListenerWithErrorLevel(self.handle, callback, message_levels, value.handle);\n    }\n\n    /// [v8]\n    /// Tells V8 to capture current stack trace when uncaught exception occurs\n    /// and report it to the message listeners. The option is off by default.\n    pub fn setCaptureStackTraceForUncaughtExceptions(self: Self, capture: bool, frame_limit: u32) void {\n        c.v8__Isolate__SetCaptureStackTraceForUncaughtExceptions(self.handle, capture, @intCast(frame_limit));\n    }\n\n    /// This does not terminate the current script immediately. V8 will mark it for termination at a later time. This was intended to end long running loops.\n    pub fn terminateExecution(self: Self) void {\n        c.v8__Isolate__TerminateExecution(self.handle);\n    }\n\n    pub fn isExecutionTerminating(self: Self) bool {\n        return c.v8__Isolate__IsExecutionTerminating(self.handle);\n    }\n\n    pub fn cancelTerminateExecution(self: Self) void {\n        c.v8__Isolate__CancelTerminateExecution(self.handle);\n    }\n\n    pub fn lowMemoryNotification(self: Self) void {\n        c.v8__Isolate__LowMemoryNotification(self.handle);\n    }\n\n    pub fn getHeapStatistics(self: Self) c.HeapStatistics {\n        var res: c.HeapStatistics = undefined;\n        c.v8__Isolate__GetHeapStatistics(self.handle, &res);\n        return res;\n    }\n\n    pub fn initNumber(self: Self, val: f64) Number {\n        return Number.init(self, val);\n    }\n\n    pub fn initNumberBitCastedU64(self: Self, val: u64) Number {\n        return Number.initBitCastedU64(self, val);\n    }\n\n    pub fn initBoolean(self: Self, val: bool) Boolean {\n        return Boolean.init(self, val);\n    }\n\n    pub fn initIntegerI32(self: Self, val: i32) Integer {\n        return Integer.initI32(self, val);\n    }\n\n    pub fn initIntegerU32(self: Self, val: u32) Integer {\n        return Integer.initU32(self, val);\n    }\n\n    pub fn initBigIntI64(self: Self, val: i64) BigInt {\n        return BigInt.initI64(self, val);\n    }\n\n    pub fn initBigIntU64(self: Self, val: u64) BigInt {\n        return BigInt.initU64(self, val);\n    }\n\n    pub fn initStringUtf8(self: Self, val: []const u8) String {\n        return String.initUtf8(self, val);\n    }\n\n    pub fn initPersistent(self: Self, comptime T: type, val: T) Persistent(T) {\n        return Persistent(T).init(self, val);\n    }\n\n    pub fn initFunctionTemplateDefault(self: Self) FunctionTemplate {\n        return FunctionTemplate.initDefault(self);\n    }\n\n    pub fn initFunctionTemplateCallback(self: Self, callback: c.FunctionCallback) FunctionTemplate {\n        return FunctionTemplate.initCallback(self, callback);\n    }\n\n    pub fn initFunctionTemplateCallbackData(self: Self, callback: c.FunctionCallback, data_value: anytype) FunctionTemplate {\n        return FunctionTemplate.initCallbackData(self, callback, data_value);\n    }\n\n    pub fn initObjectTemplateDefault(self: Self) ObjectTemplate {\n        return ObjectTemplate.initDefault(self);\n    }\n\n    pub fn initObjectTemplate(self: Self, constructor: FunctionTemplate) ObjectTemplate {\n        return ObjectTemplate.init(self, constructor);\n    }\n\n    pub fn initObject(self: Self) Object {\n        return Object.init(self);\n    }\n\n    pub fn initArray(self: Self, len: u32) Array {\n        return Array.init(self, len);\n    }\n\n    pub fn initArrayElements(self: Self, elems: []const Value) Array {\n        return Array.initElements(self, elems);\n    }\n\n    pub fn initUndefined(self: Self) Primitive {\n        return Root.initUndefined(self);\n    }\n\n    pub fn initNull(self: Self) Primitive {\n        return Root.initNull(self);\n    }\n\n    pub fn initTrue(self: Self) Boolean {\n        return Root.initTrue(self);\n    }\n\n    pub fn initFalse(self: Self) Boolean {\n        return Root.initFalse(self);\n    }\n\n    pub fn initContext(self: Self, global_tmpl: ?ObjectTemplate, global_obj: ?*c.Value) Context {\n        return Context.init(self, global_tmpl, global_obj);\n    }\n\n    pub fn initExternal(self: Self, val: ?*anyopaque) External {\n        return External.init(self, val);\n    }\n};\n\npub const HandleScope = struct {\n    const Self = @This();\n\n    inner: c.HandleScope,\n\n    /// [Notes]\n    /// This starts a new stack frame to record local objects created.\n    /// Since deinit depends on the inner pointer being the same, init should construct in place.\n    pub fn init(self: *Self, isolate: Isolate) void {\n        c.v8__HandleScope__CONSTRUCT(&self.inner, isolate.handle);\n    }\n\n    /// [Notes]\n    /// This pops the scope frame and allows V8 to mark/free local objects created since HandleScope.init.\n    /// In C++ code, this would happen automatically when the HandleScope var leaves the current scope.\n    pub fn deinit(self: *Self) void {\n        c.v8__HandleScope__DESTRUCT(&self.inner);\n    }\n};\n\npub const Context = struct {\n    const Self = @This();\n\n    handle: *const c.Context,\n\n    /// [V8]\n    /// Creates a new context and returns a handle to the newly allocated\n    /// context.\n    ///\n    /// \\param isolate The isolate in which to create the context.\n    ///\n    /// \\param extensions An optional extension configuration containing\n    /// the extensions to be installed in the newly created context.\n    ///\n    /// \\param global_template An optional object template from which the\n    /// global object for the newly created context will be created.\n    ///\n    /// \\param global_object An optional global object to be reused for\n    /// the newly created context. This global object must have been\n    /// created by a previous call to Context::New with the same global\n    /// template. The state of the global object will be completely reset\n    /// and only object identify will remain.\n    pub fn init(isolate: Isolate, global_tmpl: ?ObjectTemplate, global_obj: ?*c.Value) Self {\n        return .{\n            .handle = c.v8__Context__New(isolate.handle, if (global_tmpl != null) global_tmpl.?.handle else null, global_obj).?,\n        };\n    }\n\n    /// [V8]\n    /// Enter this context.  After entering a context, all code compiled\n    /// and run is compiled and run in this context.  If another context\n    /// is already entered, this old context is saved so it can be\n    /// restored when the new context is exited.\n    pub fn enter(self: Self) void {\n        c.v8__Context__Enter(self.handle);\n    }\n\n    /// [V8]\n    /// Exit this context.  Exiting the current context restores the\n    /// context that was in place when entering the current context.\n    pub fn exit(self: Self) void {\n        c.v8__Context__Exit(self.handle);\n    }\n\n    /// [V8]\n    /// Returns the isolate associated with a current context.\n    pub fn getIsolate(self: Self) Isolate {\n        return Isolate{\n            .handle = c.v8__Context__GetIsolate(self.handle).?,\n        };\n    }\n\n    pub fn getGlobal(self: Self) Object {\n        return .{\n            .handle = c.v8__Context__Global(self.handle).?,\n        };\n    }\n\n    pub fn getEmbedderData(self: Self, idx: u32) Value {\n        return .{\n            .handle = c.v8__Context__GetEmbedderData(self.handle, @intCast(idx)).?,\n        };\n    }\n\n    pub fn setEmbedderData(self: Self, idx: u32, val: anytype) void {\n        c.v8__Context__SetEmbedderData(self.handle, @intCast(idx), getValueHandle(val));\n    }\n};\n\npub const PropertyCallbackInfo = struct {\n    const Self = @This();\n\n    handle: *const c.PropertyCallbackInfo,\n\n    pub fn initFromV8(val: ?*const c.PropertyCallbackInfo) Self {\n        return .{\n            .handle = val.?,\n        };\n    }\n\n    pub fn getIsolate(self: Self) Isolate {\n        return .{\n            .handle = c.v8__PropertyCallbackInfo__GetIsolate(self.handle).?,\n        };\n    }\n\n    pub fn getReturnValue(self: Self) ReturnValue {\n        var res: c.ReturnValue = undefined;\n        c.v8__PropertyCallbackInfo__GetReturnValue(self.handle, &res);\n        return .{\n            .inner = res,\n        };\n    }\n\n    pub fn getThis(self: Self) Object {\n        return .{\n            .handle = c.v8__PropertyCallbackInfo__This(self.handle).?,\n        };\n    }\n\n    pub fn getData(self: Self) Value {\n        return .{\n            .handle = c.v8__PropertyCallbackInfo__Data(self.handle).?,\n        };\n    }\n\n    pub fn getExternalValue(self: Self) ?*anyopaque {\n        return self.getData().castTo(External).get();\n    }\n};\n\npub const WeakCallbackInfo = struct {\n    const Self = @This();\n\n    handle: *const c.WeakCallbackInfo,\n\n    pub fn initFromC(val: ?*const c.WeakCallbackInfo) Self {\n        return .{\n            .handle = val.?,\n        };\n    }\n\n    pub fn getIsolate(self: Self) Isolate {\n        return .{\n            .handle = c.v8__WeakCallbackInfo__GetIsolate(self.handle).?,\n        };\n    }\n\n    pub fn getParameter(self: Self) *anyopaque {\n        return c.v8__WeakCallbackInfo__GetParameter(self.handle).?;\n    }\n\n    pub fn getInternalField(self: Self, idx: u32) ?*anyopaque {\n        return c.v8__WeakCallbackInfo__GetInternalField(self.handle, @intCast(idx));\n    }\n};\n\npub const PromiseRejectMessage = struct {\n    const Self = @This();\n\n    inner: c.PromiseRejectMessage,\n\n    pub fn initFromC(val: c.PromiseRejectMessage) Self {\n        return .{\n            .inner = val,\n        };\n    }\n\n    pub fn getEvent(self: Self) c.PromiseRejectEvent {\n        return c.v8__PromiseRejectMessage__GetEvent(&self.inner);\n    }\n\n    pub fn getPromise(self: Self) Promise {\n        return .{\n            .handle = c.v8__PromiseRejectMessage__GetPromise(&self.inner).?,\n        };\n    }\n\n    pub fn getValue(self: Self) Value {\n        return .{\n            .handle = c.v8__PromiseRejectMessage__GetValue(&self.inner).?,\n        };\n    }\n};\n\npub const FunctionCallbackInfo = struct {\n    const Self = @This();\n\n    handle: *const c.FunctionCallbackInfo,\n\n    pub fn initFromV8(val: ?*const c.FunctionCallbackInfo) Self {\n        return .{\n            .handle = val.?,\n        };\n    }\n\n    pub fn length(self: Self) u32 {\n        return @intCast(c.v8__FunctionCallbackInfo__Length(self.handle));\n    }\n\n    pub fn getIsolate(self: Self) Isolate {\n        return .{\n            .handle = c.v8__FunctionCallbackInfo__GetIsolate(self.handle).?,\n        };\n    }\n\n    pub fn getArg(self: Self, i: u32) Value {\n        return .{\n            .handle = c.v8__FunctionCallbackInfo__INDEX(self.handle, @intCast(i)).?,\n        };\n    }\n\n    pub fn getReturnValue(self: Self) ReturnValue {\n        var res: c.ReturnValue = undefined;\n        c.v8__FunctionCallbackInfo__GetReturnValue(self.handle, &res);\n        return .{\n            .inner = res,\n        };\n    }\n\n    pub fn getThis(self: Self) Object {\n        return .{\n            .handle = c.v8__FunctionCallbackInfo__This(self.handle).?,\n        };\n    }\n\n    pub fn getData(self: Self) Value {\n        return .{\n            .handle = c.v8__FunctionCallbackInfo__Data(self.handle).?,\n        };\n    }\n\n    pub fn getExternalValue(self: Self) ?*anyopaque {\n        return self.getData().castTo(External).get();\n    }\n};\n\npub const ReturnValue = struct {\n    const Self = @This();\n\n    inner: c.ReturnValue,\n\n    pub fn set(self: Self, value: anytype) void {\n        c.v8__ReturnValue__Set(self.inner, getValueHandle(value));\n    }\n\n    pub fn setValueHandle(self: Self, ptr: *const c.Value) void {\n        c.v8__ReturnValue__Set(self.inner, ptr);\n    }\n\n    pub fn get(self: Self) Value {\n        return .{\n            .handle = c.v8__ReturnValue__Get(self.inner).?,\n        };\n    }\n};\n\npub const FunctionTemplate = struct {\n    const Self = @This();\n\n    handle: *const c.FunctionTemplate,\n\n    pub fn initDefault(isolate: Isolate) Self {\n        return .{\n            .handle = c.v8__FunctionTemplate__New__DEFAULT(isolate.handle).?,\n        };\n    }\n\n    pub fn initCallback(isolate: Isolate, callback: c.FunctionCallback) Self {\n        return .{\n            .handle = c.v8__FunctionTemplate__New__DEFAULT2(isolate.handle, callback).?,\n        };\n    }\n\n    pub fn initCallbackData(isolate: Isolate, callback: c.FunctionCallback, data_val: anytype) Self {\n        return .{\n            .handle = c.v8__FunctionTemplate__New__DEFAULT3(isolate.handle, callback, getValueHandle(data_val)).?,\n        };\n    }\n\n    /// This is typically used to set class fields.\n    pub fn getInstanceTemplate(self: Self) ObjectTemplate {\n        return .{\n            .handle = c.v8__FunctionTemplate__InstanceTemplate(self.handle).?,\n        };\n    }\n\n    /// This is typically used to set class methods.\n    pub fn getPrototypeTemplate(self: Self) ObjectTemplate {\n        return .{\n            .handle = c.v8__FunctionTemplate__PrototypeTemplate(self.handle).?,\n        };\n    }\n\n    /// There is only one unique function for a FunctionTemplate in a given context.\n    /// The Function can then be used to invoke NewInstance which is equivalent to doing js \"new\".\n    pub fn getFunction(self: Self, ctx: Context) Function {\n        return .{\n            .handle = c.v8__FunctionTemplate__GetFunction(self.handle, ctx.handle).?,\n        };\n    }\n\n    /// Sets static property on the template.\n    pub fn set(self: Self, key: anytype, value: anytype, attr: c.PropertyAttribute) void {\n        c.v8__Template__Set(getTemplateHandle(self), getNameHandle(key), getDataHandle(value), attr);\n    }\n\n    pub fn setGetter(self: Self, name: anytype, getter: FunctionTemplate) void {\n        c.v8__Template__SetAccessorProperty__DEFAULT(getTemplateHandle(self), getNameHandle(name), getter.handle);\n    }\n\n    pub fn setClassName(self: Self, name: String) void {\n        c.v8__FunctionTemplate__SetClassName(self.handle, name.handle);\n    }\n\n    pub fn setReadOnlyPrototype(self: Self) void {\n        c.v8__FunctionTemplate__ReadOnlyPrototype(self.handle);\n    }\n};\n\npub const Function = struct {\n    const Self = @This();\n\n    handle: *const c.Function,\n\n    /// Internally, this will create a temporary FunctionTemplate to get a new Function instance.\n    pub fn initDefault(ctx: Context, callback: c.FunctionCallback) Self {\n        return .{\n            .handle = c.v8__Function__New__DEFAULT(ctx.handle, callback).?,\n        };\n    }\n\n    pub fn initWithData(ctx: Context, callback: c.FunctionCallback, data_val: anytype) Self {\n        return .{\n            .handle = c.v8__Function__New__DEFAULT2(ctx.handle, callback, getValueHandle(data_val)).?,\n        };\n    }\n\n    /// receiver_val is \"this\" in the function context. This is equivalent to calling fn.apply(receiver, args) in JS.\n    /// Returns null if there was an error.\n    pub fn call(self: Self, ctx: Context, receiver_val: anytype, args: []const Value) ?Value {\n        const c_args: ?[*]const ?*c.Value = @ptrCast(args.ptr);\n        if (c.v8__Function__Call(self.handle, ctx.handle, getValueHandle(receiver_val), @intCast(args.len), c_args)) |ret| {\n            return Value{\n                .handle = ret,\n            };\n        } else return null;\n    }\n\n    // Equavalent to js \"new\".\n    pub fn initInstance(self: Self, ctx: Context, args: []const Value) ?Object {\n        const c_args: ?[*]const ?*c.Value = @ptrCast(args.ptr);\n        if (c.v8__Function__NewInstance(self.handle, ctx.handle, @intCast(args.len), c_args)) |ret| {\n            return Object{\n                .handle = ret,\n            };\n        } else return null;\n    }\n\n    pub fn toObject(self: Self) Object {\n        return .{\n            .handle = @ptrCast(self.handle),\n        };\n    }\n\n    pub fn toValue(self: Self) Value {\n        return .{\n            .handle = self.handle,\n        };\n    }\n\n    pub fn getName(self: Self) Value {\n        return .{\n            .handle = c.v8__Function__GetName(self.handle).?,\n        };\n    }\n\n    pub fn setName(self: Self, name: String) void {\n        c.v8__Function__SetName(self.handle, name.handle);\n    }\n};\n\npub fn Persistent(comptime T: type) type {\n    return struct {\n        const Self = @This();\n\n        inner: T,\n\n        /// A new value is created that references the original value.\n        /// A Persistent handle is a pointer just like any other value handles,\n        /// but when creating and operating on it, an indirect pointer is used to represent a c.Persistent struct (v8::Persistent<v8::Value> in C++).\n        pub fn init(isolate: Isolate, data: T) Self {\n            var handle: *c.Data = undefined;\n            c.v8__Persistent__New(isolate.handle, getDataHandle(data), @ptrCast(&handle));\n            return .{\n                .inner = .{\n                    .handle = @ptrCast(handle),\n                },\n            };\n        }\n\n        pub fn deinit(self: *Self) void {\n            c.v8__Persistent__Reset(@ptrCast(&self.inner.handle));\n        }\n\n        pub fn setWeak(self: *Self) void {\n            c.v8__Persistent__SetWeak(@ptrCast(&self.inner.handle));\n        }\n\n        /// An external pointer can be set when cb_type is kParameter or kInternalFields.\n        /// When cb_type is kInternalFields, the object fields are expected to be set with setAlignedPointerInInternalField.\n        /// The pointer value must be a multiple of 2 due to how v8 encodes the pointers.\n        pub fn setWeakFinalizer(self: *Self, finalizer_ctx: *anyopaque, cb: c.WeakCallback, cb_type: WeakCallbackType) void {\n            c.v8__Persistent__SetWeakFinalizer(@ptrCast(&self.inner.handle), finalizer_ctx, cb, @intCast(cb_type));\n        }\n\n        /// Should only be called if you know the underlying type is a v8.Function.\n        pub fn castToFunction(self: Self) Function {\n            return .{\n                .handle = @ptrCast(self.inner.handle),\n            };\n        }\n\n        /// Should only be called if you know the underlying type is a v8.Object.\n        pub fn castToObject(self: Self) Object {\n            return .{\n                .handle = @ptrCast(self.inner.handle),\n            };\n        }\n\n        /// Should only be called if you know the underlying type is a v8.PromiseResolver.\n        pub fn castToPromiseResolver(self: Self) PromiseResolver {\n            return .{\n                .handle = @ptrCast(self.inner.handle),\n            };\n        }\n\n        pub fn toValue(self: Self) Value {\n            return .{\n                .handle = self.inner.handle,\n            };\n        }\n    };\n}\n\n/// [V8]\n/// kParameter will pass a void* parameter back to the callback, kInternalFields\n/// will pass the first two internal fields back to the callback, kFinalizer\n/// will pass a void* parameter back, but is invoked before the object is\n/// actually collected, so it can be resurrected. In the last case, it is not\n/// possible to request a second pass callback.\npub const WeakCallbackType = enum(u32) {\n    kParameter = c.kParameter,\n    kInternalFields = c.kInternalFields,\n    kFinalizer = c.kFinalizer,\n};\n\npub const ObjectTemplate = struct {\n    const Self = @This();\n\n    handle: *const c.ObjectTemplate,\n\n    pub fn initDefault(isolate: Isolate) Self {\n        return .{\n            .handle = c.v8__ObjectTemplate__New__DEFAULT(isolate.handle).?,\n        };\n    }\n\n    pub fn init(isolate: Isolate, constructor: FunctionTemplate) Self {\n        return .{\n            .handle = c.v8__ObjectTemplate__New(isolate.handle, constructor.handle).?,\n        };\n    }\n\n    pub fn initInstance(self: Self, ctx: Context) Object {\n        return .{\n            .handle = c.v8__ObjectTemplate__NewInstance(self.handle, ctx.handle).?,\n        };\n    }\n\n    pub fn setGetter(self: Self, name: anytype, getter: c.AccessorNameGetterCallback) void {\n        c.v8__ObjectTemplate__SetAccessor__DEFAULT(self.handle, getNameHandle(name), getter);\n    }\n\n    pub fn setGetterAndSetter(self: Self, name: anytype, getter: c.AccessorNameGetterCallback, setter: c.AccessorNameSetterCallback) void {\n        c.v8__ObjectTemplate__SetAccessor__DEFAULT2(self.handle, getNameHandle(name), getter, setter);\n    }\n\n    pub fn set(self: Self, key: anytype, value: anytype, attr: c.PropertyAttribute) void {\n        c.v8__Template__Set(getTemplateHandle(self), getNameHandle(key), getDataHandle(value), attr);\n    }\n\n    pub fn setInternalFieldCount(self: Self, count: u32) void {\n        c.v8__ObjectTemplate__SetInternalFieldCount(self.handle, @intCast(count));\n    }\n\n    pub fn toValue(self: Self) Value {\n        return .{\n            .handle = self.handle,\n        };\n    }\n};\n\npub const Array = struct {\n    const Self = @This();\n\n    handle: *const c.Array,\n\n    pub fn init(iso: Isolate, len: u32) Self {\n        return .{\n            .handle = c.v8__Array__New(iso.handle, @intCast(len)).?,\n        };\n    }\n\n    pub fn initElements(iso: Isolate, elems: []const Value) Self {\n        const c_elems: ?[*]const ?*c.Value = @ptrCast(elems.ptr);\n        return .{\n            .handle = c.v8__Array__New2(iso.handle, c_elems, elems.len).?,\n        };\n    }\n\n    pub fn length(self: Self) u32 {\n        return c.v8__Array__Length(self.handle);\n    }\n\n    pub fn castTo(self: Self, comptime T: type) T {\n        switch (T) {\n            Object => {\n                return .{\n                    .handle = @ptrCast(self.handle),\n                };\n            },\n            else => unreachable,\n        }\n    }\n};\n\npub const Object = struct {\n    const Self = @This();\n\n    handle: *const c.Object,\n\n    pub fn init(isolate: Isolate) Self {\n        return .{\n            .handle = c.v8__Object__New(isolate.handle).?,\n        };\n    }\n\n    pub fn setInternalField(self: Self, idx: u32, value: anytype) void {\n        c.v8__Object__SetInternalField(self.handle, @intCast(idx), getValueHandle(value));\n    }\n\n    pub fn getInternalField(self: Self, idx: u32) Value {\n        return .{\n            .handle = c.v8__Object__GetInternalField(self.handle, @intCast(idx)).?,\n        };\n    }\n\n    pub fn setAlignedPointerInInternalField(self: Self, idx: u32, ptr: ?*anyopaque) void {\n        c.v8__Object__SetAlignedPointerInInternalField(self.handle, @intCast(idx), ptr);\n    }\n\n    // Returns true on success, false on fail.\n    pub fn setValue(self: Self, ctx: Context, key: anytype, value: anytype) bool {\n        var out: c.MaybeBool = undefined;\n        c.v8__Object__Set(self.handle, ctx.handle, getValueHandle(key), getValueHandle(value), &out);\n        // Set only returns empty for an error or true.\n        return out.has_value == 1;\n    }\n\n    pub fn getValue(self: Self, ctx: Context, key: anytype) !Value {\n        if (c.v8__Object__Get(self.handle, ctx.handle, getValueHandle(key))) |handle| {\n            return Value{\n                .handle = handle,\n            };\n        } else return error.JsException;\n    }\n\n    pub fn getAtIndex(self: Self, ctx: Context, idx: u32) !Value {\n        if (c.v8__Object__GetIndex(self.handle, ctx.handle, idx)) |handle| {\n            return Value{\n                .handle = handle,\n            };\n        } else return error.JsException;\n    }\n\n    pub fn toValue(self: Self) Value {\n        return .{\n            .handle = self.handle,\n        };\n    }\n\n    pub fn defineOwnProperty(self: Self, ctx: Context, name: anytype, value: anytype, attr: c.PropertyAttribute) ?bool {\n        var out: c.MaybeBool = undefined;\n        c.v8__Object__DefineOwnProperty(self.handle, ctx.handle, getNameHandle(name), getValueHandle(value), attr, &out);\n        if (out.has_value == 1) {\n            return out.value == 1;\n        } else return null;\n    }\n\n    pub fn getIsolate(self: Self) Isolate {\n        return .{\n            .handle = c.v8__Object__GetIsolate(self.handle).?,\n        };\n    }\n\n    pub fn getCreationContext(self: Self) Context {\n        return .{\n            .handle = c.v8__Object__GetCreationContext(self.handle).?,\n        };\n    }\n\n    pub fn getIdentityHash(self: Self) u32 {\n        return @bitCast(c.v8__Object__GetIdentityHash(self.handle));\n    }\n\n    pub fn has(self: Self, ctx: Context, key: Value) bool {\n        var out: c.MaybeBool = undefined;\n        c.v8__Object__Has(self.handle, ctx.handle, key.handle, &out);\n        if (out.has_value == 1) {\n            return out.value == 1;\n        } else return false;\n    }\n\n    pub fn hasIndex(self: Self, ctx: Context, idx: u32) bool {\n        var out: c.MaybeBool = undefined;\n        c.v8__Object__Has(self.handle, ctx.handle, idx, &out);\n        if (out.has_value == 1) {\n            return out.value == 1;\n        } else return false;\n    }\n\n    pub fn getOwnPropertyNames(self: Self, ctx: Context) Array {\n        return .{\n            .handle = c.v8__Object__GetOwnPropertyNames(self.handle, ctx.handle).?,\n        };\n    }\n\n    pub fn getPropertyNames(self: Self, ctx: Context) Array {\n        return .{\n            .handle = c.v8__Object__GetPropertyNames(self.handle, ctx.handle).?,\n        };\n    }\n};\n\npub const External = struct {\n    const Self = @This();\n\n    handle: *const c.External,\n\n    pub fn init(isolate: Isolate, val: ?*anyopaque) Self {\n        return .{\n            .handle = c.v8__External__New(isolate.handle, val).?,\n        };\n    }\n\n    pub fn get(self: Self) ?*anyopaque {\n        return c.v8__External__Value(self.handle);\n    }\n\n    pub fn toValue(self: Self) Value {\n        return .{\n            .handle = self.handle,\n        };\n    }\n};\n\npub const Number = struct {\n    const Self = @This();\n\n    handle: *const c.Number,\n\n    pub fn init(isolate: Isolate, val: f64) Self {\n        return .{\n            .handle = c.v8__Number__New(isolate.handle, val).?,\n        };\n    }\n\n    pub fn initBitCastedU64(isolate: Isolate, val: u64) Self {\n        return init(isolate, @bitCast(val));\n    }\n\n    pub fn toValue(self: Self) Value {\n        return .{\n            .handle = self.handle,\n        };\n    }\n};\n\npub const Integer = struct {\n    const Self = @This();\n\n    handle: *const c.Integer,\n\n    pub fn initI32(isolate: Isolate, val: i32) Self {\n        return .{\n            .handle = c.v8__Integer__New(isolate.handle, val).?,\n        };\n    }\n\n    pub fn initU32(isolate: Isolate, val: u32) Self {\n        return .{\n            .handle = c.v8__Integer__NewFromUnsigned(isolate.handle, val).?,\n        };\n    }\n\n    pub fn getValue(self: Self) u64 {\n        return c.v8__Integer__Value(self.handle);\n    }\n\n    pub fn getValueU32(self: Self) u32 {\n        return @intCast(c.v8__Integer__Value(self.handle));\n    }\n\n    pub fn toValue(self: Self) Value {\n        return .{\n            .handle = self.handle,\n        };\n    }\n};\n\npub const BigInt = struct {\n    const Self = @This();\n\n    handle: *const c.Integer,\n\n    pub fn initI64(iso: Isolate, val: i64) Self {\n        return .{\n            .handle = c.v8__BigInt__New(iso.handle, val).?,\n        };\n    }\n\n    pub fn initU64(iso: Isolate, val: u64) Self {\n        return .{\n            .handle = c.v8__BigInt__NewFromUnsigned(iso.handle, val).?,\n        };\n    }\n\n    pub fn getUint64(self: Self) u64 {\n        return c.v8__BigInt__Uint64Value(self.handle, null);\n    }\n\n    pub fn getInt64(self: Self) i64 {\n        return c.v8__BigInt__Int64Value(self.handle, null);\n    }\n};\n\npub inline fn getValue(val: anytype) Value {\n    return .{\n        .handle = getValueHandle(val),\n    };\n}\n\ninline fn getValueHandle(val: anytype) *const c.Value {\n    return @ptrCast(switch (@TypeOf(val)) {\n        Object => val.handle,\n        Value => val.handle,\n        String => val.handle,\n        Integer => val.handle,\n        Primitive => val.handle,\n        Number => val.handle,\n        Function => val.handle,\n        PromiseResolver => val.handle,\n        External => val.handle,\n        Array => val.handle,\n        Uint8Array => val.handle,\n        StackTrace => val.handle,\n        ObjectTemplate => val.handle,\n        Persistent(Object) => val.inner.handle,\n        Persistent(Value) => val.inner.handle,\n        Persistent(String) => val.inner.handle,\n        Persistent(Integer) => val.inner.handle,\n        Persistent(Primitive) => val.inner.handle,\n        Persistent(Number) => val.inner.handle,\n        Persistent(PromiseResolver) => val.inner.handle,\n        Persistent(Array) => val.inner.handle,\n        else => @compileError(std.fmt.comptimePrint(\"{s} is not a subtype of v8::Value\", .{@typeName(@TypeOf(val))})),\n    });\n}\n\ninline fn getNameHandle(val: anytype) *const c.Name {\n    return @ptrCast(comptime switch (@TypeOf(val)) {\n        *const c.String => val,\n        String => val.handle,\n        else => @compileError(std.fmt.comptimePrint(\"{s} is not a subtype of v8::Name\", .{@typeName(@TypeOf(val))})),\n    });\n}\n\ninline fn getTemplateHandle(val: anytype) *const c.Template {\n    return @ptrCast(comptime switch (@TypeOf(val)) {\n        FunctionTemplate => val.handle,\n        ObjectTemplate => val.handle,\n        else => @compileError(std.fmt.comptimePrint(\"{s} is not a subtype of v8::Template\", .{@typeName(@TypeOf(val))})),\n    });\n}\n\ninline fn getDataHandle(val: anytype) *const c.Data {\n    return @ptrCast(comptime switch (@TypeOf(val)) {\n        FunctionTemplate => val.handle,\n        ObjectTemplate => val.handle,\n        Integer => val.handle,\n        Function => val.handle,\n        Context => val.handle,\n        Object => val.handle,\n        Value => val.handle,\n        Module => val.handle,\n        Promise => val.handle,\n        PromiseResolver => val.handle,\n        else => @compileError(std.fmt.comptimePrint(\"{s} is not a subtype of v8::Data\", .{@typeName(@TypeOf(val))})),\n    });\n}\n\npub const Message = struct {\n    const Self = @This();\n\n    handle: *const c.Message,\n\n    pub fn getMessage(self: Self) String {\n        return String{\n            .handle = c.v8__Message__Get(self.handle).?,\n        };\n    }\n\n    pub fn getSourceLine(self: Self, ctx: Context) ?String {\n        if (c.v8__Message__GetSourceLine(self.handle, ctx.handle)) |string| {\n            return String{\n                .handle = string,\n            };\n        } else return null;\n    }\n\n    pub fn getScriptResourceName(self: Self) Value {\n        return .{\n            .handle = c.v8__Message__GetScriptResourceName(self.handle).?,\n        };\n    }\n\n    pub fn getLineNumber(self: Self, ctx: Context) ?u32 {\n        const res = c.v8__Message__GetLineNumber(self.handle, ctx.handle);\n        if (res != -1) {\n            return @intCast(res);\n        } else return null;\n    }\n\n    pub fn getStartColumn(self: Self) ?u32 {\n        const res = c.v8__Message__GetStartColumn(self.handle);\n        if (res != -1) {\n            return @intCast(res);\n        } else return null;\n    }\n\n    pub fn getEndColumn(self: Self) ?u32 {\n        const res = c.v8__Message__GetEndColumn(self.handle);\n        if (res != -1) {\n            return @intCast(res);\n        } else return null;\n    }\n\n    /// [v8] Exception stack trace. By default stack traces are not captured for\n    ///      uncaught exceptions. SetCaptureStackTraceForUncaughtExceptions allows\n    ///      to change this option.\n    pub fn getStackTrace(self: Self) ?StackTrace {\n        if (c.v8__Message__GetStackTrace(self.handle)) |trace| {\n            return StackTrace{\n                .handle = trace,\n            };\n        } else return null;\n    }\n};\n\npub const StackTrace = struct {\n    const Self = @This();\n\n    handle: *const c.StackTrace,\n\n    pub fn getFrameCount(self: Self) u32 {\n        return @intCast(c.v8__StackTrace__GetFrameCount(self.handle));\n    }\n\n    pub fn getFrame(self: Self, iso: Isolate, idx: u32) StackFrame {\n        return .{\n            .handle = c.v8__StackTrace__GetFrame(self.handle, iso.handle, idx).?,\n        };\n    }\n\n    pub fn getCurrentStackTrace(iso: Isolate, frame_limit: u32) StackTrace {\n        return .{\n            .handle = c.v8__StackTrace__CurrentStackTrace__STATIC(iso.handle, @intCast(frame_limit)).?,\n        };\n    }\n\n    pub fn getCurrentScriptNameOrSourceUrl(iso: Isolate) String {\n        return .{\n            .handle = c.v8__StackTrace__CurrentScriptNameOrSourceURL__STATIC(iso.handle).?,\n        };\n    }\n};\n\npub const StackFrame = struct {\n    const Self = @This();\n\n    handle: *const c.StackFrame,\n\n    pub fn getLineNumber(self: Self) u32 {\n        return @intCast(c.v8__StackFrame__GetLineNumber(self.handle));\n    }\n\n    pub fn getColumn(self: Self) u32 {\n        return @intCast(c.v8__StackFrame__GetColumn(self.handle));\n    }\n\n    pub fn getScriptId(self: Self) u32 {\n        return @intCast(c.v8__StackFrame__GetScriptId(self.handle));\n    }\n\n    pub fn getScriptName(self: Self) String {\n        return .{\n            .handle = c.v8__StackFrame__GetScriptName(self.handle).?,\n        };\n    }\n\n    pub fn getScriptNameOrSourceUrl(self: Self) String {\n        return .{\n            .handle = c.v8__StackFrame__GetScriptNameOrSourceURL(self.handle).?,\n        };\n    }\n\n    pub fn getFunctionName(self: Self) ?String {\n        if (c.v8__StackFrame__GetFunctionName(self.handle)) |ptr| {\n            return String{\n                .handle = ptr,\n            };\n        } else return null;\n    }\n\n    pub fn isEval(self: Self) bool {\n        return c.v8__StackFrame__IsEval(self.handle);\n    }\n\n    pub fn isConstructor(self: Self) bool {\n        return c.v8__StackFrame__IsConstructor(self.handle);\n    }\n\n    pub fn isWasm(self: Self) bool {\n        return c.v8__StackFrame__IsWasm(self.handle);\n    }\n\n    pub fn isUserJavascript(self: Self) bool {\n        return c.v8__StackFrame__IsUserJavaScript(self.handle);\n    }\n};\n\npub const TryCatch = struct {\n    const Self = @This();\n\n    inner: c.TryCatch,\n\n    // TryCatch is wrapped in a v8::Local so have to initialize in place.\n    pub fn init(self: *Self, isolate: Isolate) void {\n        c.v8__TryCatch__CONSTRUCT(&self.inner, isolate.handle);\n    }\n\n    pub fn deinit(self: *Self) void {\n        c.v8__TryCatch__DESTRUCT(&self.inner);\n    }\n\n    pub fn hasCaught(self: Self) bool {\n        return c.v8__TryCatch__HasCaught(&self.inner);\n    }\n\n    pub fn getException(self: Self) ?Value {\n        if (c.v8__TryCatch__Exception(&self.inner)) |exception| {\n            return Value{\n                .handle = exception,\n            };\n        } else return null;\n    }\n\n    pub fn getStackTrace(self: Self, ctx: Context) ?Value {\n        if (c.v8__TryCatch__StackTrace(&self.inner, ctx.handle)) |value| {\n            return Value{\n                .handle = value,\n            };\n        } else return null;\n    }\n\n    pub fn getMessage(self: Self) ?Message {\n        if (c.v8__TryCatch__Message(&self.inner)) |message| {\n            return Message{\n                .handle = message,\n            };\n        } else return null;\n    }\n\n    pub fn isVerbose(self: Self) bool {\n        return c.v8__TryCatch__IsVerbose(&self.inner);\n    }\n\n    pub fn setVerbose(self: *Self, verbose: bool) void {\n        c.v8__TryCatch__SetVerbose(&self.inner, verbose);\n    }\n\n    pub fn rethrow(self: *Self) Value {\n        return .{\n            .handle = c.v8__TryCatch__ReThrow(&self.inner).?,\n        };\n    }\n};\n\npub const ScriptOrigin = struct {\n    const Self = @This();\n\n    inner: c.ScriptOrigin,\n\n    pub fn initDefault(isolate: Isolate, resource_name: Value) Self {\n        var inner: c.ScriptOrigin = undefined;\n        c.v8__ScriptOrigin__CONSTRUCT(&inner, isolate.handle, resource_name.handle);\n        return .{\n            .inner = inner,\n        };\n    }\n\n    pub fn init(\n        isolate: Isolate,\n        resource_name: Value,\n        resource_line_offset: i32,\n        resource_column_offset: i32,\n        resource_is_shared_cross_origin: bool,\n        script_id: i32,\n        source_map_url: ?Value,\n        resource_is_opaque: bool,\n        is_wasm: bool,\n        is_module: bool,\n        host_defined_options: ?Data,\n    ) Self {\n        var inner: c.ScriptOrigin = undefined;\n        c.v8__ScriptOrigin__CONSTRUCT2(\n            &inner,\n            isolate.handle,\n            resource_name.handle,\n            resource_line_offset,\n            resource_column_offset,\n            resource_is_shared_cross_origin,\n            script_id,\n            if (source_map_url != null) source_map_url.?.handle else null,\n            resource_is_opaque,\n            is_wasm,\n            is_module,\n            if (host_defined_options != null) host_defined_options.?.handle else null,\n        );\n        return .{\n            .inner = inner,\n        };\n    }\n};\n\npub const Boolean = struct {\n    const Self = @This();\n\n    handle: *const c.Boolean,\n\n    pub fn init(isolate: Isolate, val: bool) Self {\n        return .{\n            .handle = c.v8__Boolean__New(isolate.handle, val).?,\n        };\n    }\n};\n\npub const String = struct {\n    const Self = @This();\n\n    handle: *const c.String,\n\n    pub fn initUtf8(isolate: Isolate, str: []const u8) Self {\n        return .{\n            .handle = c.v8__String__NewFromUtf8(isolate.handle, str.ptr, c.kNormal, @intCast(str.len)).?,\n        };\n    }\n\n    pub fn lenUtf8(self: Self, isolate: Isolate) u32 {\n        return @intCast(c.v8__String__Utf8Length(self.handle, isolate.handle));\n    }\n\n    pub fn writeUtf8(self: String, isolate: Isolate, buf: []const u8) u32 {\n        const options = c.NO_NULL_TERMINATION | c.REPLACE_INVALID_UTF8;\n        // num chars is how many utf8 characters are actually written and the function returns how many bytes were written.\n        var nchars: c_int = 0;\n        // TODO: Return num chars\n        return @intCast(c.v8__String__WriteUtf8(self.handle, isolate.handle, buf.ptr, @intCast(buf.len), &nchars, options));\n    }\n\n    pub fn toValue(self: Self) Value {\n        return .{\n            .handle = self.handle,\n        };\n    }\n};\n\npub const ScriptCompilerSource = struct {\n    const Self = @This();\n\n    inner: c.ScriptCompilerSource,\n\n    pub fn init(self: *Self, src: String, mb_origin: ?ScriptOrigin, cached_data: ?ScriptCompilerCachedData) void {\n        const cached_data_ptr = if (cached_data != null) cached_data.?.handle else null;\n        if (mb_origin) |origin| {\n            c.v8__ScriptCompiler__Source__CONSTRUCT2(src.handle, &origin.inner, cached_data_ptr, &self.inner);\n        } else {\n            c.v8__ScriptCompiler__Source__CONSTRUCT(src.handle, cached_data_ptr, &self.inner);\n        }\n    }\n\n    pub fn deinit(self: *Self) void {\n        c.v8__ScriptCompiler__Source__DESTRUCT(&self.inner);\n    }\n};\n\npub const ScriptCompilerCachedData = struct {\n    const Self = @This();\n\n    handle: *c.ScriptCompilerCachedData,\n\n    pub fn init(data: []const u8) Self {\n        return .{\n            .handle = c.v8__ScriptCompiler__CachedData__NEW(data.ptr, @intCast(data.len)).?,\n        };\n    }\n\n    pub fn deinit(self: Self) void {\n        c.v8__ScriptCompiler__CachedData__DELETE(self.handle);\n    }\n};\n\npub const ScriptCompiler = struct {\n    const CompileOptions = enum(u32) {\n        kNoCompileOptions = c.kNoCompileOptions,\n        kConsumeCodeCache = c.kConsumeCodeCache,\n        kEagerCompile = c.kEagerCompile,\n    };\n\n    const NoCacheReason = enum(u32) {\n        kNoCacheNoReason = c.kNoCacheNoReason,\n        kNoCacheBecauseCachingDisabled = c.kNoCacheBecauseCachingDisabled,\n        kNoCacheBecauseNoResource = c.kNoCacheBecauseNoResource,\n        kNoCacheBecauseInlineScript = c.kNoCacheBecauseInlineScript,\n        kNoCacheBecauseModule = c.kNoCacheBecauseModule,\n        kNoCacheBecauseStreamingSource = c.kNoCacheBecauseStreamingSource,\n        kNoCacheBecauseInspector = c.kNoCacheBecauseInspector,\n        kNoCacheBecauseScriptTooSmall = c.kNoCacheBecauseScriptTooSmall,\n        kNoCacheBecauseCacheTooCold = c.kNoCacheBecauseCacheTooCold,\n        kNoCacheBecauseV8Extension = c.kNoCacheBecauseV8Extension,\n        kNoCacheBecauseExtensionModule = c.kNoCacheBecauseExtensionModule,\n        kNoCacheBecausePacScript = c.kNoCacheBecausePacScript,\n        kNoCacheBecauseInDocumentWrite = c.kNoCacheBecauseInDocumentWrite,\n        kNoCacheBecauseResourceWithNoCacheHandler = c.kNoCacheBecauseResourceWithNoCacheHandler,\n        kNoCacheBecauseDeferredProduceCodeCache = c.kNoCacheBecauseDeferredProduceCodeCache,\n    };\n\n    /// [v8]\n    /// Compile an ES module, returning a Module that encapsulates the compiled code.\n    /// Corresponds to the ParseModule abstract operation in the ECMAScript specification.\n    pub fn compileModule(iso: Isolate, src: *ScriptCompilerSource, options: ScriptCompiler.CompileOptions, reason: ScriptCompiler.NoCacheReason) !Module {\n        const mb_res = c.v8__ScriptCompiler__CompileModule(\n            iso.handle,\n            &src.inner,\n            @intCast(options),\n            @intCast(reason),\n        );\n        if (mb_res) |res| {\n            return Module{\n                .handle = res,\n            };\n        } else return error.JsException;\n    }\n};\n\npub const Script = struct {\n    const Self = @This();\n\n    handle: *const c.Script,\n\n    /// [v8]\n    /// A shorthand for ScriptCompiler::Compile().\n    pub fn compile(ctx: Context, src: String, origin: ?ScriptOrigin) !Self {\n        if (c.v8__Script__Compile(ctx.handle, src.handle, if (origin != null) &origin.?.inner else null)) |handle| {\n            return Self{\n                .handle = handle,\n            };\n        } else return error.JsException;\n    }\n\n    pub fn run(self: Self, ctx: Context) !Value {\n        if (c.v8__Script__Run(self.handle, ctx.handle)) |value| {\n            return Value{\n                .handle = value,\n            };\n        } else return error.JsException;\n    }\n};\n\npub const Module = struct {\n    const Self = @This();\n\n    const Status = enum(u32) {\n        kUninstantiated = c.kUninstantiated,\n        kInstantiating = c.kInstantiating,\n        kInstantiated = c.kInstantiated,\n        kEvaluating = c.kEvaluating,\n        kEvaluated = c.kEvaluated,\n        kErrored = c.kErrored,\n    };\n\n    handle: *const c.Module,\n\n    pub fn getStatus(self: Self) Status {\n        return @intFromEnum(c.v8__Module__GetStatus(self.handle));\n    }\n\n    pub fn getException(self: Self) Value {\n        return .{\n            .handle = c.v8__Module__GetException(self.handle).?,\n        };\n    }\n\n    pub fn getModuleRequests(self: Self) FixedArray {\n        return .{\n            .handle = c.v8__Module__GetModuleRequests(self.handle).?,\n        };\n    }\n\n    /// [v8]\n    /// Instantiates the module and its dependencies.\n    ///\n    /// Returns an empty Maybe<bool> if an exception occurred during\n    /// instantiation. (In the case where the callback throws an exception, that\n    /// exception is propagated.)\n    pub fn instantiate(self: Self, ctx: Context, cb: c.ResolveModuleCallback) !bool {\n        var out: c.MaybeBool = undefined;\n        c.v8__Module__InstantiateModule(self.handle, ctx.handle, cb, &out);\n        if (out.has_value == 1) {\n            return out.value == 1;\n        } else return error.JsException;\n    }\n\n    /// Evaulates the module, assumes module has been instantiated.\n    /// [v8]\n    /// Evaluates the module and its dependencies.\n    ///\n    /// If status is kInstantiated, run the module's code and return a Promise\n    /// object. On success, set status to kEvaluated and resolve the Promise with\n    /// the completion value; on failure, set status to kErrored and reject the\n    /// Promise with the error.\n    ///\n    /// If IsGraphAsync() is false, the returned Promise is settled.\n    pub fn evaluate(self: Self, ctx: Context) !Value {\n        if (c.v8__Module__Evaluate(self.handle, ctx.handle)) |res| {\n            return Value{\n                .handle = res,\n            };\n        } else return error.JsException;\n    }\n\n    pub fn getIdentityHash(self: Self) u32 {\n        return @bitCast(c.v8__Module__GetIdentityHash(self.handle));\n    }\n\n    pub fn getScriptId(self: Self) u32 {\n        return @intCast(c.v8__Module__ScriptId(self.handle));\n    }\n};\n\npub const ModuleRequest = struct {\n    const Self = @This();\n\n    handle: *const c.ModuleRequest,\n\n    /// Returns the specifier of the import inside the double quotes\n    pub fn getSpecifier(self: Self) String {\n        return .{\n            .handle = c.v8__ModuleRequest__GetSpecifier(self.handle).?,\n        };\n    }\n\n    /// Returns the offset from the start of the source code.\n    pub fn getSourceOffset(self: Self) u32 {\n        return @intCast(c.v8__ModuleRequest__GetSourceOffset(self.handle));\n    }\n};\n\npub const Data = struct {\n    const Self = @This();\n\n    handle: *const c.Data,\n\n    /// Should only be called if you know the underlying type.\n    pub fn castTo(self: Self, comptime T: type) T {\n        switch (T) {\n            ModuleRequest => {\n                return .{\n                    .handle = self.handle,\n                };\n            },\n            else => unreachable,\n        }\n    }\n};\n\npub const Value = struct {\n    const Self = @This();\n\n    handle: *const c.Value,\n\n    pub fn toString(self: Self, ctx: Context) !String {\n        return String{\n            .handle = c.v8__Value__ToString(self.handle, ctx.handle) orelse return error.JsException,\n        };\n    }\n\n    pub fn toDetailString(self: Self, ctx: Context) !String {\n        return String{\n            .handle = c.v8__Value__ToDetailString(self.handle, ctx.handle) orelse return error.JsException,\n        };\n    }\n\n    pub fn toBool(self: Self, isolate: Isolate) bool {\n        return c.v8__Value__BooleanValue(self.handle, isolate.handle);\n    }\n\n    pub fn toI32(self: Self, ctx: Context) !i32 {\n        var out: c.MaybeI32 = undefined;\n        c.v8__Value__Int32Value(self.handle, ctx.handle, &out);\n        if (out.has_value == 1) {\n            return out.value;\n        } else return error.JsException;\n    }\n\n    pub fn toU32(self: Self, ctx: Context) !u32 {\n        var out: c.MaybeU32 = undefined;\n        c.v8__Value__Uint32Value(self.handle, ctx.handle, &out);\n        if (out.has_value == 1) {\n            return out.value;\n        } else return error.JsException;\n    }\n\n    pub fn toF32(self: Self, ctx: Context) !f32 {\n        var out: c.MaybeF64 = undefined;\n        c.v8__Value__NumberValue(self.handle, ctx.handle, &out);\n        if (out.has_value == 1) {\n            return @floatCast(out.value);\n        } else return error.JsException;\n    }\n\n    pub fn toF64(self: Self, ctx: Context) !f64 {\n        var out: c.MaybeF64 = undefined;\n        c.v8__Value__NumberValue(self.handle, ctx.handle, &out);\n        if (out.has_value == 1) {\n            return out.value;\n        } else return error.JsException;\n    }\n\n    pub fn bitCastToU64(self: Self, ctx: Context) !u64 {\n        var out: c.MaybeF64 = undefined;\n        c.v8__Value__NumberValue(self.handle, ctx.handle, &out);\n        if (out.has_value == 1) {\n            return @bitCast(out.value);\n        } else return error.JsException;\n    }\n\n    pub fn instanceOf(self: Self, ctx: Context, obj: Object) !bool {\n        var out: c.MaybeBool = undefined;\n        c.v8__Value__InstanceOf(self.handle, ctx.handle, obj.handle, &out);\n        if (out.has_value == 1) {\n            return out.value == 1;\n        } else return error.JsException;\n    }\n\n    pub fn isObject(self: Self) bool {\n        return c.v8__Value__IsObject(self.handle);\n    }\n\n    pub fn isString(self: Self) bool {\n        return c.v8__Value__IsString(self.handle);\n    }\n\n    pub fn isFunction(self: Self) bool {\n        return c.v8__Value__IsFunction(self.handle);\n    }\n\n    pub fn isAsyncFunction(self: Self) bool {\n        return c.v8__Value__IsAsyncFunction(self.handle);\n    }\n\n    pub fn isArray(self: Self) bool {\n        return c.v8__Value__IsArray(self.handle);\n    }\n\n    pub fn isArrayBuffer(self: Self) bool {\n        return c.v8__Value__IsArrayBuffer(self.handle);\n    }\n\n    pub fn isArrayBufferView(self: Self) bool {\n        return c.v8__Value__IsArrayBufferView(self.handle);\n    }\n\n    pub fn isUint8Array(self: Self) bool {\n        return c.v8__Value__IsUint8Array(self.handle);\n    }\n\n    pub fn isExternal(self: Self) bool {\n        return c.v8__Value__IsExternal(self.handle);\n    }\n\n    pub fn isTrue(self: Self) bool {\n        return c.v8__Value__IsTrue(self.handle);\n    }\n\n    pub fn isFalse(self: Self) bool {\n        return c.v8__Value__IsFalse(self.handle);\n    }\n\n    pub fn isUndefined(self: Self) bool {\n        return c.v8__Value__IsUndefined(self.handle);\n    }\n\n    pub fn isNull(self: Self) bool {\n        return c.v8__Value__IsNull(self.handle);\n    }\n\n    pub fn isNullOrUndefined(self: Self) bool {\n        return c.v8__Value__IsNullOrUndefined(self.handle);\n    }\n\n    pub fn isNativeError(self: Self) bool {\n        return c.v8__Value__IsNativeError(self.handle);\n    }\n\n    pub fn isBigInt(self: Self) bool {\n        return c.v8__Value__IsBigInt(self.handle);\n    }\n\n    pub fn isBigIntObject(self: Self) bool {\n        return c.v8__Value__IsBigIntObject(self.handle);\n    }\n\n    /// Should only be called if you know the underlying type.\n    pub fn castTo(self: Self, comptime T: type) T {\n        switch (T) {\n            Object, Function, Array, Promise, External, Integer, ArrayBuffer, ArrayBufferView, Uint8Array, String => {\n                return .{\n                    .handle = self.handle,\n                };\n            },\n            else => unreachable,\n        }\n    }\n};\n\npub const Primitive = struct {\n    const Self = @This();\n\n    handle: *const c.Primitive,\n};\n\npub fn initUndefined(isolate: Isolate) Primitive {\n    return .{\n        .handle = c.v8__Undefined(isolate.handle).?,\n    };\n}\n\npub fn initNull(isolate: Isolate) Primitive {\n    return .{\n        .handle = c.v8__Null(isolate.handle).?,\n    };\n}\n\npub fn initTrue(isolate: Isolate) Boolean {\n    return .{\n        .handle = c.v8__True(isolate.handle).?,\n    };\n}\n\npub fn initFalse(isolate: Isolate) Boolean {\n    return .{\n        .handle = c.v8__False(isolate.handle).?,\n    };\n}\n\npub const Promise = struct {\n    const Self = @This();\n\n    pub const State = enum(u32) {\n        kPending = c.kPending,\n        kFulfilled = c.kFulfilled,\n        kRejected = c.kRejected,\n    };\n\n    handle: *const c.Promise,\n\n    /// [V8]\n    /// Register a resolution/rejection handler with a promise.\n    /// The handler is given the respective resolution/rejection value as\n    /// an argument. If the promise is already resolved/rejected, the handler is\n    /// invoked at the end of turn.\n    pub fn onCatch(self: Self, ctx: Context, handler: Function) !Promise {\n        if (c.v8__Promise__Catch(self.handle, ctx.handle, handler.handle)) |handle| {\n            return Promise{ .handle = handle };\n        } else return error.JsException;\n    }\n\n    pub fn then(self: Self, ctx: Context, handler: Function) !Promise {\n        if (c.v8__Promise__Then(self.handle, ctx.handle, handler.handle)) |handle| {\n            return Promise{ .handle = handle };\n        } else return error.JsException;\n    }\n\n    pub fn thenAndCatch(self: Self, ctx: Context, on_fulfilled: Function, on_rejected: Function) !Promise {\n        if (c.v8__Promise__Then2(self.handle, ctx.handle, on_fulfilled.handle, on_rejected.handle)) |handle| {\n            return Promise{ .handle = handle };\n        } else return error.JsException;\n    }\n\n    pub fn getState(self: Self) State {\n        return @intFromEnum(c.v8__Promise__State(self.handle));\n    }\n\n    /// [V8]\n    /// Marks this promise as handled to avoid reporting unhandled rejections.\n    pub fn markAsHandled(self: Self) void {\n        c.v8__Promise__MarkAsHandled(self.handle);\n    }\n\n    pub fn toObject(self: Self) Object {\n        return .{\n            .handle = @ptrCast(self.handle),\n        };\n    }\n\n    /// [V8]\n    /// Returns the content of the [[PromiseResult]] field. The Promise must not be pending.\n    pub fn getResult(self: Self) Value {\n        return .{\n            .handle = c.v8__Promise__Result(self.handle).?,\n        };\n    }\n};\n\npub const PromiseResolver = struct {\n    const Self = @This();\n\n    handle: *const c.PromiseResolver,\n\n    pub fn init(ctx: Context) Self {\n        return .{\n            .handle = c.v8__Promise__Resolver__New(ctx.handle).?,\n        };\n    }\n\n    pub fn getPromise(self: Self) Promise {\n        return .{\n            .handle = c.v8__Promise__Resolver__GetPromise(self.handle).?,\n        };\n    }\n\n    /// Resolve will continue execution of any yielding generators.\n    pub fn resolve(self: Self, ctx: Context, val: Value) ?bool {\n        var out: c.MaybeBool = undefined;\n        c.v8__Promise__Resolver__Resolve(self.handle, ctx.handle, val.handle, &out);\n        if (out.has_value == 1) {\n            return out.value == 1;\n        } else return null;\n    }\n\n    /// Reject will continue execution of any yielding generators.\n    pub fn reject(self: Self, ctx: Context, val: Value) ?bool {\n        var out: c.MaybeBool = undefined;\n        c.v8__Promise__Resolver__Reject(self.handle, ctx.handle, val.handle, &out);\n        if (out.has_value == 1) {\n            return out.value == 1;\n        } else return null;\n    }\n};\n\npub const BackingStore = struct {\n    const Self = @This();\n\n    handle: *c.BackingStore,\n\n    /// Underlying handle is initially unmanaged.\n    pub fn init(iso: Isolate, len: usize) Self {\n        return .{\n            .handle = c.v8__ArrayBuffer__NewBackingStore(iso.handle, len).?,\n        };\n    }\n\n    /// Returns null if len is 0.\n    pub fn getData(self: Self) ?*anyopaque {\n        return c.v8__BackingStore__Data(self.handle);\n    }\n\n    pub fn getByteLength(self: Self) usize {\n        return c.v8__BackingStore__ByteLength(self.handle);\n    }\n\n    pub fn isShared(self: Self) bool {\n        return c.v8__BackingStore__IsShared(self.handle);\n    }\n\n    pub fn toSharedPtr(self: Self) SharedPtr {\n        return c.v8__BackingStore__TO_SHARED_PTR(self.handle);\n    }\n\n    pub fn sharedPtrReset(ptr: *SharedPtr) void {\n        c.std__shared_ptr__v8__BackingStore__reset(ptr);\n    }\n\n    pub fn sharedPtrGet(ptr: *const SharedPtr) Self {\n        return .{\n            .handle = c.std__shared_ptr__v8__BackingStore__get(ptr).?,\n        };\n    }\n\n    pub fn sharedPtrUseCount(ptr: *const SharedPtr) u32 {\n        return @intCast(c.std__shared_ptr__v8__BackingStore__use_count(ptr));\n    }\n};\n\npub const ArrayBuffer = struct {\n    const Self = @This();\n\n    handle: *const c.ArrayBuffer,\n\n    pub fn init(iso: Isolate, len: usize) Self {\n        return .{\n            .handle = c.v8__ArrayBuffer__New(iso.handle, len).?,\n        };\n    }\n\n    pub fn initWithBackingStore(iso: Isolate, store: *const SharedPtr) Self {\n        return .{\n            .handle = c.v8__ArrayBuffer__New2(iso.handle, store).?,\n        };\n    }\n\n    pub fn getBackingStore(self: Self) SharedPtr {\n        return c.v8__ArrayBuffer__GetBackingStore(self.handle);\n    }\n};\n\npub const ArrayBufferView = struct {\n    const Self = @This();\n\n    handle: *const c.ArrayBufferView,\n\n    pub fn getBuffer(self: Self) ArrayBuffer {\n        return .{\n            .handle = c.v8__ArrayBufferView__Buffer(self.handle).?,\n        };\n    }\n\n    pub fn castFrom(val: anytype) Self {\n        switch (@TypeOf(val)) {\n            Uint8Array => return .{\n                .handle = @ptrCast(val.handle),\n            },\n            else => unreachable,\n        }\n    }\n};\n\npub const FixedArray = struct {\n    const Self = @This();\n\n    handle: *const c.FixedArray,\n\n    pub fn length(self: Self) u32 {\n        return @intCast(c.v8__FixedArray__Length(self.handle));\n    }\n\n    pub fn get(self: Self, ctx: Context, idx: u32) Data {\n        return .{\n            .handle = c.v8__FixedArray__Get(self.handle, ctx.handle, @intCast(idx)).?,\n        };\n    }\n};\n\npub const Uint8Array = struct {\n    const Self = @This();\n\n    handle: *const c.Uint8Array,\n\n    pub fn init(buf: ArrayBuffer, offset: usize, len: usize) Self {\n        return .{\n            .handle = c.v8__Uint8Array__New(buf.handle, offset, len).?,\n        };\n    }\n};\n\npub const Json = struct {\n    pub fn parse(ctx: Context, json: String) !Value {\n        return Value{\n            .handle = c.v8__JSON__Parse(ctx.handle, json.handle) orelse return error.JsException,\n        };\n    }\n\n    pub fn stringify(ctx: Context, val: Value, gap: ?String) !String {\n        return String{\n            .handle = c.v8__JSON__Stringify(ctx.handle, val.handle, if (gap != null) gap.?.handle else null) orelse return error.JsException,\n        };\n    }\n};\n\ninline fn ptrCastAlign(comptime Ptr: type, ptr: anytype) Ptr {\n    const alignment = @typeInfo(Ptr).Pointer.alignment;\n    if (alignment == 0) {\n        return @ptrCast(ptr);\n    } else {\n        return @ptrCast(@alignCast(ptr));\n    }\n}\n\npub fn setDcheckFunction(func: fn (file: [*c]const u8, line: c_int, msg: [*c]const u8) callconv(.C) void) void {\n    c.v8__base__SetDcheckFunction(func);\n}\n\ntest \"Internals.\" {\n    // Verify struct sizes.\n    const eq = t.expectEqual;\n    try eq(c.v8__Isolate__CreateParams__SIZEOF(), @sizeOf(c.CreateParams));\n    try eq(c.v8__TryCatch__SIZEOF(), @sizeOf(c.TryCatch));\n    try eq(c.v8__PromiseRejectMessage__SIZEOF(), @sizeOf(c.PromiseRejectMessage));\n    try eq(c.v8__ScriptCompiler__Source__SIZEOF(), @sizeOf(c.ScriptCompilerSource));\n    try eq(c.v8__ScriptCompiler__CachedData__SIZEOF(), @sizeOf(c.ScriptCompilerCachedData));\n    try eq(c.v8__HeapStatistics__SIZEOF(), @sizeOf(c.HeapStatistics));\n}\n"
  }
]