blob: 330ad400ebc4277ae3de6b80d336b96e2be85a90 [file] [log] [blame]
Parker Schuhe4a70d62017-12-27 20:10:20 -08001cc_library(
Austin Schuh6b6dfa52019-06-12 20:16:20 -07002 name = "epoll",
3 srcs = ["epoll.cc"],
4 hdrs = ["epoll.h"],
5 deps = [
6 "//aos/logging",
7 "//aos/time",
8 ],
9)
10
11cc_library(
Austin Schuha1654ed2019-01-27 17:24:54 -080012 name = "raw-event-loop",
13 hdrs = ["raw-event-loop.h"],
14 deps = [
15 "//aos:queues",
16 "//aos/time",
17 ],
Parker Schuhe4a70d62017-12-27 20:10:20 -080018)
19
20cc_library(
Austin Schuha1654ed2019-01-27 17:24:54 -080021 name = "event-loop",
22 srcs = ["event-loop-tmpl.h"],
23 hdrs = [
24 "event-loop.h",
25 "raw-event-loop.h",
26 ],
27 visibility = ["//visibility:public"],
28 deps = [
29 ":raw-event-loop",
30 "//aos:queues",
31 "//aos/time",
32 ],
Parker Schuhe4a70d62017-12-27 20:10:20 -080033)
34
35cc_library(
Austin Schuha1654ed2019-01-27 17:24:54 -080036 name = "shm-event-loop",
37 srcs = ["shm-event-loop.cc"],
38 hdrs = ["shm-event-loop.h"],
39 visibility = ["//visibility:public"],
40 deps = [
Austin Schuh6b6dfa52019-06-12 20:16:20 -070041 ":epoll",
Austin Schuha1654ed2019-01-27 17:24:54 -080042 ":event-loop",
Austin Schuh3115a202019-05-27 21:02:14 -070043 "//aos:init",
Austin Schuha1654ed2019-01-27 17:24:54 -080044 "//aos:queues",
45 "//aos/logging",
Austin Schuh52d325c2019-06-23 18:59:06 -070046 "//aos/util:phased_loop",
Austin Schuha1654ed2019-01-27 17:24:54 -080047 ],
Parker Schuhe4a70d62017-12-27 20:10:20 -080048)
49
50cc_test(
Austin Schuha1654ed2019-01-27 17:24:54 -080051 name = "shm-event-loop_test",
52 srcs = ["shm-event-loop_test.cc"],
Austin Schuh6b6dfa52019-06-12 20:16:20 -070053 shard_count = 5,
Austin Schuha1654ed2019-01-27 17:24:54 -080054 deps = [
55 ":event-loop_param_test",
56 ":shm-event-loop",
57 "//aos/testing:test_shm",
58 ],
Parker Schuhe4a70d62017-12-27 20:10:20 -080059)
60
61cc_library(
Austin Schuha1654ed2019-01-27 17:24:54 -080062 name = "event-loop_param_test",
63 testonly = True,
64 srcs = ["event-loop_param_test.cc"],
65 hdrs = ["event-loop_param_test.h"],
66 deps = [
Austin Schuh9fe68f72019-08-10 19:32:03 -070067 ":event-loop",
68 "//aos/logging:queue_logging",
Austin Schuha1654ed2019-01-27 17:24:54 -080069 "//aos/testing:googletest",
70 ],
Parker Schuhe4a70d62017-12-27 20:10:20 -080071)
Neil Balchc8f41ed2018-01-20 22:06:53 -080072
73cc_test(
Austin Schuh7267c532019-05-19 19:55:53 -070074 name = "simulated_event_loop_test",
Austin Schuha1654ed2019-01-27 17:24:54 -080075 srcs = ["simulated-event-loop_test.cc"],
76 deps = [
77 ":event-loop_param_test",
Austin Schuh7267c532019-05-19 19:55:53 -070078 ":simulated_event_loop",
Austin Schuha1654ed2019-01-27 17:24:54 -080079 "//aos/testing:googletest",
80 ],
Neil Balchc8f41ed2018-01-20 22:06:53 -080081)
82
83cc_library(
Austin Schuh7267c532019-05-19 19:55:53 -070084 name = "simulated_event_loop",
Austin Schuh82c0c822019-05-27 19:55:20 -070085 testonly = True,
Austin Schuha1654ed2019-01-27 17:24:54 -080086 srcs = ["simulated-event-loop.cc"],
87 hdrs = ["simulated-event-loop.h"],
Austin Schuh7267c532019-05-19 19:55:53 -070088 visibility = ["//visibility:public"],
Austin Schuha1654ed2019-01-27 17:24:54 -080089 deps = [
90 ":event-loop",
91 "//aos:queues",
James Kuszmaulc79768b2019-02-18 15:08:44 -080092 "//aos/logging",
Austin Schuh82c0c822019-05-27 19:55:20 -070093 "//aos/testing:test_logging",
Austin Schuh52d325c2019-06-23 18:59:06 -070094 "//aos/util:phased_loop",
Austin Schuha1654ed2019-01-27 17:24:54 -080095 ],
Neil Balchc8f41ed2018-01-20 22:06:53 -080096)