blob: 576774eeb9b853659f78213830eabd94c67e358c [file] [log] [blame]
Brian Silverman100534c2015-09-07 15:51:23 -04001package(default_visibility = ['//visibility:public'])
2
3cc_library(
4 name = 'aos_sync',
5 srcs = [
6 'aos_sync.cc',
7 ],
8 hdrs = [
9 'aos_sync.h',
10 ],
11 deps = [
12 '//aos/common/logging:logging_interface',
13 '//aos/common:once',
Austin Schuh044e18b2015-10-21 20:17:09 -070014 '//aos/common:macros',
Brian Silverman100534c2015-09-07 15:51:23 -040015 ],
16)
17
18cc_library(
19 name = 'core_lib',
20 srcs = [
21 'core_lib.c',
22 ],
23 hdrs = [
24 'core_lib.h',
25 ],
26 deps = [
27 ':aos_sync',
Austin Schuh044e18b2015-10-21 20:17:09 -070028 ':shared_mem_types',
Brian Silverman100534c2015-09-07 15:51:23 -040029 ],
30)
31
32cc_library(
33 name = 'shared_mem',
34 srcs = [
35 'shared_mem.c',
36 ],
37 hdrs = [
38 'shared_mem.h',
39 ],
40 deps = [
41 ':aos_sync',
Austin Schuh044e18b2015-10-21 20:17:09 -070042 ':core_lib',
43 ':shared_mem_types',
Brian Silverman100534c2015-09-07 15:51:23 -040044 '//aos/common/logging:logging_interface',
Austin Schuh044e18b2015-10-21 20:17:09 -070045 '//debian:librt',
46 ],
47)
48
49cc_library(
50 # TODO(Brian): This should be shared_mem{,.h}, and the other one should be
51 # shared_mem_init{,.cc,.h}.
52 name = 'shared_mem_types',
53 hdrs = [
54 'shared_mem_types.h',
55 ],
56 deps = [
57 ':aos_sync',
Brian Silverman100534c2015-09-07 15:51:23 -040058 ],
59)
60
61cc_library(
62 name = 'queue',
63 srcs = [
64 'queue.cc',
65 ],
66 hdrs = [
67 'queue.h',
68 ],
69 deps = [
70 '//aos/linux_code/ipc_lib:condition',
71 '//aos/linux_code/ipc_lib:mutex',
72 ':core_lib',
Austin Schuh044e18b2015-10-21 20:17:09 -070073 ':shared_mem',
Brian Silverman100534c2015-09-07 15:51:23 -040074 '//aos/common/logging:logging_interface',
Austin Schuh55139fe2015-10-14 23:55:24 -070075 '//debian:librt',
Austin Schuh044e18b2015-10-21 20:17:09 -070076 '//aos/common/util:options',
Brian Silverman100534c2015-09-07 15:51:23 -040077 ],
78)
79
80cc_test(
81 name = 'raw_queue_test',
82 srcs = [
83 'raw_queue_test.cc',
84 ],
85 deps = [
Brian Silverman258b9172015-09-19 14:32:57 -040086 '//aos/testing:googletest',
Brian Silverman100534c2015-09-07 15:51:23 -040087 ':queue',
88 '//aos/common/logging',
89 ':core_lib',
90 '//aos/common:queue_testutils',
91 '//aos/common:time',
92 '//aos/common:die',
93 '//aos/common/util:thread',
94 '//aos/common/util:death_test_log_implementation',
95 ],
96)
97
98cc_test(
99 name = 'ipc_stress_test',
100 srcs = [
101 'ipc_stress_test.cc',
102 ],
103 tags = [
104 'manual',
105 ],
106 deps = [
Brian Silverman258b9172015-09-19 14:32:57 -0400107 '//aos/testing:googletest',
Brian Silverman100534c2015-09-07 15:51:23 -0400108 '//aos/common:time',
109 '//aos/common:queue_testutils',
110 '//aos/linux_code/ipc_lib:mutex',
111 ':core_lib',
112 '//aos/common:die',
113 '//aos/common/libc:dirname',
114 '//aos/common/libc:aos_strsignal',
115 '//aos/common/logging',
116 ],
117)
118
119cc_library(
120 name = 'scoped_message_ptr',
121 deps = [
122 ':queue',
123 ],
124)
Brian Silvermanf480a612015-09-13 02:22:01 -0400125
126cc_library(
127 name = 'condition',
Brian Silverman086cb8c2015-10-26 11:39:40 -0400128 visibility = ['//aos/common:__pkg__'],
Brian Silvermanf480a612015-09-13 02:22:01 -0400129 srcs = [
130 'condition.cc',
131 ],
132 deps = [
133 ':mutex',
Brian Silverman086cb8c2015-10-26 11:39:40 -0400134 '//aos/common:real_condition',
Brian Silvermanf480a612015-09-13 02:22:01 -0400135 ':aos_sync',
136 '//aos/common/logging:logging_interface',
137 ],
138)
139
140cc_library(
141 name = 'mutex',
142 srcs = [
143 'mutex.cc',
144 ],
145 deps = [
146 ':aos_sync',
147 '//aos/common/logging:logging_interface',
Austin Schuh044e18b2015-10-21 20:17:09 -0700148 '//aos/common:type_traits',
149 '//aos/common:mutex',
Brian Silvermanf480a612015-09-13 02:22:01 -0400150 ],
151)
152
153cc_library(
154 name = 'event',
Brian Silverman086cb8c2015-10-26 11:39:40 -0400155 visibility = ['//aos/common:__pkg__'],
Brian Silvermanf480a612015-09-13 02:22:01 -0400156 srcs = [
157 'event.cc',
158 ],
159 deps = [
160 ':aos_sync',
161 '//aos/common/logging:logging_interface',
Brian Silverman086cb8c2015-10-26 11:39:40 -0400162 '//aos/common:real_event',
Brian Silvermanf480a612015-09-13 02:22:01 -0400163 ],
164)