blob: 7c2db52ccd7278f102bbcc709de1142099266615 [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",
46 ],
Parker Schuhe4a70d62017-12-27 20:10:20 -080047)
48
49cc_test(
Austin Schuha1654ed2019-01-27 17:24:54 -080050 name = "shm-event-loop_test",
51 srcs = ["shm-event-loop_test.cc"],
Austin Schuh6b6dfa52019-06-12 20:16:20 -070052 shard_count = 5,
Austin Schuha1654ed2019-01-27 17:24:54 -080053 deps = [
54 ":event-loop_param_test",
55 ":shm-event-loop",
56 "//aos/testing:test_shm",
57 ],
Parker Schuhe4a70d62017-12-27 20:10:20 -080058)
59
60cc_library(
Austin Schuha1654ed2019-01-27 17:24:54 -080061 name = "event-loop_param_test",
62 testonly = True,
63 srcs = ["event-loop_param_test.cc"],
64 hdrs = ["event-loop_param_test.h"],
65 deps = [
66 "event-loop",
67 "//aos/testing:googletest",
68 ],
Parker Schuhe4a70d62017-12-27 20:10:20 -080069)
Neil Balchc8f41ed2018-01-20 22:06:53 -080070
71cc_test(
Austin Schuh7267c532019-05-19 19:55:53 -070072 name = "simulated_event_loop_test",
Austin Schuha1654ed2019-01-27 17:24:54 -080073 srcs = ["simulated-event-loop_test.cc"],
74 deps = [
75 ":event-loop_param_test",
Austin Schuh7267c532019-05-19 19:55:53 -070076 ":simulated_event_loop",
Austin Schuha1654ed2019-01-27 17:24:54 -080077 "//aos/testing:googletest",
78 ],
Neil Balchc8f41ed2018-01-20 22:06:53 -080079)
80
81cc_library(
Austin Schuh7267c532019-05-19 19:55:53 -070082 name = "simulated_event_loop",
Austin Schuh82c0c822019-05-27 19:55:20 -070083 testonly = True,
Austin Schuha1654ed2019-01-27 17:24:54 -080084 srcs = ["simulated-event-loop.cc"],
85 hdrs = ["simulated-event-loop.h"],
Austin Schuh7267c532019-05-19 19:55:53 -070086 visibility = ["//visibility:public"],
Austin Schuha1654ed2019-01-27 17:24:54 -080087 deps = [
88 ":event-loop",
89 "//aos:queues",
James Kuszmaulc79768b2019-02-18 15:08:44 -080090 "//aos/logging",
Austin Schuh82c0c822019-05-27 19:55:20 -070091 "//aos/testing:test_logging",
Austin Schuha1654ed2019-01-27 17:24:54 -080092 ],
Neil Balchc8f41ed2018-01-20 22:06:53 -080093)