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