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 15load( 16 "//pw_build:pigweed.bzl", 17 "pw_cc_test", 18) 19 20package(default_visibility = ["//visibility:public"]) 21 22licenses(["notice"]) 23 24cc_library( 25 name = "id", 26 hdrs = [ 27 "id_public_overrides/pw_thread_backend/id_inline.h", 28 "id_public_overrides/pw_thread_backend/id_native.h", 29 "public/pw_thread_threadx/id_inline.h", 30 "public/pw_thread_threadx/id_native.h", 31 ], 32 includes = [ 33 "id_public_overrides", 34 "public", 35 ], 36 # TODO: b/257321712 - Add ThreadX dependency. 37 deps = [ 38 "//pw_thread:id_facade", 39 ], 40) 41 42cc_library( 43 name = "thread", 44 srcs = [ 45 "thread.cc", 46 ], 47 hdrs = [ 48 "public/pw_thread_threadx/config.h", 49 "public/pw_thread_threadx/context.h", 50 "public/pw_thread_threadx/options.h", 51 "public/pw_thread_threadx/thread_inline.h", 52 "public/pw_thread_threadx/thread_native.h", 53 "thread_public_overrides/pw_thread_backend/thread_inline.h", 54 "thread_public_overrides/pw_thread_backend/thread_native.h", 55 ], 56 includes = [ 57 "public", 58 "thread_public_overrides", 59 ], 60 # TODO: b/257321712 - Add ThreadX dependency. 61 tags = ["manual"], 62 deps = [ 63 ":config_override", 64 ":id", 65 "//pw_assert", 66 "//pw_string", 67 "//pw_thread:deprecated_or_new_thread_function", 68 "//pw_thread:thread_facade", 69 ], 70) 71 72label_flag( 73 name = "config_override", 74 build_setting_default = "//pw_build:default_module_config", 75) 76 77cc_library( 78 name = "non_portable_test_thread_options", 79 srcs = [ 80 "test_threads.cc", 81 ], 82 # TODO: b/257321712 - This target doesn't build. 83 tags = ["manual"], 84 deps = [ 85 "//pw_chrono:system_clock", 86 "//pw_thread:non_portable_test_thread_options", 87 "//pw_thread:sleep", 88 "//pw_thread:thread_facade", 89 ], 90) 91 92pw_cc_test( 93 name = "thread_backend_test", 94 # TODO: b/257321712 - This target doesn't build. 95 tags = ["manual"], 96 deps = [ 97 ":non_portable_test_thread_options", 98 "//pw_thread:thread_facade_test", 99 ], 100) 101 102cc_library( 103 name = "sleep", 104 srcs = [ 105 "sleep.cc", 106 ], 107 hdrs = [ 108 "public/pw_thread_threadx/sleep_inline.h", 109 "sleep_public_overrides/pw_thread_backend/sleep_inline.h", 110 ], 111 includes = [ 112 "public", 113 "sleep_public_overrides", 114 ], 115 # TODO: b/257321712 - This target doesn't build. 116 tags = ["manual"], 117 deps = [ 118 ":sleep_headers", 119 "//pw_assert", 120 "//pw_chrono:system_clock", 121 "//pw_thread:sleep_facade", 122 ], 123) 124 125cc_library( 126 name = "yield", 127 hdrs = [ 128 "public/pw_thread_threadx/yield_inline.h", 129 "yield_public_overrides/pw_thread_backend/yield_inline.h", 130 ], 131 includes = [ 132 "public", 133 "yield_public_overrides", 134 ], 135 # TODO: b/257321712 - This target doesn't build. 136 tags = ["manual"], 137 deps = [ 138 "//pw_thread:yield_facade", 139 ], 140) 141 142cc_library( 143 name = "util", 144 srcs = [ 145 "util.cc", 146 ], 147 hdrs = [ 148 "public/pw_thread_threadx/util.h", 149 ], 150 includes = ["public"], 151 # TODO: b/257321712 - This target doesn't build. 152 tags = ["manual"], 153 deps = [ 154 "//pw_function", 155 "//pw_status", 156 ], 157) 158 159cc_library( 160 name = "snapshot", 161 srcs = [ 162 "snapshot.cc", 163 ], 164 hdrs = [ 165 "public/pw_thread_threadx/snapshot.h", 166 ], 167 # TODO: b/257321712 - This target doesn't build. 168 tags = ["manual"], 169 deps = [ 170 ":util", 171 "//pw_bytes", 172 "//pw_function", 173 "//pw_log", 174 "//pw_protobuf", 175 "//pw_status", 176 "//pw_thread:thread_cc.pwpb", 177 ], 178) 179