Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 1 | cc_library( |
Philipp Schrader | 9b1790e | 2018-03-10 20:21:30 -0800 | [diff] [blame] | 2 | name = "aos_sync", |
| 3 | srcs = [ |
| 4 | "aos_sync.cc", |
| 5 | ], |
| 6 | hdrs = [ |
| 7 | "aos_sync.h", |
| 8 | ], |
| 9 | linkopts = [ |
| 10 | "-lpthread", |
| 11 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 12 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 13 | visibility = ["//visibility:public"], |
Philipp Schrader | 9b1790e | 2018-03-10 20:21:30 -0800 | [diff] [blame] | 14 | deps = [ |
Brian Silverman | 1ed5df5 | 2021-09-13 20:14:06 -0700 | [diff] [blame] | 15 | ":shm_observers", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 16 | "//aos:macros", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 17 | "//aos/util:compiler_memory_barrier", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 18 | "@com_github_google_glog//:glog", |
| 19 | "@com_google_absl//absl/base", |
Philipp Schrader | 9b1790e | 2018-03-10 20:21:30 -0800 | [diff] [blame] | 20 | ], |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 21 | ) |
| 22 | |
| 23 | cc_library( |
Philipp Schrader | 9b1790e | 2018-03-10 20:21:30 -0800 | [diff] [blame] | 24 | name = "core_lib", |
| 25 | srcs = [ |
| 26 | "core_lib.c", |
| 27 | ], |
| 28 | hdrs = [ |
| 29 | "core_lib.h", |
| 30 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 31 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 32 | visibility = ["//visibility:public"], |
Philipp Schrader | 9b1790e | 2018-03-10 20:21:30 -0800 | [diff] [blame] | 33 | deps = [ |
| 34 | ":aos_sync", |
| 35 | ":shared_mem_types", |
| 36 | ], |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 37 | ) |
| 38 | |
| 39 | cc_library( |
Philipp Schrader | 9b1790e | 2018-03-10 20:21:30 -0800 | [diff] [blame] | 40 | name = "shared_mem", |
| 41 | srcs = [ |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 42 | "shared_mem.cc", |
Philipp Schrader | 9b1790e | 2018-03-10 20:21:30 -0800 | [diff] [blame] | 43 | ], |
| 44 | hdrs = [ |
| 45 | "shared_mem.h", |
| 46 | ], |
| 47 | linkopts = [ |
| 48 | "-lrt", |
| 49 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 50 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 51 | visibility = ["//visibility:public"], |
Philipp Schrader | 9b1790e | 2018-03-10 20:21:30 -0800 | [diff] [blame] | 52 | deps = [ |
| 53 | ":aos_sync", |
| 54 | ":core_lib", |
| 55 | ":shared_mem_types", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 56 | "@com_github_google_glog//:glog", |
Philipp Schrader | 9b1790e | 2018-03-10 20:21:30 -0800 | [diff] [blame] | 57 | ], |
Austin Schuh | 044e18b | 2015-10-21 20:17:09 -0700 | [diff] [blame] | 58 | ) |
| 59 | |
| 60 | cc_library( |
Philipp Schrader | 9b1790e | 2018-03-10 20:21:30 -0800 | [diff] [blame] | 61 | # TODO(Brian): This should be shared_mem{,.h}, and the other one should be |
| 62 | # shared_mem_init{,.cc,.h}. |
| 63 | name = "shared_mem_types", |
| 64 | hdrs = [ |
| 65 | "shared_mem_types.h", |
| 66 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 67 | target_compatible_with = ["@platforms//os:linux"], |
Philipp Schrader | 9b1790e | 2018-03-10 20:21:30 -0800 | [diff] [blame] | 68 | deps = [ |
| 69 | ":aos_sync", |
| 70 | ], |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 71 | ) |
| 72 | |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 73 | cc_test( |
Philipp Schrader | 9b1790e | 2018-03-10 20:21:30 -0800 | [diff] [blame] | 74 | name = "ipc_stress_test", |
| 75 | srcs = [ |
| 76 | "ipc_stress_test.cc", |
| 77 | ], |
| 78 | tags = [ |
| 79 | "manual", |
| 80 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 81 | target_compatible_with = ["@platforms//os:linux"], |
Philipp Schrader | 9b1790e | 2018-03-10 20:21:30 -0800 | [diff] [blame] | 82 | deps = [ |
| 83 | ":core_lib", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 84 | "//aos:die", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 85 | "//aos/libc:aos_strsignal", |
| 86 | "//aos/libc:dirname", |
| 87 | "//aos/logging", |
Brian Silverman | 16a923c | 2018-10-31 19:40:51 -0700 | [diff] [blame] | 88 | "//aos/mutex", |
Philipp Schrader | 9b1790e | 2018-03-10 20:21:30 -0800 | [diff] [blame] | 89 | "//aos/testing:googletest", |
| 90 | "//aos/testing:test_shm", |
Brian Silverman | 16a923c | 2018-10-31 19:40:51 -0700 | [diff] [blame] | 91 | "//aos/time", |
Philipp Schrader | 9b1790e | 2018-03-10 20:21:30 -0800 | [diff] [blame] | 92 | ], |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 93 | ) |
| 94 | |
Brian Silverman | e4d8b28 | 2015-12-24 13:44:48 -0800 | [diff] [blame] | 95 | cc_binary( |
Philipp Schrader | 9b1790e | 2018-03-10 20:21:30 -0800 | [diff] [blame] | 96 | name = "ipc_comparison", |
| 97 | srcs = [ |
| 98 | "ipc_comparison.cc", |
| 99 | ], |
Brian Silverman | 687896e | 2020-10-01 15:05:38 -0700 | [diff] [blame] | 100 | linkopts = ["-lrt"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 101 | target_compatible_with = ["@platforms//os:linux"], |
Philipp Schrader | 9b1790e | 2018-03-10 20:21:30 -0800 | [diff] [blame] | 102 | deps = [ |
Brian Silverman | 7b266d9 | 2021-02-17 21:24:02 -0800 | [diff] [blame] | 103 | ":event", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 104 | "//aos:condition", |
Brian Silverman | 16a923c | 2018-10-31 19:40:51 -0700 | [diff] [blame] | 105 | "//aos:init", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 106 | "//aos/logging", |
Brian Silverman | 16a923c | 2018-10-31 19:40:51 -0700 | [diff] [blame] | 107 | "//aos/mutex", |
| 108 | "@com_github_gflags_gflags//:gflags", |
Philipp Schrader | 9b1790e | 2018-03-10 20:21:30 -0800 | [diff] [blame] | 109 | ], |
Brian Silverman | e4d8b28 | 2015-12-24 13:44:48 -0800 | [diff] [blame] | 110 | ) |
Austin Schuh | 6c590f8 | 2019-09-11 19:23:12 -0700 | [diff] [blame] | 111 | |
| 112 | cc_library( |
| 113 | name = "signalfd", |
| 114 | srcs = [ |
| 115 | "signalfd.cc", |
| 116 | ], |
| 117 | hdrs = [ |
| 118 | "signalfd.h", |
| 119 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 120 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 121 | visibility = ["//visibility:public"], |
Austin Schuh | 6c590f8 | 2019-09-11 19:23:12 -0700 | [diff] [blame] | 122 | deps = [ |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 123 | "@com_github_google_glog//:glog", |
Austin Schuh | 6c590f8 | 2019-09-11 19:23:12 -0700 | [diff] [blame] | 124 | ], |
| 125 | ) |
Austin Schuh | 25356e2 | 2019-09-11 19:27:07 -0700 | [diff] [blame] | 126 | |
Brian Silverman | 407cc53 | 2019-11-03 11:40:56 -0800 | [diff] [blame] | 127 | cc_test( |
| 128 | name = "signalfd_test", |
| 129 | srcs = [ |
| 130 | "signalfd_test.cc", |
| 131 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 132 | target_compatible_with = ["@platforms//os:linux"], |
Brian Silverman | 407cc53 | 2019-11-03 11:40:56 -0800 | [diff] [blame] | 133 | deps = [ |
| 134 | ":signalfd", |
| 135 | "//aos/testing:googletest", |
| 136 | "//aos/testing:test_logging", |
| 137 | "@com_github_google_glog//:glog", |
| 138 | ], |
| 139 | ) |
| 140 | |
Austin Schuh | 25356e2 | 2019-09-11 19:27:07 -0700 | [diff] [blame] | 141 | cc_library( |
Austin Schuh | 83cbb1e | 2023-06-23 12:59:02 -0700 | [diff] [blame] | 142 | name = "index32", |
| 143 | srcs = ["index.cc"], |
| 144 | hdrs = ["index.h"], |
| 145 | defines = [ |
| 146 | "AOS_QUEUE_ATOMIC_SIZE=32", |
| 147 | ], |
| 148 | target_compatible_with = ["@platforms//os:linux"], |
| 149 | visibility = ["//visibility:public"], |
| 150 | deps = [ |
| 151 | ":shm_observers", |
| 152 | "@com_github_google_glog//:glog", |
| 153 | ], |
| 154 | ) |
| 155 | |
| 156 | cc_test( |
| 157 | name = "index32_test", |
| 158 | srcs = ["index_test.cc"], |
| 159 | target_compatible_with = ["@platforms//os:linux"], |
| 160 | deps = [ |
| 161 | ":index32", |
| 162 | "//aos/testing:googletest", |
| 163 | "@com_github_google_glog//:glog", |
| 164 | ], |
| 165 | ) |
| 166 | |
| 167 | cc_library( |
Austin Schuh | 25356e2 | 2019-09-11 19:27:07 -0700 | [diff] [blame] | 168 | name = "index", |
Austin Schuh | 20b2b08 | 2019-09-11 20:42:56 -0700 | [diff] [blame] | 169 | srcs = ["index.cc"], |
Austin Schuh | 25356e2 | 2019-09-11 19:27:07 -0700 | [diff] [blame] | 170 | hdrs = ["index.h"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 171 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 172 | visibility = ["//visibility:public"], |
Brian Silverman | 177567e | 2020-08-12 19:51:33 -0700 | [diff] [blame] | 173 | deps = [ |
Brian Silverman | 1ed5df5 | 2021-09-13 20:14:06 -0700 | [diff] [blame] | 174 | ":shm_observers", |
Brian Silverman | 177567e | 2020-08-12 19:51:33 -0700 | [diff] [blame] | 175 | "@com_github_google_glog//:glog", |
| 176 | ], |
Austin Schuh | 25356e2 | 2019-09-11 19:27:07 -0700 | [diff] [blame] | 177 | ) |
| 178 | |
| 179 | cc_test( |
| 180 | name = "index_test", |
| 181 | srcs = ["index_test.cc"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 182 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 25356e2 | 2019-09-11 19:27:07 -0700 | [diff] [blame] | 183 | deps = [ |
| 184 | ":index", |
| 185 | "//aos/testing:googletest", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 186 | "@com_github_google_glog//:glog", |
Austin Schuh | 25356e2 | 2019-09-11 19:27:07 -0700 | [diff] [blame] | 187 | ], |
| 188 | ) |
Austin Schuh | 20b2b08 | 2019-09-11 20:42:56 -0700 | [diff] [blame] | 189 | |
| 190 | cc_library( |
| 191 | name = "lockless_queue", |
| 192 | srcs = [ |
| 193 | "lockless_queue.cc", |
| 194 | "lockless_queue_memory.h", |
Austin Schuh | 4d275fc | 2022-09-16 15:42:45 -0700 | [diff] [blame] | 195 | "memory_mapped_queue.cc", |
Philipp Schrader | ab2f843 | 2023-09-17 18:58:06 -0700 | [diff] [blame] | 196 | "robust_ownership_tracker.cc", |
Austin Schuh | 20b2b08 | 2019-09-11 20:42:56 -0700 | [diff] [blame] | 197 | ], |
Austin Schuh | 4d275fc | 2022-09-16 15:42:45 -0700 | [diff] [blame] | 198 | hdrs = [ |
| 199 | "lockless_queue.h", |
| 200 | "memory_mapped_queue.h", |
Philipp Schrader | ab2f843 | 2023-09-17 18:58:06 -0700 | [diff] [blame] | 201 | "robust_ownership_tracker.h", |
Austin Schuh | 4d275fc | 2022-09-16 15:42:45 -0700 | [diff] [blame] | 202 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 203 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 204 | visibility = ["//visibility:public"], |
Austin Schuh | 20b2b08 | 2019-09-11 20:42:56 -0700 | [diff] [blame] | 205 | deps = [ |
| 206 | ":aos_sync", |
Brian Silverman | a1652f3 | 2020-01-29 20:41:44 -0800 | [diff] [blame] | 207 | ":data_alignment", |
Austin Schuh | 20b2b08 | 2019-09-11 20:42:56 -0700 | [diff] [blame] | 208 | ":index", |
Austin Schuh | 4d275fc | 2022-09-16 15:42:45 -0700 | [diff] [blame] | 209 | "//aos:configuration", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 210 | "//aos:realtime", |
Austin Schuh | 8902fa5 | 2021-03-14 22:39:24 -0700 | [diff] [blame] | 211 | "//aos:uuid", |
Austin Schuh | 82ea738 | 2023-07-14 15:17:34 -0700 | [diff] [blame] | 212 | "//aos/events:context", |
Austin Schuh | 20b2b08 | 2019-09-11 20:42:56 -0700 | [diff] [blame] | 213 | "//aos/time", |
| 214 | "//aos/util:compiler_memory_barrier", |
Philipp Schrader | 81fa3fb | 2023-09-17 18:58:35 -0700 | [diff] [blame] | 215 | "//aos/util:top", |
Austin Schuh | f257f3c | 2019-10-27 21:00:43 -0700 | [diff] [blame] | 216 | "@com_github_google_glog//:glog", |
Austin Schuh | be41674 | 2020-10-03 17:24:26 -0700 | [diff] [blame] | 217 | "@com_google_absl//absl/strings", |
Brian Silverman | 0eaa1da | 2020-08-12 20:03:52 -0700 | [diff] [blame] | 218 | "@com_google_absl//absl/types:span", |
Austin Schuh | 20b2b08 | 2019-09-11 20:42:56 -0700 | [diff] [blame] | 219 | ], |
| 220 | ) |
| 221 | |
| 222 | cc_library( |
| 223 | name = "queue_racer", |
| 224 | testonly = True, |
| 225 | srcs = [ |
| 226 | "queue_racer.cc", |
| 227 | ], |
| 228 | hdrs = [ |
| 229 | "queue_racer.h", |
| 230 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 231 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 20b2b08 | 2019-09-11 20:42:56 -0700 | [diff] [blame] | 232 | deps = [ |
Brian Silverman | 7b266d9 | 2021-02-17 21:24:02 -0800 | [diff] [blame] | 233 | ":event", |
Austin Schuh | 20b2b08 | 2019-09-11 20:42:56 -0700 | [diff] [blame] | 234 | ":lockless_queue", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 235 | "//aos/testing:googletest", |
Austin Schuh | 20b2b08 | 2019-09-11 20:42:56 -0700 | [diff] [blame] | 236 | ], |
| 237 | ) |
| 238 | |
Austin Schuh | faec51a | 2023-09-08 17:43:32 -0700 | [diff] [blame] | 239 | cc_library( |
| 240 | name = "lockless_queue_stepping", |
| 241 | testonly = True, |
| 242 | srcs = [ |
| 243 | "lockless_queue_stepping.cc", |
| 244 | ], |
| 245 | hdrs = ["lockless_queue_stepping.h"], |
| 246 | deps = [ |
| 247 | ":lockless_queue", |
| 248 | ":shm_observers", |
| 249 | "//aos/libc:aos_strsignal", |
| 250 | "//aos/testing:prevent_exit", |
| 251 | "@com_google_googletest//:gtest", |
| 252 | ], |
| 253 | ) |
| 254 | |
Austin Schuh | 20b2b08 | 2019-09-11 20:42:56 -0700 | [diff] [blame] | 255 | cc_test( |
Philipp Schrader | 23eabd6 | 2023-09-19 14:59:49 -0700 | [diff] [blame^] | 256 | name = "robust_ownership_tracker_test", |
| 257 | srcs = ["robust_ownership_tracker_test.cc"], |
| 258 | target_compatible_with = ["@platforms//os:linux"], |
| 259 | deps = [ |
| 260 | ":lockless_queue", |
| 261 | "//aos/testing:googletest", |
| 262 | ], |
| 263 | ) |
| 264 | |
| 265 | cc_test( |
Austin Schuh | 20b2b08 | 2019-09-11 20:42:56 -0700 | [diff] [blame] | 266 | name = "lockless_queue_test", |
| 267 | timeout = "eternal", |
| 268 | srcs = ["lockless_queue_test.cc"], |
Austin Schuh | be975a6 | 2023-07-08 17:13:18 -0700 | [diff] [blame] | 269 | shard_count = 10, |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 270 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 20b2b08 | 2019-09-11 20:42:56 -0700 | [diff] [blame] | 271 | deps = [ |
Brian Silverman | 7b266d9 | 2021-02-17 21:24:02 -0800 | [diff] [blame] | 272 | ":event", |
Austin Schuh | 20b2b08 | 2019-09-11 20:42:56 -0700 | [diff] [blame] | 273 | ":lockless_queue", |
Austin Schuh | faec51a | 2023-09-08 17:43:32 -0700 | [diff] [blame] | 274 | ":lockless_queue_stepping", |
Austin Schuh | 20b2b08 | 2019-09-11 20:42:56 -0700 | [diff] [blame] | 275 | ":queue_racer", |
| 276 | ":signalfd", |
Austin Schuh | 20b2b08 | 2019-09-11 20:42:56 -0700 | [diff] [blame] | 277 | "//aos/events:epoll", |
Austin Schuh | 20b2b08 | 2019-09-11 20:42:56 -0700 | [diff] [blame] | 278 | "//aos/testing:googletest", |
Eric Schmiedeberg | ef44b8a | 2022-02-28 17:30:38 -0700 | [diff] [blame] | 279 | "//aos/util:phased_loop", |
Austin Schuh | 20b2b08 | 2019-09-11 20:42:56 -0700 | [diff] [blame] | 280 | ], |
| 281 | ) |
| 282 | |
| 283 | cc_test( |
| 284 | name = "lockless_queue_death_test", |
| 285 | srcs = ["lockless_queue_death_test.cc"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 286 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 20b2b08 | 2019-09-11 20:42:56 -0700 | [diff] [blame] | 287 | deps = [ |
Brian Silverman | 7b266d9 | 2021-02-17 21:24:02 -0800 | [diff] [blame] | 288 | ":event", |
Austin Schuh | 20b2b08 | 2019-09-11 20:42:56 -0700 | [diff] [blame] | 289 | ":lockless_queue", |
Austin Schuh | faec51a | 2023-09-08 17:43:32 -0700 | [diff] [blame] | 290 | ":lockless_queue_stepping", |
Austin Schuh | 20b2b08 | 2019-09-11 20:42:56 -0700 | [diff] [blame] | 291 | ":queue_racer", |
Brian Silverman | 1ed5df5 | 2021-09-13 20:14:06 -0700 | [diff] [blame] | 292 | ":shm_observers", |
Austin Schuh | 20b2b08 | 2019-09-11 20:42:56 -0700 | [diff] [blame] | 293 | ":signalfd", |
Austin Schuh | 20b2b08 | 2019-09-11 20:42:56 -0700 | [diff] [blame] | 294 | "//aos/events:epoll", |
| 295 | "//aos/libc:aos_strsignal", |
| 296 | "//aos/testing:googletest", |
| 297 | "//aos/testing:prevent_exit", |
| 298 | "//aos/testing:test_logging", |
| 299 | ], |
| 300 | ) |
Brian Silverman | a1652f3 | 2020-01-29 20:41:44 -0800 | [diff] [blame] | 301 | |
| 302 | cc_library( |
| 303 | name = "data_alignment", |
| 304 | hdrs = [ |
| 305 | "data_alignment.h", |
| 306 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 307 | target_compatible_with = ["@platforms//os:linux"], |
Brian Silverman | a1652f3 | 2020-01-29 20:41:44 -0800 | [diff] [blame] | 308 | visibility = ["//visibility:public"], |
| 309 | deps = [ |
| 310 | "@com_github_google_glog//:glog", |
| 311 | ], |
| 312 | ) |
Austin Schuh | 5af45eb | 2019-09-16 20:54:18 -0700 | [diff] [blame] | 313 | |
| 314 | cc_library( |
| 315 | name = "latency_lib", |
| 316 | srcs = ["latency_lib.cc"], |
| 317 | hdrs = ["latency_lib.h"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 318 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 5af45eb | 2019-09-16 20:54:18 -0700 | [diff] [blame] | 319 | deps = [ |
| 320 | "//aos:realtime", |
| 321 | "//aos/logging", |
| 322 | "//aos/time", |
| 323 | "@com_github_google_glog//:glog", |
| 324 | ], |
| 325 | ) |
| 326 | |
| 327 | cc_binary( |
| 328 | name = "signal_stress", |
| 329 | srcs = [ |
| 330 | "signal_stress.cc", |
| 331 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 332 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 5af45eb | 2019-09-16 20:54:18 -0700 | [diff] [blame] | 333 | deps = [ |
| 334 | ":latency_lib", |
| 335 | "//aos:init", |
| 336 | "//aos/events:epoll", |
| 337 | "@com_github_gflags_gflags//:gflags", |
| 338 | ], |
| 339 | ) |
| 340 | |
| 341 | cc_binary( |
| 342 | name = "futex_latency", |
| 343 | srcs = [ |
| 344 | "futex_latency.cc", |
| 345 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 346 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 5af45eb | 2019-09-16 20:54:18 -0700 | [diff] [blame] | 347 | deps = [ |
| 348 | ":latency_lib", |
| 349 | "//aos:condition", |
| 350 | "//aos:init", |
| 351 | "//aos/mutex", |
| 352 | "@com_github_gflags_gflags//:gflags", |
| 353 | ], |
| 354 | ) |
| 355 | |
| 356 | cc_binary( |
| 357 | name = "named_pipe_latency", |
| 358 | srcs = [ |
| 359 | "named_pipe_latency.cc", |
| 360 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 361 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 5af45eb | 2019-09-16 20:54:18 -0700 | [diff] [blame] | 362 | deps = [ |
| 363 | ":latency_lib", |
| 364 | "//aos:init", |
| 365 | "//aos/events:epoll", |
| 366 | "@com_github_gflags_gflags//:gflags", |
| 367 | ], |
| 368 | ) |
| 369 | |
| 370 | cc_binary( |
| 371 | name = "eventfd_latency", |
| 372 | srcs = [ |
| 373 | "eventfd_latency.cc", |
| 374 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 375 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 5af45eb | 2019-09-16 20:54:18 -0700 | [diff] [blame] | 376 | deps = [ |
| 377 | ":latency_lib", |
| 378 | "//aos:init", |
| 379 | "//aos/events:epoll", |
| 380 | "@com_github_gflags_gflags//:gflags", |
| 381 | ], |
| 382 | ) |
Brian Silverman | 001f24d | 2020-08-12 19:33:20 -0700 | [diff] [blame] | 383 | |
| 384 | cc_binary( |
| 385 | name = "print_lockless_queue_memory", |
Brian Silverman | 001f24d | 2020-08-12 19:33:20 -0700 | [diff] [blame] | 386 | srcs = [ |
| 387 | "print_lockless_queue_memory.cc", |
| 388 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 389 | target_compatible_with = ["@platforms//os:linux"], |
Brian Silverman | 4d6207a | 2020-09-18 15:26:52 -0700 | [diff] [blame] | 390 | visibility = ["//visibility:public"], |
Brian Silverman | 001f24d | 2020-08-12 19:33:20 -0700 | [diff] [blame] | 391 | deps = [ |
| 392 | ":lockless_queue", |
| 393 | ], |
| 394 | ) |
Brian Silverman | 7b266d9 | 2021-02-17 21:24:02 -0800 | [diff] [blame] | 395 | |
| 396 | cc_library( |
| 397 | name = "event", |
| 398 | srcs = [ |
| 399 | "event.cc", |
| 400 | ], |
| 401 | hdrs = [ |
| 402 | "event.h", |
| 403 | ], |
| 404 | target_compatible_with = ["@platforms//os:linux"], |
| 405 | visibility = ["//visibility:public"], |
| 406 | deps = [ |
| 407 | "//aos/ipc_lib:aos_sync", |
| 408 | "//aos/time", |
| 409 | "//aos/type_traits", |
| 410 | "@com_github_google_glog//:glog", |
| 411 | ], |
| 412 | ) |
| 413 | |
| 414 | cc_test( |
| 415 | name = "event_test", |
| 416 | srcs = [ |
| 417 | "event_test.cc", |
| 418 | ], |
| 419 | target_compatible_with = ["@platforms//os:linux"], |
| 420 | deps = [ |
| 421 | ":event", |
| 422 | "//aos/testing:googletest", |
| 423 | "//aos/testing:test_logging", |
| 424 | "//aos/time", |
| 425 | ], |
| 426 | ) |
Brian Silverman | 1ed5df5 | 2021-09-13 20:14:06 -0700 | [diff] [blame] | 427 | |
| 428 | cc_library( |
| 429 | name = "shm_observers", |
| 430 | srcs = [ |
| 431 | "shm_observers.cc", |
| 432 | ], |
| 433 | hdrs = [ |
| 434 | "shm_observers.h", |
| 435 | ], |
| 436 | ) |
Adam Snaider | c8b7e75 | 2023-09-14 14:27:53 -0700 | [diff] [blame] | 437 | |
| 438 | cc_library( |
| 439 | name = "shm_base", |
| 440 | srcs = ["shm_base.cc"], |
| 441 | hdrs = ["shm_base.h"], |
| 442 | target_compatible_with = ["@platforms//os:linux"], |
| 443 | visibility = ["//visibility:public"], |
| 444 | deps = [ |
| 445 | "@com_github_gflags_gflags//:gflags", |
| 446 | ], |
| 447 | ) |