blob: b69fc6671d32e12c652e4f02a67aae69dab36b1d [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"],
Austin Schuh20b2b082019-09-11 20:42:56 -07005 visibility = ["//visibility:public"],
Austin Schuh6b6dfa52019-06-12 20:16:20 -07006 deps = [
Austin Schuh6b6dfa52019-06-12 20:16:20 -07007 "//aos/time",
Austin Schuhf257f3c2019-10-27 21:00:43 -07008 "@com_github_google_glog//:glog",
Austin Schuh6b6dfa52019-06-12 20:16:20 -07009 ],
10)
11
12cc_library(
Austin Schuha1654ed2019-01-27 17:24:54 -080013 name = "raw-event-loop",
14 hdrs = ["raw-event-loop.h"],
15 deps = [
16 "//aos:queues",
17 "//aos/time",
18 ],
Parker Schuhe4a70d62017-12-27 20:10:20 -080019)
20
21cc_library(
Austin Schuha1654ed2019-01-27 17:24:54 -080022 name = "event-loop",
23 srcs = ["event-loop-tmpl.h"],
24 hdrs = [
25 "event-loop.h",
26 "raw-event-loop.h",
27 ],
28 visibility = ["//visibility:public"],
29 deps = [
30 ":raw-event-loop",
31 "//aos:queues",
32 "//aos/time",
33 ],
Parker Schuhe4a70d62017-12-27 20:10:20 -080034)
35
36cc_library(
Austin Schuha1654ed2019-01-27 17:24:54 -080037 name = "shm-event-loop",
38 srcs = ["shm-event-loop.cc"],
39 hdrs = ["shm-event-loop.h"],
40 visibility = ["//visibility:public"],
41 deps = [
Austin Schuh6b6dfa52019-06-12 20:16:20 -070042 ":epoll",
Austin Schuha1654ed2019-01-27 17:24:54 -080043 ":event-loop",
Austin Schuh3115a202019-05-27 21:02:14 -070044 "//aos:init",
Austin Schuha1654ed2019-01-27 17:24:54 -080045 "//aos:queues",
46 "//aos/logging",
Austin Schuh52d325c2019-06-23 18:59:06 -070047 "//aos/util:phased_loop",
Austin Schuha1654ed2019-01-27 17:24:54 -080048 ],
Parker Schuhe4a70d62017-12-27 20:10:20 -080049)
50
51cc_test(
Austin Schuha1654ed2019-01-27 17:24:54 -080052 name = "shm-event-loop_test",
53 srcs = ["shm-event-loop_test.cc"],
Austin Schuh6b6dfa52019-06-12 20:16:20 -070054 shard_count = 5,
Austin Schuha1654ed2019-01-27 17:24:54 -080055 deps = [
56 ":event-loop_param_test",
57 ":shm-event-loop",
58 "//aos/testing:test_shm",
59 ],
Parker Schuhe4a70d62017-12-27 20:10:20 -080060)
61
62cc_library(
Austin Schuha1654ed2019-01-27 17:24:54 -080063 name = "event-loop_param_test",
64 testonly = True,
65 srcs = ["event-loop_param_test.cc"],
66 hdrs = ["event-loop_param_test.h"],
67 deps = [
Austin Schuh9fe68f72019-08-10 19:32:03 -070068 ":event-loop",
69 "//aos/logging:queue_logging",
Austin Schuha1654ed2019-01-27 17:24:54 -080070 "//aos/testing:googletest",
71 ],
Parker Schuhe4a70d62017-12-27 20:10:20 -080072)
Neil Balchc8f41ed2018-01-20 22:06:53 -080073
74cc_test(
Austin Schuh7267c532019-05-19 19:55:53 -070075 name = "simulated_event_loop_test",
Austin Schuha1654ed2019-01-27 17:24:54 -080076 srcs = ["simulated-event-loop_test.cc"],
77 deps = [
78 ":event-loop_param_test",
Austin Schuh7267c532019-05-19 19:55:53 -070079 ":simulated_event_loop",
Austin Schuha1654ed2019-01-27 17:24:54 -080080 "//aos/testing:googletest",
81 ],
Neil Balchc8f41ed2018-01-20 22:06:53 -080082)
83
84cc_library(
Austin Schuh7267c532019-05-19 19:55:53 -070085 name = "simulated_event_loop",
Austin Schuh82c0c822019-05-27 19:55:20 -070086 testonly = True,
Austin Schuha1654ed2019-01-27 17:24:54 -080087 srcs = ["simulated-event-loop.cc"],
88 hdrs = ["simulated-event-loop.h"],
Austin Schuh7267c532019-05-19 19:55:53 -070089 visibility = ["//visibility:public"],
Austin Schuha1654ed2019-01-27 17:24:54 -080090 deps = [
91 ":event-loop",
92 "//aos:queues",
James Kuszmaulc79768b2019-02-18 15:08:44 -080093 "//aos/logging",
Austin Schuh82c0c822019-05-27 19:55:20 -070094 "//aos/testing:test_logging",
Austin Schuh52d325c2019-06-23 18:59:06 -070095 "//aos/util:phased_loop",
Austin Schuha1654ed2019-01-27 17:24:54 -080096 ],
Neil Balchc8f41ed2018-01-20 22:06:53 -080097)