blob: 51ac4bdbeaa50b93f42b75f896b59377f6e0d5e4 [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 Silverman71c55c52014-08-19 14:31:59 -040015 '//aos/common/util:compiler_memory_barrier',
Brian Silverman100534c2015-09-07 15:51:23 -040016 ],
17)
18
19cc_library(
20 name = 'core_lib',
21 srcs = [
22 'core_lib.c',
23 ],
24 hdrs = [
25 'core_lib.h',
26 ],
27 deps = [
28 ':aos_sync',
Austin Schuh044e18b2015-10-21 20:17:09 -070029 ':shared_mem_types',
Brian Silverman100534c2015-09-07 15:51:23 -040030 ],
31)
32
33cc_library(
34 name = 'shared_mem',
35 srcs = [
36 'shared_mem.c',
37 ],
38 hdrs = [
39 'shared_mem.h',
40 ],
41 deps = [
42 ':aos_sync',
Austin Schuh044e18b2015-10-21 20:17:09 -070043 ':core_lib',
44 ':shared_mem_types',
Brian Silvermancb5da1f2015-12-05 22:19:58 -050045 '//aos/common/logging',
Austin Schuh044e18b2015-10-21 20:17:09 -070046 '//debian:librt',
47 ],
48)
49
50cc_library(
51 # TODO(Brian): This should be shared_mem{,.h}, and the other one should be
52 # shared_mem_init{,.cc,.h}.
53 name = 'shared_mem_types',
54 hdrs = [
55 'shared_mem_types.h',
56 ],
57 deps = [
58 ':aos_sync',
Brian Silverman100534c2015-09-07 15:51:23 -040059 ],
60)
61
62cc_library(
63 name = 'queue',
64 srcs = [
65 'queue.cc',
66 ],
67 hdrs = [
68 'queue.h',
69 ],
70 deps = [
Brian Silverman2200b2c2015-11-29 05:59:28 +000071 '//aos/common:condition',
72 '//aos/common:mutex',
Brian Silverman100534c2015-09-07 15:51:23 -040073 ':core_lib',
Austin Schuh044e18b2015-10-21 20:17:09 -070074 ':shared_mem',
Brian Silvermancb5da1f2015-12-05 22:19:58 -050075 '//aos/common/logging',
Austin Schuh55139fe2015-10-14 23:55:24 -070076 '//debian:librt',
Austin Schuh044e18b2015-10-21 20:17:09 -070077 '//aos/common/util:options',
Brian Silverman100534c2015-09-07 15:51:23 -040078 ],
79)
80
81cc_test(
82 name = 'raw_queue_test',
83 srcs = [
84 'raw_queue_test.cc',
85 ],
86 deps = [
Brian Silverman258b9172015-09-19 14:32:57 -040087 '//aos/testing:googletest',
Brian Silvermanf5f8d8e2015-12-06 18:39:12 -050088 '//aos/testing:prevent_exit',
Brian Silverman100534c2015-09-07 15:51:23 -040089 ':queue',
90 '//aos/common/logging',
91 ':core_lib',
Brian Silvermanf5f8d8e2015-12-06 18:39:12 -050092 '//aos/testing:test_shm',
Brian Silverman100534c2015-09-07 15:51:23 -040093 '//aos/common:time',
94 '//aos/common:die',
95 '//aos/common/util:thread',
96 '//aos/common/util:death_test_log_implementation',
97 ],
98)
99
100cc_test(
101 name = 'ipc_stress_test',
102 srcs = [
103 'ipc_stress_test.cc',
104 ],
105 tags = [
106 'manual',
107 ],
108 deps = [
Brian Silverman258b9172015-09-19 14:32:57 -0400109 '//aos/testing:googletest',
Brian Silverman100534c2015-09-07 15:51:23 -0400110 '//aos/common:time',
Brian Silvermanf5f8d8e2015-12-06 18:39:12 -0500111 '//aos/testing:test_shm',
Brian Silverman2200b2c2015-11-29 05:59:28 +0000112 '//aos/common:mutex',
Brian Silverman100534c2015-09-07 15:51:23 -0400113 ':core_lib',
114 '//aos/common:die',
115 '//aos/common/libc:dirname',
116 '//aos/common/libc:aos_strsignal',
117 '//aos/common/logging',
118 ],
119)
120
121cc_library(
122 name = 'scoped_message_ptr',
123 deps = [
124 ':queue',
125 ],
126)