blob: 47b9e8e43cb92d5827715df61a3699414301942f [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',
128 srcs = [
129 'condition.cc',
130 ],
131 deps = [
132 ':mutex',
Austin Schuh044e18b2015-10-21 20:17:09 -0700133 '//aos/common:condition',
Brian Silvermanf480a612015-09-13 02:22:01 -0400134 ':aos_sync',
135 '//aos/common/logging:logging_interface',
136 ],
137)
138
139cc_library(
140 name = 'mutex',
141 srcs = [
142 'mutex.cc',
143 ],
144 deps = [
145 ':aos_sync',
146 '//aos/common/logging:logging_interface',
Austin Schuh044e18b2015-10-21 20:17:09 -0700147 '//aos/common:type_traits',
148 '//aos/common:mutex',
Brian Silvermanf480a612015-09-13 02:22:01 -0400149 ],
150)
151
152cc_library(
153 name = 'event',
154 srcs = [
155 'event.cc',
156 ],
157 deps = [
158 ':aos_sync',
159 '//aos/common/logging:logging_interface',
Austin Schuh044e18b2015-10-21 20:17:09 -0700160 '//aos/common:event',
Brian Silvermanf480a612015-09-13 02:22:01 -0400161 ],
162)