blob: 8f26882d3fe178c806c35d8a39f73a061453aa22 [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 = [
Brian Silvermancb5da1f2015-12-05 22:19:58 -050012 '//aos/common/logging',
Brian Silverman100534c2015-09-07 15:51:23 -040013 '//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 Silvermancb5da1f2015-12-05 22:19:58 -050044 '//aos/common/logging',
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 = [
Brian Silverman2200b2c2015-11-29 05:59:28 +000070 '//aos/common:condition',
71 '//aos/common:mutex',
Brian Silverman100534c2015-09-07 15:51:23 -040072 ':core_lib',
Austin Schuh044e18b2015-10-21 20:17:09 -070073 ':shared_mem',
Brian Silvermancb5da1f2015-12-05 22:19:58 -050074 '//aos/common/logging',
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',
Brian Silverman2200b2c2015-11-29 05:59:28 +0000110 '//aos/common:mutex',
Brian Silverman100534c2015-09-07 15:51:23 -0400111 ':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)