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 = "binary_semaphore", 21 srcs = [ 22 "binary_semaphore.cc", 23 ], 24 hdrs = [ 25 "public/pw_sync_embos/binary_semaphore_inline.h", 26 "public/pw_sync_embos/binary_semaphore_native.h", 27 "public_overrides/pw_sync_backend/binary_semaphore_inline.h", 28 "public_overrides/pw_sync_backend/binary_semaphore_native.h", 29 ], 30 includes = [ 31 "public", 32 "public_overrides", 33 ], 34 target_compatible_with = [ 35 "//pw_build/constraints/rtos:embos", 36 ], 37 # TODO: b/234876414 - This should depend on embOS but our third parties 38 # currently do not have Bazel support. 39 deps = [ 40 "//pw_chrono:system_clock", 41 "//pw_interrupt:context", 42 "//pw_sync:binary_semaphore.facade", 43 ], 44) 45 46cc_library( 47 name = "counting_semaphore", 48 srcs = [ 49 "counting_semaphore.cc", 50 ], 51 hdrs = [ 52 "public/pw_sync_embos/counting_semaphore_inline.h", 53 "public/pw_sync_embos/counting_semaphore_native.h", 54 "public_overrides/pw_sync_backend/counting_semaphore_inline.h", 55 "public_overrides/pw_sync_backend/counting_semaphore_native.h", 56 ], 57 includes = [ 58 "public", 59 "public_overrides", 60 ], 61 target_compatible_with = [ 62 "//pw_build/constraints/rtos:embos", 63 ], 64 # TODO: b/234876414 - This should depend on embOS but our third parties 65 # currently do not have Bazel support. 66 deps = [ 67 "//pw_chrono:system_clock", 68 "//pw_interrupt:context", 69 "//pw_sync:counting_semaphore.facade", 70 ], 71) 72 73cc_library( 74 name = "mutex", 75 hdrs = [ 76 "public/pw_sync_embos/mutex_inline.h", 77 "public/pw_sync_embos/mutex_native.h", 78 "public_overrides/pw_sync_backend/mutex_inline.h", 79 "public_overrides/pw_sync_backend/mutex_native.h", 80 ], 81 includes = [ 82 "public", 83 "public_overrides", 84 ], 85 target_compatible_with = [ 86 "//pw_build/constraints/rtos:embos", 87 ], 88 # TODO: b/234876414 - This should depend on embOS but our third parties 89 # currently do not have Bazel support. 90 deps = [ 91 ":mutex_headers", 92 "//pw_sync:mutex.facade", 93 ], 94) 95 96cc_library( 97 name = "timed_mutex", 98 srcs = [ 99 "timed_mutex.cc", 100 ], 101 hdrs = [ 102 "public/pw_sync_embos/timed_mutex_inline.h", 103 "public_overrides/pw_sync_backend/timed_mutex_inline.h", 104 ], 105 includes = [ 106 "public", 107 "public_overrides", 108 ], 109 target_compatible_with = [ 110 "//pw_build/constraints/rtos:embos", 111 ], 112 # TODO: b/234876414 - This should depend on embOS but our third parties 113 # currently do not have Bazel support. 114 deps = [ 115 "//pw_chrono:system_clock", 116 "//pw_interrupt:context", 117 "//pw_sync:timed_mutex.facade", 118 ], 119) 120 121cc_library( 122 name = "interrupt_spin_lock_headers", 123 target_compatible_with = [ 124 "//pw_build/constraints/rtos:embos", 125 ], 126) 127 128cc_library( 129 name = "interrupt_spin_lock", 130 srcs = [ 131 "interrupt_spin_lock.cc", 132 ], 133 hdrs = [ 134 "public/pw_sync_embos/interrupt_spin_lock_inline.h", 135 "public/pw_sync_embos/interrupt_spin_lock_native.h", 136 "public_overrides/pw_sync_backend/interrupt_spin_lock_inline.h", 137 "public_overrides/pw_sync_backend/interrupt_spin_lock_native.h", 138 ], 139 includes = [ 140 "public", 141 "public_overrides", 142 ], 143 target_compatible_with = [ 144 "//pw_build/constraints/rtos:embos", 145 ], 146 # TODO: b/234876414 - This should depend on embOS but our third parties 147 # currently do not have Bazel support. 148 deps = [ 149 "//pw_sync:interrupt_spin_lock.facade", 150 ], 151) 152