Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 1 | package(default_visibility = ['//visibility:public']) |
| 2 | |
| 3 | cc_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 Schuh | 044e18b | 2015-10-21 20:17:09 -0700 | [diff] [blame^] | 14 | '//aos/common:macros', |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 15 | ], |
| 16 | ) |
| 17 | |
| 18 | cc_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 Schuh | 044e18b | 2015-10-21 20:17:09 -0700 | [diff] [blame^] | 28 | ':shared_mem_types', |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 29 | ], |
| 30 | ) |
| 31 | |
| 32 | cc_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 Schuh | 044e18b | 2015-10-21 20:17:09 -0700 | [diff] [blame^] | 42 | ':core_lib', |
| 43 | ':shared_mem_types', |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 44 | '//aos/common/logging:logging_interface', |
Austin Schuh | 044e18b | 2015-10-21 20:17:09 -0700 | [diff] [blame^] | 45 | '//debian:librt', |
| 46 | ], |
| 47 | ) |
| 48 | |
| 49 | cc_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 Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 58 | ], |
| 59 | ) |
| 60 | |
| 61 | cc_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 Schuh | 044e18b | 2015-10-21 20:17:09 -0700 | [diff] [blame^] | 73 | ':shared_mem', |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 74 | '//aos/common/logging:logging_interface', |
Austin Schuh | 55139fe | 2015-10-14 23:55:24 -0700 | [diff] [blame] | 75 | '//debian:librt', |
Austin Schuh | 044e18b | 2015-10-21 20:17:09 -0700 | [diff] [blame^] | 76 | '//aos/common/util:options', |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 77 | ], |
| 78 | ) |
| 79 | |
| 80 | cc_test( |
| 81 | name = 'raw_queue_test', |
| 82 | srcs = [ |
| 83 | 'raw_queue_test.cc', |
| 84 | ], |
| 85 | deps = [ |
Brian Silverman | 258b917 | 2015-09-19 14:32:57 -0400 | [diff] [blame] | 86 | '//aos/testing:googletest', |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 87 | ':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 | |
| 98 | cc_test( |
| 99 | name = 'ipc_stress_test', |
| 100 | srcs = [ |
| 101 | 'ipc_stress_test.cc', |
| 102 | ], |
| 103 | tags = [ |
| 104 | 'manual', |
| 105 | ], |
| 106 | deps = [ |
Brian Silverman | 258b917 | 2015-09-19 14:32:57 -0400 | [diff] [blame] | 107 | '//aos/testing:googletest', |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 108 | '//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 | |
| 119 | cc_library( |
| 120 | name = 'scoped_message_ptr', |
| 121 | deps = [ |
| 122 | ':queue', |
| 123 | ], |
| 124 | ) |
Brian Silverman | f480a61 | 2015-09-13 02:22:01 -0400 | [diff] [blame] | 125 | |
| 126 | cc_library( |
| 127 | name = 'condition', |
| 128 | srcs = [ |
| 129 | 'condition.cc', |
| 130 | ], |
| 131 | deps = [ |
| 132 | ':mutex', |
Austin Schuh | 044e18b | 2015-10-21 20:17:09 -0700 | [diff] [blame^] | 133 | '//aos/common:condition', |
Brian Silverman | f480a61 | 2015-09-13 02:22:01 -0400 | [diff] [blame] | 134 | ':aos_sync', |
| 135 | '//aos/common/logging:logging_interface', |
| 136 | ], |
| 137 | ) |
| 138 | |
| 139 | cc_library( |
| 140 | name = 'mutex', |
| 141 | srcs = [ |
| 142 | 'mutex.cc', |
| 143 | ], |
| 144 | deps = [ |
| 145 | ':aos_sync', |
| 146 | '//aos/common/logging:logging_interface', |
Austin Schuh | 044e18b | 2015-10-21 20:17:09 -0700 | [diff] [blame^] | 147 | '//aos/common:type_traits', |
| 148 | '//aos/common:mutex', |
Brian Silverman | f480a61 | 2015-09-13 02:22:01 -0400 | [diff] [blame] | 149 | ], |
| 150 | ) |
| 151 | |
| 152 | cc_library( |
| 153 | name = 'event', |
| 154 | srcs = [ |
| 155 | 'event.cc', |
| 156 | ], |
| 157 | deps = [ |
| 158 | ':aos_sync', |
| 159 | '//aos/common/logging:logging_interface', |
Austin Schuh | 044e18b | 2015-10-21 20:17:09 -0700 | [diff] [blame^] | 160 | '//aos/common:event', |
Brian Silverman | f480a61 | 2015-09-13 02:22:01 -0400 | [diff] [blame] | 161 | ], |
| 162 | ) |