blob: 444c2bb21d6f8148108df59928ff5150137e23cf [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 Silvermanf5f8d8e2015-12-06 18:39:12 -050087 '//aos/testing:prevent_exit',
Brian Silverman100534c2015-09-07 15:51:23 -040088 ':queue',
89 '//aos/common/logging',
90 ':core_lib',
Brian Silvermanf5f8d8e2015-12-06 18:39:12 -050091 '//aos/testing:test_shm',
Brian Silverman100534c2015-09-07 15:51:23 -040092 '//aos/common:time',
93 '//aos/common:die',
94 '//aos/common/util:thread',
95 '//aos/common/util:death_test_log_implementation',
96 ],
97)
98
99cc_test(
100 name = 'ipc_stress_test',
101 srcs = [
102 'ipc_stress_test.cc',
103 ],
104 tags = [
105 'manual',
106 ],
107 deps = [
Brian Silverman258b9172015-09-19 14:32:57 -0400108 '//aos/testing:googletest',
Brian Silverman100534c2015-09-07 15:51:23 -0400109 '//aos/common:time',
Brian Silvermanf5f8d8e2015-12-06 18:39:12 -0500110 '//aos/testing:test_shm',
Brian Silverman2200b2c2015-11-29 05:59:28 +0000111 '//aos/common:mutex',
Brian Silverman100534c2015-09-07 15:51:23 -0400112 ':core_lib',
113 '//aos/common:die',
114 '//aos/common/libc:dirname',
115 '//aos/common/libc:aos_strsignal',
116 '//aos/common/logging',
117 ],
118)
119
120cc_library(
121 name = 'scoped_message_ptr',
122 deps = [
123 ':queue',
124 ],
125)