blob: b97a3a594366c0f69a43f5e2ca7002c361c697be [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 = "binary_semaphore",
srcs = [
"@pigweed//pw_sync_zephyr:binary_semaphore.cc",
],
implementation_deps = ["@pigweed//pw_assert:check"],
deps = [
":public_includes",
":public_overrides_includes",
"@pigweed//pw_assert:assert",
"@pigweed//pw_chrono:system_clock",
"@pigweed//pw_interrupt:context",
"@pigweed//pw_sync:binary_semaphore.facade",
],
)
zephyr_cc_library(
name = "interrupt_spin_lock",
srcs = [
"@pigweed//pw_sync_zephyr:interrupt_spin_lock.cc",
],
implementation_deps = ["@pigweed//pw_assert:check"],
deps = [
":public_includes",
":public_overrides_includes",
"@pigweed//pw_interrupt:context",
"@pigweed//pw_sync:interrupt_spin_lock.facade",
],
)
zephyr_cc_library(
name = "public_includes",
hdrs = [
"@pigweed//pw_sync_zephyr:public/pw_sync_zephyr/interrupt_spin_lock_inline.h",
"@pigweed//pw_sync_zephyr:public/pw_sync_zephyr/interrupt_spin_lock_native.h",
"@pigweed//pw_sync_zephyr:public/pw_sync_zephyr/binary_semaphore_inline.h",
"@pigweed//pw_sync_zephyr:public/pw_sync_zephyr/binary_semaphore_native.h",
],
strip_include_prefix = "public",
)
zephyr_cc_library(
name = "public_overrides_includes",
hdrs = [
"@pigweed//pw_sync_zephyr:public_overrides/pw_sync_backend/interrupt_spin_lock_inline.h",
"@pigweed//pw_sync_zephyr:public_overrides/pw_sync_backend/interrupt_spin_lock_native.h",
"@pigweed//pw_sync_zephyr:public_overrides/pw_sync_backend/binary_semaphore_inline.h",
"@pigweed//pw_sync_zephyr:public_overrides/pw_sync_backend/binary_semaphore_native.h",
],
strip_include_prefix = "public_overrides",
)