blob: b0b58ffb515cb34fcd475061001e7148148e2f51 [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 ],
Brian Silvermand1c19fb2016-07-07 00:10:57 -070011 linkopts = [
12 '-pthread',
13 ],
Brian Silverman100534c2015-09-07 15:51:23 -040014 deps = [
Brian Silvermancb5da1f2015-12-05 22:19:58 -050015 '//aos/common/logging',
Sabina Davis2ed5ea22017-09-26 22:27:42 -070016 '//aos:once',
Austin Schuh044e18b2015-10-21 20:17:09 -070017 '//aos/common:macros',
Brian Silverman71c55c52014-08-19 14:31:59 -040018 '//aos/common/util:compiler_memory_barrier',
Brian Silverman100534c2015-09-07 15:51:23 -040019 ],
20)
21
22cc_library(
23 name = 'core_lib',
24 srcs = [
25 'core_lib.c',
26 ],
27 hdrs = [
28 'core_lib.h',
29 ],
30 deps = [
31 ':aos_sync',
Austin Schuh044e18b2015-10-21 20:17:09 -070032 ':shared_mem_types',
Brian Silverman100534c2015-09-07 15:51:23 -040033 ],
34)
35
36cc_library(
37 name = 'shared_mem',
38 srcs = [
39 'shared_mem.c',
40 ],
41 hdrs = [
42 'shared_mem.h',
43 ],
44 deps = [
45 ':aos_sync',
Austin Schuh044e18b2015-10-21 20:17:09 -070046 ':core_lib',
47 ':shared_mem_types',
Brian Silvermancb5da1f2015-12-05 22:19:58 -050048 '//aos/common/logging',
Austin Schuh044e18b2015-10-21 20:17:09 -070049 '//debian:librt',
50 ],
51)
52
53cc_library(
54 # TODO(Brian): This should be shared_mem{,.h}, and the other one should be
55 # shared_mem_init{,.cc,.h}.
56 name = 'shared_mem_types',
57 hdrs = [
58 'shared_mem_types.h',
59 ],
60 deps = [
61 ':aos_sync',
Brian Silverman100534c2015-09-07 15:51:23 -040062 ],
63)
64
65cc_library(
66 name = 'queue',
67 srcs = [
68 'queue.cc',
69 ],
70 hdrs = [
71 'queue.h',
72 ],
73 deps = [
Brian Silverman2200b2c2015-11-29 05:59:28 +000074 '//aos/common:condition',
75 '//aos/common:mutex',
Brian Silverman100534c2015-09-07 15:51:23 -040076 ':core_lib',
Austin Schuh044e18b2015-10-21 20:17:09 -070077 ':shared_mem',
Brian Silvermancb5da1f2015-12-05 22:19:58 -050078 '//aos/common/logging',
Austin Schuh55139fe2015-10-14 23:55:24 -070079 '//debian:librt',
Austin Schuh044e18b2015-10-21 20:17:09 -070080 '//aos/common/util:options',
Brian Silverman100534c2015-09-07 15:51:23 -040081 ],
82)
83
84cc_test(
85 name = 'raw_queue_test',
86 srcs = [
87 'raw_queue_test.cc',
88 ],
89 deps = [
Brian Silverman258b9172015-09-19 14:32:57 -040090 '//aos/testing:googletest',
Brian Silvermanf5f8d8e2015-12-06 18:39:12 -050091 '//aos/testing:prevent_exit',
Brian Silverman100534c2015-09-07 15:51:23 -040092 ':queue',
93 '//aos/common/logging',
94 ':core_lib',
Brian Silvermanf5f8d8e2015-12-06 18:39:12 -050095 '//aos/testing:test_shm',
Brian Silverman100534c2015-09-07 15:51:23 -040096 '//aos/common:time',
97 '//aos/common:die',
98 '//aos/common/util:thread',
99 '//aos/common/util:death_test_log_implementation',
100 ],
101)
102
103cc_test(
104 name = 'ipc_stress_test',
105 srcs = [
106 'ipc_stress_test.cc',
107 ],
108 tags = [
109 'manual',
110 ],
111 deps = [
Brian Silverman258b9172015-09-19 14:32:57 -0400112 '//aos/testing:googletest',
Brian Silverman100534c2015-09-07 15:51:23 -0400113 '//aos/common:time',
Brian Silvermanf5f8d8e2015-12-06 18:39:12 -0500114 '//aos/testing:test_shm',
Brian Silverman2200b2c2015-11-29 05:59:28 +0000115 '//aos/common:mutex',
Brian Silverman100534c2015-09-07 15:51:23 -0400116 ':core_lib',
117 '//aos/common:die',
118 '//aos/common/libc:dirname',
119 '//aos/common/libc:aos_strsignal',
120 '//aos/common/logging',
121 ],
122)
123
124cc_library(
125 name = 'scoped_message_ptr',
126 deps = [
127 ':queue',
128 ],
129)
Brian Silvermane4d8b282015-12-24 13:44:48 -0800130
131cc_binary(
132 name = 'ipc_comparison',
133 srcs = [
134 'ipc_comparison.cc',
135 ],
136 deps = [
137 '//aos/common:mutex',
138 '//aos/common:event',
139 '//aos/common:condition',
140 '//third_party/gflags',
141 '//aos/common/logging',
142 '//aos/common/logging:implementations',
143 '//aos/linux_code:init',
144 ':queue',
145 ],
146)