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