1# Copyright 2021 The Pigweed Authors 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); you may not 4# use this file except in compliance with the License. You may obtain a copy of 5# the License at 6# 7# https://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12# License for the specific language governing permissions and limitations under 13# the License. 14 15load("@rules_cc//cc:cc_library.bzl", "cc_library") 16load("@rules_python//sphinxdocs:sphinx_docs_library.bzl", "sphinx_docs_library") 17load("//pw_build:compatibility.bzl", "incompatible_with_mcu") 18 19package(default_visibility = ["//visibility:public"]) 20 21licenses(["notice"]) 22 23cc_library( 24 name = "interrupt_spin_lock", 25 hdrs = [ 26 "public/pw_sync_baremetal/interrupt_spin_lock_inline.h", 27 "public/pw_sync_baremetal/interrupt_spin_lock_native.h", 28 "public_overrides/pw_sync_backend/interrupt_spin_lock_inline.h", 29 "public_overrides/pw_sync_backend/interrupt_spin_lock_native.h", 30 ], 31 includes = [ 32 "public", 33 "public_overrides", 34 ], 35 target_compatible_with = ["@platforms//os:none"], 36 deps = [ 37 "//pw_assert:assert", 38 "//pw_sync:interrupt_spin_lock.facade", 39 "//pw_sync:yield_core", 40 ], 41) 42 43cc_library( 44 name = "mutex", 45 hdrs = [ 46 "public/pw_sync_baremetal/mutex_inline.h", 47 "public/pw_sync_baremetal/mutex_native.h", 48 "public_overrides/pw_sync_backend/mutex_inline.h", 49 "public_overrides/pw_sync_backend/mutex_native.h", 50 ], 51 includes = [ 52 "public", 53 "public_overrides", 54 ], 55 target_compatible_with = ["@platforms//os:none"], 56 deps = [ 57 "//pw_assert:assert", 58 "//pw_sync:mutex.facade", 59 ], 60) 61 62cc_library( 63 name = "recursive_mutex", 64 hdrs = [ 65 "public/pw_sync_baremetal/recursive_mutex_inline.h", 66 "public/pw_sync_baremetal/recursive_mutex_native.h", 67 "public_overrides/pw_sync_backend/recursive_mutex_inline.h", 68 "public_overrides/pw_sync_backend/recursive_mutex_native.h", 69 ], 70 includes = [ 71 "public", 72 "public_overrides", 73 ], 74 target_compatible_with = ["@platforms//os:none"], 75 visibility = ["//pw_sync:__pkg__"], 76 deps = [ 77 "//pw_assert:assert", 78 "//pw_sync:recursive_mutex.facade", 79 ], 80) 81 82sphinx_docs_library( 83 name = "docs", 84 srcs = [ 85 "docs.rst", 86 ], 87 prefix = "pw_sync_baremetal/", 88 target_compatible_with = incompatible_with_mcu(), 89) 90