1# Copyright 2020 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_threadx/binary_semaphore_inline.h", 26 "public/pw_sync_threadx/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:threadx", 36 ], 37 # TODO: b/290364219 - Add threadx as a dependency. 38 deps = [ 39 "//pw_chrono:system_clock", 40 "//pw_interrupt:context", 41 "//pw_sync:binary_semaphore.facade", 42 ], 43) 44 45cc_library( 46 name = "counting_semaphore", 47 srcs = [ 48 "counting_semaphore.cc", 49 ], 50 hdrs = [ 51 "public/pw_sync_threadx/counting_semaphore_inline.h", 52 "public/pw_sync_threadx/counting_semaphore_native.h", 53 "public_overrides/pw_sync_backend/counting_semaphore_inline.h", 54 "public_overrides/pw_sync_backend/counting_semaphore_native.h", 55 ], 56 includes = [ 57 "public", 58 "public_overrides", 59 ], 60 target_compatible_with = [ 61 "//pw_build/constraints/rtos:threadx", 62 ], 63 # TODO: b/290364219 - Add threadx as a dependency. 64 deps = [ 65 "//pw_chrono:system_clock", 66 "//pw_interrupt:context", 67 "//pw_sync:counting_semaphore.facade", 68 ], 69) 70 71cc_library( 72 name = "mutex", 73 hdrs = [ 74 "public/pw_sync_threadx/mutex_inline.h", 75 "public/pw_sync_threadx/mutex_native.h", 76 "public_overrides/pw_sync_backend/mutex_inline.h", 77 "public_overrides/pw_sync_backend/mutex_native.h", 78 ], 79 includes = [ 80 "public", 81 "public_overrides", 82 ], 83 target_compatible_with = [ 84 "//pw_build/constraints/rtos:threadx", 85 ], 86 # TODO: b/290364219 - Add threadx as a dependency. 87 deps = [ 88 "//pw_sync:mutex.facade", 89 ], 90) 91 92cc_library( 93 name = "timed_mutex", 94 srcs = [ 95 "timed_mutex.cc", 96 ], 97 hdrs = [ 98 "public/pw_sync_threadx/timed_mutex_inline.h", 99 "public_overrides/pw_sync_backend/timed_mutex_inline.h", 100 ], 101 includes = [ 102 "public", 103 "public_overrides", 104 ], 105 target_compatible_with = [ 106 "//pw_build/constraints/rtos:threadx", 107 ], 108 # TODO: b/290364219 - Add threadx as a dependency. 109 deps = [ 110 "//pw_chrono:system_clock", 111 "//pw_interrupt:context", 112 "//pw_sync:timed_mutex.facade", 113 ], 114) 115 116cc_library( 117 name = "interrupt_spin_lock", 118 srcs = [ 119 "interrupt_spin_lock.cc", 120 ], 121 hdrs = [ 122 "public/pw_sync_threadx/interrupt_spin_lock_inline.h", 123 "public/pw_sync_threadx/interrupt_spin_lock_native.h", 124 "public_overrides/pw_sync_backend/interrupt_spin_lock_inline.h", 125 "public_overrides/pw_sync_backend/interrupt_spin_lock_native.h", 126 ], 127 includes = [ 128 "public", 129 "public_overrides", 130 ], 131 target_compatible_with = [ 132 "//pw_build/constraints/rtos:threadx", 133 ], 134 # TODO: b/290364219 - Add threadx as a dependency. 135 deps = [ 136 "//pw_sync:interrupt_spin_lock.facade", 137 ], 138) 139