Ewout van Bekkum | f010606 | 2021-05-06 14:08:33 -0700 | [diff] [blame] | 1 | # Copyright 2021 The Pigweed Authors |
Ewout van Bekkum | 5890193 | 2020-11-09 12:46:52 -0800 | [diff] [blame] | 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 | |
| 15 | load( |
| 16 | "//pw_build:pigweed.bzl", |
Nathaniel Brough | c2d5781 | 2021-04-18 22:52:00 +0800 | [diff] [blame] | 17 | "pw_cc_facade", |
Ewout van Bekkum | 5890193 | 2020-11-09 12:46:52 -0800 | [diff] [blame] | 18 | "pw_cc_library", |
| 19 | "pw_cc_test", |
| 20 | ) |
Ewout van Bekkum | f010606 | 2021-05-06 14:08:33 -0700 | [diff] [blame] | 21 | load( |
| 22 | "//pw_build:selects.bzl", |
| 23 | "TARGET_COMPATIBLE_WITH_HOST_SELECT", |
| 24 | ) |
Ewout van Bekkum | 5890193 | 2020-11-09 12:46:52 -0800 | [diff] [blame] | 25 | |
| 26 | package(default_visibility = ["//visibility:public"]) |
| 27 | |
Rob Mohr | 5fc2541 | 2021-06-23 09:35:23 -0700 | [diff] [blame] | 28 | licenses(["notice"]) |
Ewout van Bekkum | 5890193 | 2020-11-09 12:46:52 -0800 | [diff] [blame] | 29 | |
Nathaniel Brough | c2d5781 | 2021-04-18 22:52:00 +0800 | [diff] [blame] | 30 | pw_cc_facade( |
Ewout van Bekkum | 9618d8a | 2020-11-09 12:46:52 -0800 | [diff] [blame] | 31 | name = "binary_semaphore_facade", |
| 32 | hdrs = [ |
| 33 | "public/pw_sync/binary_semaphore.h", |
| 34 | ], |
| 35 | includes = ["public"], |
Ewout van Bekkum | 9618d8a | 2020-11-09 12:46:52 -0800 | [diff] [blame] | 36 | deps = [ |
Ewout van Bekkum | 9618d8a | 2020-11-09 12:46:52 -0800 | [diff] [blame] | 37 | "//pw_chrono:system_clock", |
| 38 | "//pw_preprocessor", |
| 39 | ], |
| 40 | ) |
| 41 | |
| 42 | pw_cc_library( |
| 43 | name = "binary_semaphore", |
Nathaniel Brough | c2d5781 | 2021-04-18 22:52:00 +0800 | [diff] [blame] | 44 | srcs = [ |
| 45 | "binary_semaphore.cc", |
| 46 | ], |
Ewout van Bekkum | 9618d8a | 2020-11-09 12:46:52 -0800 | [diff] [blame] | 47 | deps = [ |
| 48 | ":binary_semaphore_facade", |
Nathaniel Brough | c2d5781 | 2021-04-18 22:52:00 +0800 | [diff] [blame] | 49 | "@pigweed_config//:pw_sync_binary_semaphore_backend", |
Ewout van Bekkum | 9618d8a | 2020-11-09 12:46:52 -0800 | [diff] [blame] | 50 | ], |
| 51 | ) |
| 52 | |
| 53 | pw_cc_library( |
Nathaniel Brough | c2d5781 | 2021-04-18 22:52:00 +0800 | [diff] [blame] | 54 | name = "binary_semaphore_backend_multiplexer", |
| 55 | visibility = ["@pigweed_config//:__pkg__"], |
| 56 | deps = select({ |
| 57 | "@platforms//os:none": ["//pw_sync_baremetal:binary_semaphore"], |
| 58 | "//pw_build/constraints/rtos:embos": ["//pw_sync_embos:binary_semaphore"], |
| 59 | "//pw_build/constraints/rtos:freertos": ["//pw_sync_freertos:binary_semaphore"], |
| 60 | "//pw_build/constraints/rtos:threadx": ["//pw_sync_threadx:binary_semaphore"], |
| 61 | "//conditions:default": ["//pw_sync_stl:binary_semaphore"], |
| 62 | }), |
Ewout van Bekkum | 9618d8a | 2020-11-09 12:46:52 -0800 | [diff] [blame] | 63 | ) |
| 64 | |
Nathaniel Brough | c2d5781 | 2021-04-18 22:52:00 +0800 | [diff] [blame] | 65 | pw_cc_facade( |
Ewout van Bekkum | 9618d8a | 2020-11-09 12:46:52 -0800 | [diff] [blame] | 66 | name = "counting_semaphore_facade", |
| 67 | hdrs = [ |
| 68 | "public/pw_sync/counting_semaphore.h", |
| 69 | ], |
| 70 | includes = ["public"], |
Ewout van Bekkum | 9618d8a | 2020-11-09 12:46:52 -0800 | [diff] [blame] | 71 | deps = [ |
Ewout van Bekkum | 9618d8a | 2020-11-09 12:46:52 -0800 | [diff] [blame] | 72 | "//pw_chrono:system_clock", |
| 73 | "//pw_preprocessor", |
| 74 | ], |
| 75 | ) |
| 76 | |
| 77 | pw_cc_library( |
| 78 | name = "counting_semaphore", |
Nathaniel Brough | c2d5781 | 2021-04-18 22:52:00 +0800 | [diff] [blame] | 79 | srcs = [ |
| 80 | "counting_semaphore.cc", |
| 81 | ], |
Ewout van Bekkum | 9618d8a | 2020-11-09 12:46:52 -0800 | [diff] [blame] | 82 | deps = [ |
| 83 | ":counting_semaphore_facade", |
Nathaniel Brough | c2d5781 | 2021-04-18 22:52:00 +0800 | [diff] [blame] | 84 | "@pigweed_config//:pw_sync_counting_semaphore_backend", |
Ewout van Bekkum | 9618d8a | 2020-11-09 12:46:52 -0800 | [diff] [blame] | 85 | ], |
| 86 | ) |
| 87 | |
| 88 | pw_cc_library( |
Nathaniel Brough | c2d5781 | 2021-04-18 22:52:00 +0800 | [diff] [blame] | 89 | name = "counting_semaphore_backend_multiplexer", |
| 90 | visibility = ["@pigweed_config//:__pkg__"], |
| 91 | deps = select({ |
| 92 | "@platforms//os:none": ["//pw_sync_baremetal:counting_semaphore"], |
| 93 | "//pw_build/constraints/rtos:embos": ["//pw_sync_embos:counting_semaphore"], |
| 94 | "//pw_build/constraints/rtos:freertos": ["//pw_sync_freertos:counting_semaphore"], |
| 95 | "//pw_build/constraints/rtos:threadx": ["//pw_sync_threadx:counting_semaphore"], |
| 96 | "//conditions:default": ["//pw_sync_stl:counting_semaphore"], |
| 97 | }), |
Ewout van Bekkum | 9618d8a | 2020-11-09 12:46:52 -0800 | [diff] [blame] | 98 | ) |
| 99 | |
| 100 | pw_cc_library( |
Ewout van Bekkum | cc9ef83 | 2021-04-08 08:51:16 -0700 | [diff] [blame] | 101 | name = "lock_annotations", |
| 102 | hdrs = [ |
| 103 | "public/pw_sync/lock_annotations.h", |
| 104 | ], |
| 105 | includes = ["public"], |
| 106 | deps = [ |
| 107 | "//pw_preprocessor", |
| 108 | ], |
| 109 | ) |
| 110 | |
Ewout van Bekkum | f6c3a78 | 2021-08-31 11:23:35 -0700 | [diff] [blame] | 111 | pw_cc_library( |
| 112 | name = "borrow", |
| 113 | hdrs = [ |
| 114 | "public/pw_sync/borrow.h", |
| 115 | ], |
| 116 | includes = ["public"], |
| 117 | deps = [ |
Ewout van Bekkum | baf2fdc | 2021-09-09 14:11:51 -0700 | [diff] [blame] | 118 | ":virtual_basic_lockable", |
Ewout van Bekkum | f6c3a78 | 2021-08-31 11:23:35 -0700 | [diff] [blame] | 119 | "//pw_assert", |
| 120 | ], |
| 121 | ) |
| 122 | |
Ewout van Bekkum | baf2fdc | 2021-09-09 14:11:51 -0700 | [diff] [blame] | 123 | pw_cc_library( |
| 124 | name = "virtual_basic_lockable", |
| 125 | hdrs = [ |
| 126 | "public/pw_sync/virtual_basic_lockable.h", |
| 127 | ], |
| 128 | includes = ["public"], |
| 129 | deps = [ |
| 130 | ":lock_annotations", |
| 131 | "//pw_polyfill", |
| 132 | ], |
| 133 | ) |
| 134 | |
Nathaniel Brough | c2d5781 | 2021-04-18 22:52:00 +0800 | [diff] [blame] | 135 | pw_cc_facade( |
Ewout van Bekkum | 9618d8a | 2020-11-09 12:46:52 -0800 | [diff] [blame] | 136 | name = "mutex_facade", |
| 137 | hdrs = [ |
| 138 | "public/pw_sync/mutex.h", |
| 139 | ], |
| 140 | includes = ["public"], |
Ewout van Bekkum | 9618d8a | 2020-11-09 12:46:52 -0800 | [diff] [blame] | 141 | deps = [ |
Nathaniel Brough | a1113be | 2021-03-07 09:05:41 +0800 | [diff] [blame] | 142 | ":lock_annotations", |
Ewout van Bekkum | baf2fdc | 2021-09-09 14:11:51 -0700 | [diff] [blame] | 143 | ":virtual_basic_lockable", |
Ewout van Bekkum | 9618d8a | 2020-11-09 12:46:52 -0800 | [diff] [blame] | 144 | "//pw_preprocessor", |
| 145 | ], |
| 146 | ) |
| 147 | |
| 148 | pw_cc_library( |
| 149 | name = "mutex", |
Nathaniel Brough | c2d5781 | 2021-04-18 22:52:00 +0800 | [diff] [blame] | 150 | srcs = [ |
| 151 | "mutex.cc", |
| 152 | ], |
Ewout van Bekkum | 9618d8a | 2020-11-09 12:46:52 -0800 | [diff] [blame] | 153 | deps = [ |
| 154 | ":mutex_facade", |
Nathaniel Brough | c2d5781 | 2021-04-18 22:52:00 +0800 | [diff] [blame] | 155 | "@pigweed_config//:pw_sync_mutex_backend", |
Ewout van Bekkum | 9618d8a | 2020-11-09 12:46:52 -0800 | [diff] [blame] | 156 | ], |
| 157 | ) |
| 158 | |
| 159 | pw_cc_library( |
Nathaniel Brough | c2d5781 | 2021-04-18 22:52:00 +0800 | [diff] [blame] | 160 | name = "mutex_backend_multiplexer", |
| 161 | visibility = ["@pigweed_config//:__pkg__"], |
| 162 | deps = select({ |
| 163 | "@platforms//os:none": ["//pw_sync_baremetal:mutex"], |
| 164 | "//pw_build/constraints/rtos:embos": ["//pw_sync_embos:mutex"], |
| 165 | "//pw_build/constraints/rtos:freertos": ["//pw_sync_freertos:mutex"], |
| 166 | "//pw_build/constraints/rtos:threadx": ["//pw_sync_threadx:mutex"], |
| 167 | "//conditions:default": ["//pw_sync_stl:mutex"], |
| 168 | }), |
Ewout van Bekkum | 9618d8a | 2020-11-09 12:46:52 -0800 | [diff] [blame] | 169 | ) |
| 170 | |
Nathaniel Brough | c2d5781 | 2021-04-18 22:52:00 +0800 | [diff] [blame] | 171 | pw_cc_facade( |
Ewout van Bekkum | 6f5b8fb | 2021-04-06 16:15:22 -0700 | [diff] [blame] | 172 | name = "timed_mutex_facade", |
| 173 | hdrs = [ |
| 174 | "public/pw_sync/timed_mutex.h", |
| 175 | ], |
| 176 | includes = ["public"], |
Ewout van Bekkum | 6f5b8fb | 2021-04-06 16:15:22 -0700 | [diff] [blame] | 177 | deps = [ |
Nathaniel Brough | a1113be | 2021-03-07 09:05:41 +0800 | [diff] [blame] | 178 | ":lock_annotations", |
Ewout van Bekkum | 6f5b8fb | 2021-04-06 16:15:22 -0700 | [diff] [blame] | 179 | ":mutex_facade", |
Ewout van Bekkum | baf2fdc | 2021-09-09 14:11:51 -0700 | [diff] [blame] | 180 | ":virtual_basic_lockable", |
Ewout van Bekkum | cc9ef83 | 2021-04-08 08:51:16 -0700 | [diff] [blame] | 181 | "//pw_chrono:system_clock", |
Ewout van Bekkum | 6f5b8fb | 2021-04-06 16:15:22 -0700 | [diff] [blame] | 182 | "//pw_preprocessor", |
| 183 | ], |
| 184 | ) |
| 185 | |
| 186 | pw_cc_library( |
| 187 | name = "timed_mutex", |
Nathaniel Brough | a1113be | 2021-03-07 09:05:41 +0800 | [diff] [blame] | 188 | srcs = [ |
Nathaniel Brough | c2d5781 | 2021-04-18 22:52:00 +0800 | [diff] [blame] | 189 | "timed_mutex.cc", |
Nathaniel Brough | a1113be | 2021-03-07 09:05:41 +0800 | [diff] [blame] | 190 | ], |
Nathaniel Brough | c2d5781 | 2021-04-18 22:52:00 +0800 | [diff] [blame] | 191 | deps = [ |
| 192 | ":mutex", |
| 193 | ":timed_mutex_facade", |
Ewout van Bekkum | baf2fdc | 2021-09-09 14:11:51 -0700 | [diff] [blame] | 194 | ":virtual_basic_lockable", |
Nathaniel Brough | c2d5781 | 2021-04-18 22:52:00 +0800 | [diff] [blame] | 195 | "@pigweed_config//:pw_sync_timed_mutex_backend", |
| 196 | ], |
| 197 | ) |
| 198 | |
| 199 | pw_cc_library( |
| 200 | name = "timed_mutex_backend_multiplexer", |
| 201 | visibility = ["@pigweed_config//:__pkg__"], |
| 202 | deps = select({ |
| 203 | "@platforms//os:none": ["//pw_sync_baremetal:timed_mutex"], |
| 204 | "//pw_build/constraints/rtos:embos": ["//pw_sync_embos:timed_mutex"], |
| 205 | "//pw_build/constraints/rtos:freertos": ["//pw_sync_freertos:timed_mutex"], |
| 206 | "//pw_build/constraints/rtos:threadx": ["//pw_sync_threadx:timed_mutex"], |
| 207 | "//conditions:default": ["//pw_sync_stl:timed_mutex"], |
| 208 | }), |
| 209 | ) |
| 210 | |
| 211 | pw_cc_facade( |
| 212 | name = "interrupt_spin_lock_facade", |
Ewout van Bekkum | 5890193 | 2020-11-09 12:46:52 -0800 | [diff] [blame] | 213 | hdrs = [ |
Ewout van Bekkum | 126e011 | 2021-03-12 10:59:49 -0800 | [diff] [blame] | 214 | "public/pw_sync/interrupt_spin_lock.h", |
Ewout van Bekkum | 5890193 | 2020-11-09 12:46:52 -0800 | [diff] [blame] | 215 | ], |
| 216 | includes = ["public"], |
Ewout van Bekkum | 5890193 | 2020-11-09 12:46:52 -0800 | [diff] [blame] | 217 | deps = [ |
Nathaniel Brough | a1113be | 2021-03-07 09:05:41 +0800 | [diff] [blame] | 218 | ":lock_annotations", |
Ewout van Bekkum | baf2fdc | 2021-09-09 14:11:51 -0700 | [diff] [blame] | 219 | ":virtual_basic_lockable", |
Ewout van Bekkum | 5890193 | 2020-11-09 12:46:52 -0800 | [diff] [blame] | 220 | "//pw_preprocessor", |
| 221 | ], |
| 222 | ) |
| 223 | |
| 224 | pw_cc_library( |
Ewout van Bekkum | 126e011 | 2021-03-12 10:59:49 -0800 | [diff] [blame] | 225 | name = "interrupt_spin_lock", |
Nathaniel Brough | c2d5781 | 2021-04-18 22:52:00 +0800 | [diff] [blame] | 226 | srcs = [ |
| 227 | "interrupt_spin_lock.cc", |
| 228 | ], |
Ewout van Bekkum | 5890193 | 2020-11-09 12:46:52 -0800 | [diff] [blame] | 229 | deps = [ |
Ewout van Bekkum | 126e011 | 2021-03-12 10:59:49 -0800 | [diff] [blame] | 230 | ":interrupt_spin_lock_facade", |
Nathaniel Brough | c2d5781 | 2021-04-18 22:52:00 +0800 | [diff] [blame] | 231 | "@pigweed_config//:pw_sync_interrupt_spin_lock_backend", |
Ewout van Bekkum | 5890193 | 2020-11-09 12:46:52 -0800 | [diff] [blame] | 232 | ], |
| 233 | ) |
| 234 | |
| 235 | pw_cc_library( |
Nathaniel Brough | c2d5781 | 2021-04-18 22:52:00 +0800 | [diff] [blame] | 236 | name = "interrupt_spin_lock_backend_multiplexer", |
| 237 | visibility = ["@pigweed_config//:__pkg__"], |
| 238 | deps = select({ |
| 239 | "@platforms//os:none": ["//pw_sync_baremetal:interrupt_spin_lock"], |
| 240 | "//pw_build/constraints/rtos:embos": ["//pw_sync_embos:interrupt_spin_lock"], |
| 241 | "//pw_build/constraints/rtos:freertos": ["//pw_sync_freertos:interrupt_spin_lock"], |
| 242 | "//pw_build/constraints/rtos:threadx": ["//pw_sync_threadx:interrupt_spin_lock"], |
| 243 | "//conditions:default": ["//pw_sync_stl:interrupt_spin_lock"], |
| 244 | }), |
Ewout van Bekkum | 5890193 | 2020-11-09 12:46:52 -0800 | [diff] [blame] | 245 | ) |
| 246 | |
Ewout van Bekkum | f010606 | 2021-05-06 14:08:33 -0700 | [diff] [blame] | 247 | pw_cc_facade( |
| 248 | name = "thread_notification_facade", |
| 249 | hdrs = [ |
| 250 | "public/pw_sync/thread_notification.h", |
| 251 | ], |
| 252 | includes = ["public"], |
| 253 | ) |
| 254 | |
| 255 | pw_cc_library( |
| 256 | name = "thread_notification", |
| 257 | deps = [ |
| 258 | ":thread_notification_facade", |
| 259 | "@pigweed_config//:pw_sync_thread_notification_backend", |
| 260 | ], |
| 261 | ) |
| 262 | |
| 263 | pw_cc_library( |
| 264 | name = "thread_notification_backend_multiplexer", |
| 265 | visibility = ["@pigweed_config//:__pkg__"], |
| 266 | deps = select({ |
| 267 | "//conditions:default": ["//pw_sync:binary_semaphore_thread_notification_backend"], |
| 268 | }), |
| 269 | ) |
| 270 | |
| 271 | pw_cc_facade( |
| 272 | name = "timed_thread_notification_facade", |
| 273 | hdrs = [ |
| 274 | "public/pw_sync/timed_thread_notification.h", |
| 275 | ], |
| 276 | includes = ["public"], |
| 277 | deps = [ |
| 278 | ":thread_notification_facade", |
| 279 | "//pw_chrono:system_clock", |
| 280 | ], |
| 281 | ) |
| 282 | |
| 283 | pw_cc_library( |
| 284 | name = "timed_thread_notification", |
| 285 | deps = [ |
| 286 | ":thread_notification", |
| 287 | ":timed_thread_notification_facade", |
| 288 | "@pigweed_config//:pw_sync_timed_thread_notification_backend", |
| 289 | ], |
| 290 | ) |
| 291 | |
| 292 | pw_cc_library( |
| 293 | name = "timed_thread_notification_backend_multiplexer", |
| 294 | visibility = ["@pigweed_config//:__pkg__"], |
| 295 | deps = select({ |
| 296 | "//conditions:default": ["//pw_sync:binary_semaphore_timed_thread_notification_backend"], |
| 297 | }), |
| 298 | ) |
| 299 | |
| 300 | pw_cc_library( |
| 301 | name = "binary_semaphore_thread_notification_backend_headers", |
| 302 | hdrs = [ |
| 303 | "public/pw_sync/backends/binary_semaphore_thread_notification_inline.h", |
| 304 | "public/pw_sync/backends/binary_semaphore_thread_notification_native.h", |
| 305 | "public_overrides/pw_sync_backend/thread_notification_inline.h", |
| 306 | "public_overrides/pw_sync_backend/thread_notification_native.h", |
| 307 | ], |
| 308 | includes = [ |
| 309 | "public", |
| 310 | "public_overrides", |
| 311 | ], |
Rob Mohr | 9c266ab | 2021-06-14 17:48:49 -0700 | [diff] [blame] | 312 | target_compatible_with = select(TARGET_COMPATIBLE_WITH_HOST_SELECT), |
Ewout van Bekkum | f010606 | 2021-05-06 14:08:33 -0700 | [diff] [blame] | 313 | deps = [ |
| 314 | ":binary_semaphore_headers", |
| 315 | ], |
Ewout van Bekkum | f010606 | 2021-05-06 14:08:33 -0700 | [diff] [blame] | 316 | ) |
| 317 | |
| 318 | pw_cc_library( |
| 319 | name = "binary_semaphore_thread_notification_backend", |
| 320 | target_compatible_with = select(TARGET_COMPATIBLE_WITH_HOST_SELECT), |
| 321 | deps = [ |
Ewout van Bekkum | f010606 | 2021-05-06 14:08:33 -0700 | [diff] [blame] | 322 | ":binary_semaphore_facade", |
Rob Mohr | 9c266ab | 2021-06-14 17:48:49 -0700 | [diff] [blame] | 323 | ":binary_semaphore_thread_notification_headers", |
Ewout van Bekkum | f010606 | 2021-05-06 14:08:33 -0700 | [diff] [blame] | 324 | ":thread_notification_facade", |
| 325 | ], |
| 326 | ) |
| 327 | |
| 328 | pw_cc_library( |
| 329 | name = "binary_semaphore_timed_thread_notification_backend_headers", |
| 330 | hdrs = [ |
| 331 | "public/pw_sync/backends/binary_semaphore_timed_thread_notification_inline.h", |
| 332 | "public_overrides/pw_sync_backend/timed_thread_notification_inline.h", |
| 333 | ], |
| 334 | includes = [ |
| 335 | "public", |
| 336 | "public_overrides", |
| 337 | ], |
| 338 | target_compatible_with = select(TARGET_COMPATIBLE_WITH_HOST_SELECT), |
| 339 | deps = [ |
| 340 | ":binary_semaphore_thread_notification_backend_headers", |
| 341 | "//pw_chrono:system_clock", |
| 342 | ], |
| 343 | ) |
| 344 | |
| 345 | pw_cc_library( |
| 346 | name = "binary_semaphore_timed_thread_notification_backend", |
| 347 | target_compatible_with = select(TARGET_COMPATIBLE_WITH_HOST_SELECT), |
| 348 | deps = [ |
| 349 | ":binary_semaphore_thread_notification_backend", |
| 350 | ":binary_semaphore_timed_thread_notification_backend_headers", |
| 351 | "//pw_sync:timed_thread_notification_facade", |
| 352 | ], |
| 353 | ) |
| 354 | |
Ewout van Bekkum | 5890193 | 2020-11-09 12:46:52 -0800 | [diff] [blame] | 355 | pw_cc_library( |
| 356 | name = "yield_core", |
| 357 | hdrs = [ |
| 358 | "public/pw_sync/yield_core.h", |
| 359 | ], |
| 360 | includes = ["public"], |
| 361 | ) |
| 362 | |
| 363 | pw_cc_test( |
Ewout van Bekkum | f6c3a78 | 2021-08-31 11:23:35 -0700 | [diff] [blame] | 364 | name = "borrow_test", |
| 365 | srcs = [ |
| 366 | "borrow_test.cc", |
| 367 | ], |
| 368 | deps = [ |
| 369 | ":borrow", |
Ewout van Bekkum | baf2fdc | 2021-09-09 14:11:51 -0700 | [diff] [blame] | 370 | ":virtual_basic_lockable", |
Ewout van Bekkum | f6c3a78 | 2021-08-31 11:23:35 -0700 | [diff] [blame] | 371 | "//pw_assert", |
| 372 | "//pw_unit_test", |
| 373 | ], |
| 374 | ) |
| 375 | |
| 376 | pw_cc_test( |
Ewout van Bekkum | 9618d8a | 2020-11-09 12:46:52 -0800 | [diff] [blame] | 377 | name = "binary_semaphore_facade_test", |
| 378 | srcs = [ |
| 379 | "binary_semaphore_facade_test.cc", |
| 380 | "binary_semaphore_facade_test_c.c", |
| 381 | ], |
| 382 | deps = [ |
| 383 | ":binary_semaphore", |
| 384 | "//pw_preprocessor", |
| 385 | "//pw_unit_test", |
| 386 | ], |
| 387 | ) |
| 388 | |
| 389 | pw_cc_test( |
| 390 | name = "counting_semaphore_facade_test", |
| 391 | srcs = [ |
| 392 | "counting_semaphore_facade_test.cc", |
| 393 | "counting_semaphore_facade_test_c.c", |
| 394 | ], |
| 395 | deps = [ |
| 396 | ":counting_semaphore", |
| 397 | "//pw_preprocessor", |
| 398 | "//pw_unit_test", |
| 399 | ], |
| 400 | ) |
| 401 | |
| 402 | pw_cc_test( |
| 403 | name = "mutex_facade_test", |
| 404 | srcs = [ |
| 405 | "mutex_facade_test.cc", |
| 406 | "mutex_facade_test_c.c", |
| 407 | ], |
| 408 | deps = [ |
| 409 | ":mutex", |
| 410 | "//pw_preprocessor", |
| 411 | "//pw_unit_test", |
| 412 | ], |
| 413 | ) |
| 414 | |
| 415 | pw_cc_test( |
Ewout van Bekkum | 6f5b8fb | 2021-04-06 16:15:22 -0700 | [diff] [blame] | 416 | name = "timed_mutex_facade_test", |
| 417 | srcs = [ |
| 418 | "timed_mutex_facade_test.cc", |
| 419 | "timed_mutex_facade_test_c.c", |
| 420 | ], |
| 421 | deps = [ |
| 422 | ":timed_mutex", |
Ewout van Bekkum | f010606 | 2021-05-06 14:08:33 -0700 | [diff] [blame] | 423 | "//pw_chrono:system_clock", |
Ewout van Bekkum | 6f5b8fb | 2021-04-06 16:15:22 -0700 | [diff] [blame] | 424 | "//pw_preprocessor", |
| 425 | "//pw_unit_test", |
| 426 | ], |
| 427 | ) |
| 428 | |
| 429 | pw_cc_test( |
Ewout van Bekkum | 126e011 | 2021-03-12 10:59:49 -0800 | [diff] [blame] | 430 | name = "interrupt_spin_lock_facade_test", |
Ewout van Bekkum | 5890193 | 2020-11-09 12:46:52 -0800 | [diff] [blame] | 431 | srcs = [ |
Ewout van Bekkum | 126e011 | 2021-03-12 10:59:49 -0800 | [diff] [blame] | 432 | "interrupt_spin_lock_facade_test.cc", |
| 433 | "interrupt_spin_lock_facade_test_c.c", |
Ewout van Bekkum | 5890193 | 2020-11-09 12:46:52 -0800 | [diff] [blame] | 434 | ], |
| 435 | deps = [ |
Ewout van Bekkum | 126e011 | 2021-03-12 10:59:49 -0800 | [diff] [blame] | 436 | ":interrupt_spin_lock", |
Ewout van Bekkum | 5890193 | 2020-11-09 12:46:52 -0800 | [diff] [blame] | 437 | "//pw_preprocessor", |
| 438 | "//pw_unit_test", |
| 439 | ], |
| 440 | ) |
Ewout van Bekkum | f010606 | 2021-05-06 14:08:33 -0700 | [diff] [blame] | 441 | |
| 442 | pw_cc_test( |
| 443 | name = "thread_notification_facade_test", |
| 444 | srcs = [ |
| 445 | "thread_notification_facade_test.cc", |
| 446 | "thread_notification_facade_test_c.c", |
| 447 | ], |
| 448 | deps = [ |
| 449 | ":thread_notification", |
| 450 | "//pw_unit_test", |
| 451 | ], |
| 452 | ) |
| 453 | |
| 454 | pw_cc_test( |
| 455 | name = "timed_thread_notification_facade_test", |
| 456 | srcs = [ |
| 457 | "timed_thread_notification_facade_test.cc", |
| 458 | "timed_thread_notification_facade_test_c.c", |
| 459 | ], |
| 460 | deps = [ |
| 461 | ":timed_thread_notification", |
| 462 | "//pw_chrono:system_clock", |
| 463 | "//pw_unit_test", |
| 464 | ], |
| 465 | ) |