# Copyright 2020 The Pigweed Authors
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
#     https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under
# the License.

import("//build_overrides/pigweed.gni")

import("$dir_pw_build/target_types.gni")
import("$dir_pw_chrono/backend.gni")
import("$dir_pw_docgen/docs.gni")
import("$dir_pw_thread/backend.gni")

config("public_include_path") {
  include_dirs = [ "public" ]
  visibility = [ ":*" ]
}

config("backend_config") {
  include_dirs = [ "public_overrides" ]
  visibility = [ ":*" ]
}

# This target provides the backend for pw::thread::Id.
pw_source_set("id") {
  public_configs = [
    ":public_include_path",
    ":backend_config",
  ]
  public_deps = [
    "$dir_pw_assert",
    "$dir_pw_interrupt:context",
    "$dir_pw_third_party/threadx",
  ]
  public = [
    "public/pw_thread_threadx/id_inline.h",
    "public/pw_thread_threadx/id_native.h",
    "public_overrides/pw_thread_backend/id_inline.h",
    "public_overrides/pw_thread_backend/id_native.h",
  ]
  deps = [ "$dir_pw_thread:id.facade" ]
}

if (pw_chrono_SYSTEM_CLOCK_BACKEND != "" && pw_thread_SLEEP_BACKEND != "") {
  # This target provides the backend for pw::thread::sleep_{for,until}.
  pw_source_set("sleep") {
    public_configs = [
      ":public_include_path",
      ":backend_config",
    ]
    public = [
      "public/pw_thread_threadx/sleep_inline.h",
      "public_overrides/pw_thread_backend/sleep_inline.h",
    ]
    public_deps = [ "$dir_pw_chrono:system_clock" ]
    sources = [ "sleep.cc" ]
    deps = [
      "$dir_pw_assert",
      "$dir_pw_chrono_threadx:system_clock",
      "$dir_pw_third_party/threadx",
      "$dir_pw_thread:id",
    ]
    assert(
        pw_thread_OVERRIDE_SYSTEM_CLOCK_BACKEND_CHECK ||
            pw_chrono_SYSTEM_CLOCK_BACKEND ==
                "$dir_pw_chrono_threadx:system_clock",
        "The ThreadX pw::thread::sleep_{for,until} backend only works with " +
            "the ThreadX pw::chrono::SystemClock backend.")
  }
}

# This target provides the backend for pw::thread::yield.
pw_source_set("yield") {
  public_configs = [
    ":public_include_path",
    ":backend_config",
  ]
  public = [
    "public/pw_thread_threadx/yield_inline.h",
    "public_overrides/pw_thread_backend/yield_inline.h",
  ]
  public_deps = [
    "$dir_pw_assert",
    "$dir_pw_third_party/threadx",
    "$dir_pw_thread:id",
  ]
  deps = [ "$dir_pw_thread:yield.facade" ]
}

pw_doc_group("docs") {
  sources = [ "docs.rst" ]
}
