Philipp Schrader | 9b1790e | 2018-03-10 20:21:30 -0800 | [diff] [blame^] | 1 | package(default_visibility = ["//visibility:public"]) |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 2 | |
| 3 | cc_library( |
Philipp Schrader | 9b1790e | 2018-03-10 20:21:30 -0800 | [diff] [blame^] | 4 | name = "aos_sync", |
| 5 | srcs = [ |
| 6 | "aos_sync.cc", |
| 7 | ], |
| 8 | hdrs = [ |
| 9 | "aos_sync.h", |
| 10 | ], |
| 11 | linkopts = [ |
| 12 | "-lpthread", |
| 13 | ], |
| 14 | deps = [ |
| 15 | "//aos:once", |
| 16 | "//aos/common:macros", |
| 17 | "//aos/common/logging", |
| 18 | "//aos/common/util:compiler_memory_barrier", |
| 19 | ], |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 20 | ) |
| 21 | |
| 22 | cc_library( |
Philipp Schrader | 9b1790e | 2018-03-10 20:21:30 -0800 | [diff] [blame^] | 23 | name = "core_lib", |
| 24 | srcs = [ |
| 25 | "core_lib.c", |
| 26 | ], |
| 27 | hdrs = [ |
| 28 | "core_lib.h", |
| 29 | ], |
| 30 | deps = [ |
| 31 | ":aos_sync", |
| 32 | ":shared_mem_types", |
| 33 | ], |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 34 | ) |
| 35 | |
| 36 | cc_library( |
Philipp Schrader | 9b1790e | 2018-03-10 20:21:30 -0800 | [diff] [blame^] | 37 | name = "shared_mem", |
| 38 | srcs = [ |
| 39 | "shared_mem.c", |
| 40 | ], |
| 41 | hdrs = [ |
| 42 | "shared_mem.h", |
| 43 | ], |
| 44 | linkopts = [ |
| 45 | "-lrt", |
| 46 | ], |
| 47 | deps = [ |
| 48 | ":aos_sync", |
| 49 | ":core_lib", |
| 50 | ":shared_mem_types", |
| 51 | "//aos/common/logging", |
| 52 | ], |
Austin Schuh | 044e18b | 2015-10-21 20:17:09 -0700 | [diff] [blame] | 53 | ) |
| 54 | |
| 55 | cc_library( |
Philipp Schrader | 9b1790e | 2018-03-10 20:21:30 -0800 | [diff] [blame^] | 56 | # TODO(Brian): This should be shared_mem{,.h}, and the other one should be |
| 57 | # shared_mem_init{,.cc,.h}. |
| 58 | name = "shared_mem_types", |
| 59 | hdrs = [ |
| 60 | "shared_mem_types.h", |
| 61 | ], |
| 62 | deps = [ |
| 63 | ":aos_sync", |
| 64 | ], |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 65 | ) |
| 66 | |
| 67 | cc_library( |
Philipp Schrader | 9b1790e | 2018-03-10 20:21:30 -0800 | [diff] [blame^] | 68 | name = "queue", |
| 69 | srcs = [ |
| 70 | "queue.cc", |
| 71 | ], |
| 72 | hdrs = [ |
| 73 | "queue.h", |
| 74 | ], |
| 75 | linkopts = [ |
| 76 | "-lrt", |
| 77 | ], |
| 78 | deps = [ |
| 79 | ":core_lib", |
| 80 | ":shared_mem", |
| 81 | "//aos/common:condition", |
| 82 | "//aos/common:mutex", |
| 83 | "//aos/common/logging", |
| 84 | "//aos/common/util:options", |
| 85 | ], |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 86 | ) |
| 87 | |
| 88 | cc_test( |
Philipp Schrader | 9b1790e | 2018-03-10 20:21:30 -0800 | [diff] [blame^] | 89 | name = "raw_queue_test", |
| 90 | srcs = [ |
| 91 | "raw_queue_test.cc", |
| 92 | ], |
| 93 | deps = [ |
| 94 | ":core_lib", |
| 95 | ":queue", |
| 96 | "//aos/common:die", |
| 97 | "//aos/common:time", |
| 98 | "//aos/common/logging", |
| 99 | "//aos/common/util:death_test_log_implementation", |
| 100 | "//aos/common/util:thread", |
| 101 | "//aos/testing:googletest", |
| 102 | "//aos/testing:prevent_exit", |
| 103 | "//aos/testing:test_shm", |
| 104 | ], |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 105 | ) |
| 106 | |
| 107 | cc_test( |
Philipp Schrader | 9b1790e | 2018-03-10 20:21:30 -0800 | [diff] [blame^] | 108 | name = "ipc_stress_test", |
| 109 | srcs = [ |
| 110 | "ipc_stress_test.cc", |
| 111 | ], |
| 112 | tags = [ |
| 113 | "manual", |
| 114 | ], |
| 115 | deps = [ |
| 116 | ":core_lib", |
| 117 | "//aos/common:die", |
| 118 | "//aos/common:mutex", |
| 119 | "//aos/common:time", |
| 120 | "//aos/common/libc:aos_strsignal", |
| 121 | "//aos/common/libc:dirname", |
| 122 | "//aos/common/logging", |
| 123 | "//aos/testing:googletest", |
| 124 | "//aos/testing:test_shm", |
| 125 | ], |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 126 | ) |
| 127 | |
| 128 | cc_library( |
Philipp Schrader | 9b1790e | 2018-03-10 20:21:30 -0800 | [diff] [blame^] | 129 | name = "scoped_message_ptr", |
| 130 | deps = [ |
| 131 | ":queue", |
| 132 | ], |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 133 | ) |
Brian Silverman | e4d8b28 | 2015-12-24 13:44:48 -0800 | [diff] [blame] | 134 | |
| 135 | cc_binary( |
Philipp Schrader | 9b1790e | 2018-03-10 20:21:30 -0800 | [diff] [blame^] | 136 | name = "ipc_comparison", |
| 137 | srcs = [ |
| 138 | "ipc_comparison.cc", |
| 139 | ], |
| 140 | deps = [ |
| 141 | ":queue", |
| 142 | "//aos/common:condition", |
| 143 | "//aos/common:event", |
| 144 | "//aos/common:mutex", |
| 145 | "//aos/common/logging", |
| 146 | "//aos/common/logging:implementations", |
| 147 | "//aos/linux_code:init", |
| 148 | "//third_party/gflags", |
| 149 | ], |
Brian Silverman | e4d8b28 | 2015-12-24 13:44:48 -0800 | [diff] [blame] | 150 | ) |