xref: /aosp_15_r20/external/pigweed/pw_sync_baremetal/BUILD.bazel (revision 61c4878ac05f98d0ceed94b57d316916de578985)
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
15package(default_visibility = ["//visibility:public"])
16
17licenses(["notice"])
18
19cc_library(
20    name = "interrupt_spin_lock",
21    hdrs = [
22        "public/pw_sync_baremetal/interrupt_spin_lock_inline.h",
23        "public/pw_sync_baremetal/interrupt_spin_lock_native.h",
24        "public_overrides/pw_sync_backend/interrupt_spin_lock_inline.h",
25        "public_overrides/pw_sync_backend/interrupt_spin_lock_native.h",
26    ],
27    includes = [
28        "public",
29        "public_overrides",
30    ],
31    target_compatible_with = ["@platforms//os:none"],
32    deps = [
33        "//pw_assert",
34        "//pw_sync:interrupt_spin_lock.facade",
35        "//pw_sync:yield_core",
36    ],
37)
38
39cc_library(
40    name = "mutex",
41    hdrs = [
42        "public/pw_sync_baremetal/mutex_inline.h",
43        "public/pw_sync_baremetal/mutex_native.h",
44        "public_overrides/pw_sync_backend/mutex_inline.h",
45        "public_overrides/pw_sync_backend/mutex_native.h",
46    ],
47    includes = [
48        "public",
49        "public_overrides",
50    ],
51    target_compatible_with = ["@platforms//os:none"],
52    deps = [
53        "//pw_assert",
54        "//pw_sync:mutex.facade",
55    ],
56)
57
58cc_library(
59    name = "recursive_mutex",
60    hdrs = [
61        "public/pw_sync_baremetal/recursive_mutex_inline.h",
62        "public/pw_sync_baremetal/recursive_mutex_native.h",
63        "public_overrides/pw_sync_backend/recursive_mutex_inline.h",
64        "public_overrides/pw_sync_backend/recursive_mutex_native.h",
65    ],
66    includes = [
67        "public",
68        "public_overrides",
69    ],
70    target_compatible_with = ["@platforms//os:none"],
71    visibility = ["//pw_sync:__pkg__"],
72    deps = [
73        "//pw_assert",
74        "//pw_sync:recursive_mutex.facade",
75    ],
76)
77