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