blob: 0bd7fcbbf65d2fa68a174d8d1406cfa9d41dc159 [file] [log] [blame]
# Copyright 2025 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.
load("//:cc.bzl", "zephyr_cc_library")
package(default_visibility = ["//visibility:public"])
licenses(["notice"])
zephyr_cc_library(
name = "id",
hdrs = [
"@pigweed//pw_thread_zephyr:id_public_overrides/pw_thread_backend/id_inline.h",
"@pigweed//pw_thread_zephyr:id_public_overrides/pw_thread_backend/id_native.h",
],
strip_include_prefix = "id_public_overrides",
deps = [
":id_private",
],
)
zephyr_cc_library(
name = "id_private",
hdrs = [
"@pigweed//pw_thread_zephyr:public/pw_thread_zephyr/id_inline.h",
"@pigweed//pw_thread_zephyr:public/pw_thread_zephyr/id_native.h",
],
strip_include_prefix = "public",
visibility = ["//visibility:private"],
deps = [
"@pigweed//pw_assert:assert",
"@pigweed//pw_interrupt:context",
"@pigweed//pw_thread:id.facade",
],
)
zephyr_cc_library(
name = "sleep",
hdrs = [
"@pigweed//pw_thread_zephyr:sleep_public_overrides/pw_thread_backend/sleep_inline.h",
],
strip_include_prefix = "sleep_public_overrides",
deps = [
":sleep_private",
],
)
zephyr_cc_library(
name = "sleep_private",
srcs = [
"@pigweed//pw_thread_zephyr:sleep.cc",
],
hdrs = [
"@pigweed//pw_thread_zephyr:public/pw_thread_zephyr/sleep_inline.h",
],
implementation_deps = ["@pigweed//pw_assert:check"],
strip_include_prefix = "public",
visibility = ["//visibility:private"],
deps = [
"@pigweed//pw_chrono:system_clock",
"@pigweed//pw_thread:sleep.facade",
"@pigweed//pw_thread:thread",
],
)
zephyr_cc_library(
name = "thread",
srcs = [
"@pigweed//pw_thread_zephyr:thread.cc",
],
implementation_deps = ["@pigweed//pw_assert:check"],
deps = [
":public_includes",
":public_overrides_includes",
"@pigweed//pw_assert:assert",
"@pigweed//pw_function",
"@pigweed//pw_span",
"@pigweed//pw_string",
"@pigweed//pw_thread:thread.facade",
],
)
zephyr_cc_library(
name = "thread_creation",
deps = [
":public_includes",
":public_overrides_includes",
],
)
zephyr_cc_library(
name = "public_includes",
hdrs = [
"@pigweed//pw_thread_zephyr:public/pw_thread_zephyr/context.h",
"@pigweed//pw_thread_zephyr:public/pw_thread_zephyr/options.h",
"@pigweed//pw_thread_zephyr:public/pw_thread_zephyr/priority.h",
"@pigweed//pw_thread_zephyr:public/pw_thread_zephyr/stack.h",
"@pigweed//pw_thread_zephyr:public/pw_thread_zephyr/thread_inline.h",
"@pigweed//pw_thread_zephyr:public/pw_thread_zephyr/thread_native.h",
],
strip_include_prefix = "public",
)
zephyr_cc_library(
name = "public_overrides_includes",
hdrs = [
"@pigweed//pw_thread_zephyr:thread_public_overrides/pw_thread_backend/context.h",
"@pigweed//pw_thread_zephyr:thread_public_overrides/pw_thread_backend/options.h",
"@pigweed//pw_thread_zephyr:thread_public_overrides/pw_thread_backend/stack.h",
"@pigweed//pw_thread_zephyr:thread_public_overrides/pw_thread_backend/priority.h",
"@pigweed//pw_thread_zephyr:thread_public_overrides/pw_thread_backend/thread_inline.h",
"@pigweed//pw_thread_zephyr:thread_public_overrides/pw_thread_backend/thread_native.h",
],
strip_include_prefix = "thread_public_overrides",
)