Removed linux_code
Change-Id: I7327828d2c9efdf03172d1b90f49d5c51fbba86e
diff --git a/aos/BUILD b/aos/BUILD
index dd4c04b..593509d 100644
--- a/aos/BUILD
+++ b/aos/BUILD
@@ -5,8 +5,8 @@
srcs = [
"//aos/logging:log_displayer",
"//aos/logging:log_streamer",
- "//aos/linux_code:core",
- "//aos/linux_code/starter",
+ "//aos:core",
+ "//aos/starter",
],
visibility = ["//visibility:public"],
)
@@ -23,10 +23,10 @@
name = "prime_binaries_stripped",
srcs = [
# starter is hard coded to look for a non-stripped core...
- "//aos/linux_code:core",
+ "//aos:core",
"//aos/logging:log_streamer.stripped",
"//aos/logging:log_displayer.stripped",
- "//aos/linux_code/starter",
+ "//aos/starter",
],
visibility = ["//visibility:public"],
)
@@ -155,8 +155,8 @@
"//aos/mutex:mutex",
"//aos/time:time",
"//aos/logging:printf_formats",
- "//aos/linux_code/ipc_lib:core_lib",
- "//aos/linux_code/ipc_lib:shared_mem",
+ "//aos/ipc_lib:core_lib",
+ "//aos/ipc_lib:shared_mem",
],
visibility = ["//visibility:public"],
)
@@ -185,8 +185,8 @@
],
deps = [
"//aos/messages:messages",
- "//aos/linux_code:queue",
- "//aos/linux_code/ipc_lib:queue",
+ "//aos:queue",
+ "//aos/ipc_lib:queue",
],
visibility = ["//visibility:public"],
)
@@ -259,7 +259,7 @@
deps = [
"//aos/mutex:mutex",
"//aos/logging",
- "//aos/linux_code/ipc_lib:aos_sync",
+ "//aos/ipc_lib:aos_sync",
],
visibility = ["//visibility:public"],
)
@@ -276,8 +276,8 @@
"//aos/time:time",
"//aos/logging",
"//aos/util:thread",
- "//aos/linux_code/ipc_lib:aos_sync",
- "//aos/linux_code/ipc_lib:core_lib",
+ "//aos/ipc_lib:aos_sync",
+ "//aos/ipc_lib:core_lib",
"//aos/testing:googletest",
"//aos/testing:prevent_exit",
"//aos/testing:test_shm",
@@ -325,7 +325,7 @@
deps = [
"//aos/time:time",
"//aos/logging",
- "//aos/linux_code/ipc_lib:aos_sync",
+ "//aos/ipc_lib:aos_sync",
],
visibility = ["//visibility:public"],
)
@@ -342,3 +342,109 @@
"//aos/testing:test_logging",
],
)
+
+cc_binary(
+ name = "dump_rtprio",
+ srcs = [
+ "dump_rtprio.cc",
+ ],
+ deps = [
+ "//aos/time:time",
+ "//aos/logging",
+ "//aos/logging:implementations",
+ ],
+)
+
+cc_library(
+ name = "queue",
+ hdrs = [
+ "queue-tmpl.h",
+ ],
+ compatible_with = [
+ "//tools:armhf-debian",
+ ],
+ visibility = ["//aos:__pkg__"],
+)
+
+cc_library(
+ name = "complex_thread_local",
+ srcs = [
+ "complex_thread_local.cc",
+ ],
+ hdrs = [
+ "complex_thread_local.h",
+ ],
+ compatible_with = [
+ "//tools:armhf-debian",
+ ],
+ linkopts = [
+ "-lpthread",
+ ],
+ deps = [
+ "//aos:once",
+ "//aos:die",
+ ],
+ visibility = ["//visibility:public"],
+)
+
+cc_test(
+ name = "complex_thread_local_test",
+ srcs = [
+ "complex_thread_local_test.cc",
+ ],
+ deps = [
+ ":complex_thread_local",
+ "//aos/logging",
+ "//aos/util:thread",
+ "//aos/testing:googletest",
+ ],
+)
+
+cc_library(
+ name = "init",
+ srcs = [
+ "init.cc",
+ ],
+ hdrs = [
+ "init.h",
+ ],
+ compatible_with = [
+ "//tools:armhf-debian",
+ ],
+ deps = [
+ "//aos:die",
+ "//aos/logging:implementations",
+ "//aos/ipc_lib:shared_mem",
+ ],
+ visibility = ["//visibility:public"],
+)
+
+cc_library(
+ name = "configuration",
+ srcs = [
+ "configuration.cc",
+ ],
+ hdrs = [
+ "configuration.h",
+ ],
+ compatible_with = [
+ "//tools:armhf-debian",
+ ],
+ deps = [
+ "//aos:once",
+ "//aos:unique_malloc_ptr",
+ "//aos/logging",
+ ],
+ visibility = ["//visibility:public"],
+)
+
+cc_binary(
+ name = "core",
+ srcs = [
+ "core.cc",
+ ],
+ deps = [
+ ":init",
+ "//aos/util:run_command",
+ ],
+)
diff --git a/aos/linux_code/complex_thread_local.cc b/aos/complex_thread_local.cc
similarity index 96%
rename from aos/linux_code/complex_thread_local.cc
rename to aos/complex_thread_local.cc
index fbfe914..f6a3135 100644
--- a/aos/linux_code/complex_thread_local.cc
+++ b/aos/complex_thread_local.cc
@@ -1,4 +1,4 @@
-#include "aos/linux_code/complex_thread_local.h"
+#include "aos/complex_thread_local.h"
#include <pthread.h>
diff --git a/aos/linux_code/complex_thread_local.h b/aos/complex_thread_local.h
similarity index 95%
rename from aos/linux_code/complex_thread_local.h
rename to aos/complex_thread_local.h
index 7ada875..224d3b2 100644
--- a/aos/linux_code/complex_thread_local.h
+++ b/aos/complex_thread_local.h
@@ -1,5 +1,5 @@
-#ifndef AOS_LINUX_CODE_COMPLEX_THREAD_LOCAL_H_
-#define AOS_LINUX_CODE_COMPLEX_THREAD_LOCAL_H_
+#ifndef AOS_COMPLEX_THREAD_LOCAL_H_
+#define AOS_COMPLEX_THREAD_LOCAL_H_
#include <assert.h>
@@ -128,4 +128,4 @@
} // namespace aos
-#endif // AOS_LINUX_CODE_COMPLEX_THREAD_LOCAL_H_
+#endif // AOS_COMPLEX_THREAD_LOCAL_H_
diff --git a/aos/linux_code/complex_thread_local_test.cc b/aos/complex_thread_local_test.cc
similarity index 97%
rename from aos/linux_code/complex_thread_local_test.cc
rename to aos/complex_thread_local_test.cc
index 6163ba7..b8eaa2c 100644
--- a/aos/linux_code/complex_thread_local_test.cc
+++ b/aos/complex_thread_local_test.cc
@@ -1,4 +1,4 @@
-#include "aos/linux_code/complex_thread_local.h"
+#include "aos/complex_thread_local.h"
#include <atomic>
diff --git a/aos/condition.h b/aos/condition.h
index d846ab1..9678250 100644
--- a/aos/condition.h
+++ b/aos/condition.h
@@ -1,7 +1,7 @@
#ifndef AOS_CONDITION_H_
#define AOS_CONDITION_H_
-#include "aos/linux_code/ipc_lib/aos_sync.h"
+#include "aos/ipc_lib/aos_sync.h"
namespace aos {
diff --git a/aos/condition_test.cc b/aos/condition_test.cc
index 15b948e..602513e 100644
--- a/aos/condition_test.cc
+++ b/aos/condition_test.cc
@@ -14,10 +14,10 @@
#include "aos/mutex/mutex.h"
#include "aos/testing/test_shm.h"
#include "aos/type_traits/type_traits.h"
-#include "aos/linux_code/ipc_lib/core_lib.h"
+#include "aos/ipc_lib/core_lib.h"
#include "aos/logging/logging.h"
#include "aos/macros.h"
-#include "aos/linux_code/ipc_lib/aos_sync.h"
+#include "aos/ipc_lib/aos_sync.h"
#include "aos/die.h"
#include "aos/util/thread.h"
#include "aos/testing/prevent_exit.h"
diff --git a/aos/linux_code/configuration.cc b/aos/configuration.cc
similarity index 98%
rename from aos/linux_code/configuration.cc
rename to aos/configuration.cc
index 76e744f..94606ec 100644
--- a/aos/linux_code/configuration.cc
+++ b/aos/configuration.cc
@@ -1,4 +1,4 @@
-#include "aos/linux_code/configuration.h"
+#include "aos/configuration.h"
#include <string.h>
#include <stdlib.h>
diff --git a/aos/linux_code/configuration.h b/aos/configuration.h
similarity index 86%
rename from aos/linux_code/configuration.h
rename to aos/configuration.h
index 3568f28..fadd7a1 100644
--- a/aos/linux_code/configuration.h
+++ b/aos/configuration.h
@@ -1,5 +1,5 @@
-#ifndef AOS_LINUX_CODE_CONFIGURATION_H_
-#define AOS_LINUX_CODE_CONFIGURATION_H_
+#ifndef AOS_CONFIGURATION_H_
+#define AOS_CONFIGURATION_H_
#include <stdint.h>
#include <sys/socket.h>
@@ -28,4 +28,4 @@
} // namespace configuration
} // namespace aos
-#endif // AOS_LINUX_CODE_CONFIGURATION_H_
+#endif // AOS_CONFIGURATION_H_
diff --git a/aos/linux_code/core.cc b/aos/core.cc
similarity index 95%
rename from aos/linux_code/core.cc
rename to aos/core.cc
index 3aab562..3af3270 100644
--- a/aos/linux_code/core.cc
+++ b/aos/core.cc
@@ -7,7 +7,7 @@
#include <string>
-#include "aos/linux_code/init.h"
+#include "aos/init.h"
#include "aos/util/run_command.h"
// Initializes shared memory. This is the only file that will create the shared
diff --git a/aos/linux_code/dump_rtprio.cc b/aos/dump_rtprio.cc
similarity index 100%
rename from aos/linux_code/dump_rtprio.cc
rename to aos/dump_rtprio.cc
diff --git a/aos/event.h b/aos/event.h
index c2ad1bc..a49dffa 100644
--- a/aos/event.h
+++ b/aos/event.h
@@ -3,7 +3,7 @@
#include "aos/time/time.h"
-#include "aos/linux_code/ipc_lib/aos_sync.h"
+#include "aos/ipc_lib/aos_sync.h"
namespace aos {
diff --git a/aos/externals/forwpilib/README b/aos/externals/forwpilib/README
deleted file mode 100644
index faa1a78..0000000
--- a/aos/externals/forwpilib/README
+++ /dev/null
@@ -1,4 +0,0 @@
-This directory contains files that we plan to eventually push to upstream
-WPILib but haven't yet.
-
-The canonical location for dma.* is robotics.mvla.net:/www/https/git/frc971/jerry/dma.git.
diff --git a/aos/linux_code/init.cc b/aos/init.cc
similarity index 98%
rename from aos/linux_code/init.cc
rename to aos/init.cc
index c5a2285..aa609ec 100644
--- a/aos/linux_code/init.cc
+++ b/aos/init.cc
@@ -1,4 +1,4 @@
-#include "aos/linux_code/init.h"
+#include "aos/init.h"
#include <stdio.h>
#include <string.h>
@@ -15,7 +15,7 @@
#include "aos/die.h"
#include "aos/logging/implementations.h"
-#include "aos/linux_code/ipc_lib/shared_mem.h"
+#include "aos/ipc_lib/shared_mem.h"
namespace FLAG__namespace_do_not_use_directly_use_DECLARE_double_instead {
extern double FLAGS_tcmalloc_release_rate __attribute__((weak));
diff --git a/aos/linux_code/init.h b/aos/init.h
similarity index 94%
rename from aos/linux_code/init.h
rename to aos/init.h
index 91b8c19..4489c5d 100644
--- a/aos/linux_code/init.h
+++ b/aos/init.h
@@ -1,5 +1,5 @@
-#ifndef AOS_LINUX_CODE_INIT_H_
-#define AOS_LINUX_CODE_INIT_H_
+#ifndef AOS_INIT_H_
+#define AOS_INIT_H_
#include <string>
@@ -49,4 +49,4 @@
} // namespace aos
-#endif // AOS_LINUX_CODE_INIT_H_
+#endif // AOS_INIT_H_
diff --git a/aos/linux_code/ipc_lib/BUILD b/aos/ipc_lib/BUILD
similarity index 98%
rename from aos/linux_code/ipc_lib/BUILD
rename to aos/ipc_lib/BUILD
index d550a65..20972e4 100644
--- a/aos/linux_code/ipc_lib/BUILD
+++ b/aos/ipc_lib/BUILD
@@ -162,7 +162,7 @@
"//aos/mutex:mutex",
"//aos/logging",
"//aos/logging:implementations",
- "//aos/linux_code:init",
+ "//aos:init",
"//third_party/gflags",
],
)
diff --git a/aos/linux_code/ipc_lib/aos_sync.cc b/aos/ipc_lib/aos_sync.cc
similarity index 99%
rename from aos/linux_code/ipc_lib/aos_sync.cc
rename to aos/ipc_lib/aos_sync.cc
index af7a669..c1be351 100644
--- a/aos/linux_code/ipc_lib/aos_sync.cc
+++ b/aos/ipc_lib/aos_sync.cc
@@ -3,7 +3,7 @@
#define NDEBUG
#endif
-#include "aos/linux_code/ipc_lib/aos_sync.h"
+#include "aos/ipc_lib/aos_sync.h"
#include <linux/futex.h>
#include <unistd.h>
diff --git a/aos/linux_code/ipc_lib/aos_sync.h b/aos/ipc_lib/aos_sync.h
similarity index 98%
rename from aos/linux_code/ipc_lib/aos_sync.h
rename to aos/ipc_lib/aos_sync.h
index 5b7a865..ae95c6d 100644
--- a/aos/linux_code/ipc_lib/aos_sync.h
+++ b/aos/ipc_lib/aos_sync.h
@@ -1,5 +1,5 @@
-#ifndef AOS_LINUX_CODE_IPC_LIB_SYNC_H_
-#define AOS_LINUX_CODE_IPC_LIB_SYNC_H_
+#ifndef AOS_IPC_LIB_SYNC_H_
+#define AOS_IPC_LIB_SYNC_H_
#include <stdlib.h>
#include <signal.h>
@@ -183,4 +183,4 @@
#endif // __cplusplus
-#endif // AOS_LINUX_CODE_IPC_LIB_SYNC_H_
+#endif // AOS_IPC_LIB_SYNC_H_
diff --git a/aos/linux_code/ipc_lib/core_lib.c b/aos/ipc_lib/core_lib.c
similarity index 93%
rename from aos/linux_code/ipc_lib/core_lib.c
rename to aos/ipc_lib/core_lib.c
index 23dd256..a1e3315 100644
--- a/aos/linux_code/ipc_lib/core_lib.c
+++ b/aos/ipc_lib/core_lib.c
@@ -1,10 +1,10 @@
-#include "aos/linux_code/ipc_lib/core_lib.h"
+#include "aos/ipc_lib/core_lib.h"
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
-#include "aos/linux_code/ipc_lib/shared_mem_types.h"
+#include "aos/ipc_lib/shared_mem_types.h"
static uint8_t aos_8max(uint8_t l, uint8_t r) {
return (l > r) ? l : r;
diff --git a/aos/linux_code/ipc_lib/core_lib.h b/aos/ipc_lib/core_lib.h
similarity index 93%
rename from aos/linux_code/ipc_lib/core_lib.h
rename to aos/ipc_lib/core_lib.h
index ef81c3c..d62f602 100644
--- a/aos/linux_code/ipc_lib/core_lib.h
+++ b/aos/ipc_lib/core_lib.h
@@ -3,7 +3,7 @@
#include <stdint.h>
-#include "aos/linux_code/ipc_lib/aos_sync.h"
+#include "aos/ipc_lib/aos_sync.h"
#ifdef __cplusplus
extern "C" {
diff --git a/aos/linux_code/ipc_lib/ipc_comparison.cc b/aos/ipc_lib/ipc_comparison.cc
similarity index 99%
rename from aos/linux_code/ipc_lib/ipc_comparison.cc
rename to aos/ipc_lib/ipc_comparison.cc
index 6e67e13..8774c73 100644
--- a/aos/linux_code/ipc_lib/ipc_comparison.cc
+++ b/aos/ipc_lib/ipc_comparison.cc
@@ -27,8 +27,8 @@
#include "aos/logging/logging.h"
#include "aos/mutex/mutex.h"
#include "aos/time/time.h"
-#include "aos/linux_code/init.h"
-#include "aos/linux_code/ipc_lib/queue.h"
+#include "aos/init.h"
+#include "aos/ipc_lib/queue.h"
DEFINE_string(method, "", "Which IPC method to use");
DEFINE_int32(messages, 1000000, "How many messages to send back and forth");
diff --git a/aos/linux_code/ipc_lib/ipc_stress_test.cc b/aos/ipc_lib/ipc_stress_test.cc
similarity index 99%
rename from aos/linux_code/ipc_lib/ipc_stress_test.cc
rename to aos/ipc_lib/ipc_stress_test.cc
index e43e6a5..aa5d9c5 100644
--- a/aos/linux_code/ipc_lib/ipc_stress_test.cc
+++ b/aos/ipc_lib/ipc_stress_test.cc
@@ -16,7 +16,7 @@
#include "aos/mutex/mutex.h"
#include "aos/time/time.h"
#include "aos/type_traits/type_traits.h"
-#include "aos/linux_code/ipc_lib/core_lib.h"
+#include "aos/ipc_lib/core_lib.h"
#include "aos/testing/test_shm.h"
// This runs all of the IPC-related tests in a bunch of parallel processes for a
diff --git a/aos/linux_code/ipc_lib/queue.cc b/aos/ipc_lib/queue.cc
similarity index 99%
rename from aos/linux_code/ipc_lib/queue.cc
rename to aos/ipc_lib/queue.cc
index a89554d..c751a7e 100644
--- a/aos/linux_code/ipc_lib/queue.cc
+++ b/aos/ipc_lib/queue.cc
@@ -3,7 +3,7 @@
#define NDEBUG
#endif
-#include "aos/linux_code/ipc_lib/queue.h"
+#include "aos/ipc_lib/queue.h"
#include <stdio.h>
#include <string.h>
@@ -14,7 +14,7 @@
#include <algorithm>
#include "aos/type_traits/type_traits.h"
-#include "aos/linux_code/ipc_lib/core_lib.h"
+#include "aos/ipc_lib/core_lib.h"
namespace aos {
namespace {
diff --git a/aos/linux_code/ipc_lib/queue.h b/aos/ipc_lib/queue.h
similarity index 97%
rename from aos/linux_code/ipc_lib/queue.h
rename to aos/ipc_lib/queue.h
index 1a0d174..f21295f 100644
--- a/aos/linux_code/ipc_lib/queue.h
+++ b/aos/ipc_lib/queue.h
@@ -1,7 +1,7 @@
-#ifndef AOS_LINUX_CODE_IPC_LIB_QUEUE_H_
-#define AOS_LINUX_CODE_IPC_LIB_QUEUE_H_
+#ifndef AOS_IPC_LIB_QUEUE_H_
+#define AOS_IPC_LIB_QUEUE_H_
-#include "aos/linux_code/ipc_lib/shared_mem.h"
+#include "aos/ipc_lib/shared_mem.h"
#include "aos/mutex/mutex.h"
#include "aos/condition.h"
#include "aos/util/options.h"
@@ -228,4 +228,4 @@
} // namespace aos
-#endif // AOS_LINUX_CODE_IPC_LIB_QUEUE_H_
+#endif // AOS_IPC_LIB_QUEUE_H_
diff --git a/aos/linux_code/ipc_lib/raw_queue_test.cc b/aos/ipc_lib/raw_queue_test.cc
similarity index 99%
rename from aos/linux_code/ipc_lib/raw_queue_test.cc
rename to aos/ipc_lib/raw_queue_test.cc
index 08b7445..ab98b1f 100644
--- a/aos/linux_code/ipc_lib/raw_queue_test.cc
+++ b/aos/ipc_lib/raw_queue_test.cc
@@ -1,4 +1,4 @@
-#include "aos/linux_code/ipc_lib/queue.h"
+#include "aos/ipc_lib/queue.h"
#include <unistd.h>
#include <sys/mman.h>
@@ -11,7 +11,7 @@
#include "gtest/gtest.h"
-#include "aos/linux_code/ipc_lib/core_lib.h"
+#include "aos/ipc_lib/core_lib.h"
#include "aos/type_traits/type_traits.h"
#include "aos/testing/test_shm.h"
#include "aos/time/time.h"
diff --git a/aos/linux_code/ipc_lib/shared_mem.c b/aos/ipc_lib/shared_mem.c
similarity index 96%
rename from aos/linux_code/ipc_lib/shared_mem.c
rename to aos/ipc_lib/shared_mem.c
index e0f1bfb..e8edc9e 100644
--- a/aos/linux_code/ipc_lib/shared_mem.c
+++ b/aos/ipc_lib/shared_mem.c
@@ -1,4 +1,4 @@
-#include "aos/linux_code/ipc_lib/shared_mem.h"
+#include "aos/ipc_lib/shared_mem.h"
#include <stdio.h>
#include <string.h>
@@ -10,9 +10,9 @@
#include <stdlib.h>
#include <assert.h>
-#include "aos/linux_code/ipc_lib/core_lib.h"
+#include "aos/ipc_lib/core_lib.h"
#include "aos/logging/logging.h"
-#include "aos/linux_code/ipc_lib/aos_sync.h"
+#include "aos/ipc_lib/aos_sync.h"
// the path for the shared memory segment. see shm_open(3) for restrictions
#define AOS_SHM_NAME "/aos_shared_mem"
diff --git a/aos/linux_code/ipc_lib/shared_mem.h b/aos/ipc_lib/shared_mem.h
similarity index 95%
rename from aos/linux_code/ipc_lib/shared_mem.h
rename to aos/ipc_lib/shared_mem.h
index 36acfd0..edb9091 100644
--- a/aos/linux_code/ipc_lib/shared_mem.h
+++ b/aos/ipc_lib/shared_mem.h
@@ -5,7 +5,7 @@
#include <unistd.h>
#include <time.h>
-#include "aos/linux_code/ipc_lib/shared_mem_types.h"
+#include "aos/ipc_lib/shared_mem_types.h"
#ifdef __cplusplus
extern "C" {
diff --git a/aos/linux_code/ipc_lib/shared_mem_types.h b/aos/ipc_lib/shared_mem_types.h
similarity index 89%
rename from aos/linux_code/ipc_lib/shared_mem_types.h
rename to aos/ipc_lib/shared_mem_types.h
index 07bb60e..f8555d5 100644
--- a/aos/linux_code/ipc_lib/shared_mem_types.h
+++ b/aos/ipc_lib/shared_mem_types.h
@@ -1,9 +1,9 @@
-#ifndef AOS_LINUX_CODE_IPC_LIB_SHARED_MEM_TYPES_H_
-#define AOS_LINUX_CODE_IPC_LIB_SHARED_MEM_TYPES_H_
+#ifndef AOS_IPC_LIB_SHARED_MEM_TYPES_H_
+#define AOS_IPC_LIB_SHARED_MEM_TYPES_H_
#include <stddef.h>
-#include "aos/linux_code/ipc_lib/aos_sync.h"
+#include "aos/ipc_lib/aos_sync.h"
#ifdef __cplusplus
extern "C" {
@@ -61,4 +61,4 @@
}
#endif
-#endif // AOS_LINUX_CODE_IPC_LIB_SHARED_MEM_TYPES_H_
+#endif // AOS_IPC_LIB_SHARED_MEM_TYPES_H_
diff --git a/aos/linux_code/ipc_lib/unique_message_ptr.h b/aos/ipc_lib/unique_message_ptr.h
similarity index 100%
rename from aos/linux_code/ipc_lib/unique_message_ptr.h
rename to aos/ipc_lib/unique_message_ptr.h
diff --git a/aos/linux_code/BUILD b/aos/linux_code/BUILD
deleted file mode 100644
index 7cc22d0..0000000
--- a/aos/linux_code/BUILD
+++ /dev/null
@@ -1,104 +0,0 @@
-package(default_visibility = ["//visibility:public"])
-
-cc_binary(
- name = "dump_rtprio",
- srcs = [
- "dump_rtprio.cc",
- ],
- deps = [
- "//aos/time:time",
- "//aos/logging",
- "//aos/logging:implementations",
- ],
-)
-
-cc_library(
- name = "queue",
- hdrs = [
- "queue-tmpl.h",
- ],
- compatible_with = [
- "//tools:armhf-debian",
- ],
- visibility = ["//aos:__pkg__"],
-)
-
-cc_library(
- name = "complex_thread_local",
- srcs = [
- "complex_thread_local.cc",
- ],
- hdrs = [
- "complex_thread_local.h",
- ],
- compatible_with = [
- "//tools:armhf-debian",
- ],
- linkopts = [
- "-lpthread",
- ],
- deps = [
- "//aos:once",
- "//aos:die",
- ],
-)
-
-cc_test(
- name = "complex_thread_local_test",
- srcs = [
- "complex_thread_local_test.cc",
- ],
- deps = [
- ":complex_thread_local",
- "//aos/logging",
- "//aos/util:thread",
- "//aos/testing:googletest",
- ],
-)
-
-cc_library(
- name = "init",
- srcs = [
- "init.cc",
- ],
- hdrs = [
- "init.h",
- ],
- compatible_with = [
- "//tools:armhf-debian",
- ],
- deps = [
- "//aos:die",
- "//aos/logging:implementations",
- "//aos/linux_code/ipc_lib:shared_mem",
- ],
-)
-
-cc_library(
- name = "configuration",
- srcs = [
- "configuration.cc",
- ],
- hdrs = [
- "configuration.h",
- ],
- compatible_with = [
- "//tools:armhf-debian",
- ],
- deps = [
- "//aos:once",
- "//aos:unique_malloc_ptr",
- "//aos/logging",
- ],
-)
-
-cc_binary(
- name = "core",
- srcs = [
- "core.cc",
- ],
- deps = [
- ":init",
- "//aos/util:run_command",
- ],
-)
diff --git a/aos/linux_code/README.txt b/aos/linux_code/README.txt
deleted file mode 100644
index 65feb21..0000000
--- a/aos/linux_code/README.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-see ../README.txt for stuff affecting all code
-
-The folder is called linux_code because it mainly deals with code that uses the queue system, which only works under GNU/Linux for a variety of reasons, some fundamental (futexes) and some because nobody bothers to fix them.
-The layout is designed with multiple linux boxes in mind.
-
-The code for the linux box that sends motor outputs etc is in ../prime/.
-
-[NOTES]
-Any code should call aos::Init() (or aos::InitNRT() for processes that don't need to be realtime) before making any calls to any of the aos functions.
-Making calls to any of the aos functions (including aos::Init()) from more than 1 thread per process is not supported, but using fork(2) after some aos functions have been called and then continuing to make aos function calls (without calling one of the exec(3) functions) in both processes is supported.
diff --git a/aos/logging/BUILD b/aos/logging/BUILD
index a8ee8e9..1af933d 100644
--- a/aos/logging/BUILD
+++ b/aos/logging/BUILD
@@ -19,7 +19,7 @@
"//aos:die",
"//aos:macros",
"//aos/libc:aos_strerror",
- "//aos/linux_code:complex_thread_local",
+ "//aos:complex_thread_local",
],
)
@@ -36,7 +36,7 @@
":binary_log_file",
":logging",
"//aos:queues",
- "//aos/linux_code/ipc_lib:queue",
+ "//aos/ipc_lib:queue",
],
)
@@ -53,9 +53,9 @@
"//aos:die",
"//aos:queue_types",
"//aos/time:time",
- "//aos/linux_code:configuration",
- "//aos/linux_code:init",
- "//aos/linux_code/ipc_lib:queue",
+ "//aos:configuration",
+ "//aos:init",
+ "//aos/ipc_lib:queue",
],
)
@@ -69,8 +69,8 @@
":implementations",
":logging",
"//aos/time:time",
- "//aos/linux_code:init",
- "//aos/linux_code/ipc_lib:queue",
+ "//aos:init",
+ "//aos/ipc_lib:queue",
],
)
@@ -86,8 +86,8 @@
":logging",
"//aos:queue_types",
"//aos/util:string_to_num",
- "//aos/linux_code:configuration",
- "//aos/linux_code:init",
+ "//aos:configuration",
+ "//aos:init",
],
)
@@ -204,6 +204,6 @@
"//aos:queue_types",
"//aos/time:time",
"//aos/type_traits:type_traits",
- "//aos/linux_code/ipc_lib:queue",
+ "//aos/ipc_lib:queue",
],
)
diff --git a/aos/logging/binary_log_writer.cc b/aos/logging/binary_log_writer.cc
index fb0c4c2..e335b53 100644
--- a/aos/logging/binary_log_writer.cc
+++ b/aos/logging/binary_log_writer.cc
@@ -20,9 +20,9 @@
#include "aos/logging/implementations.h"
#include "aos/queue_types.h"
#include "aos/time/time.h"
-#include "aos/linux_code/configuration.h"
-#include "aos/linux_code/init.h"
-#include "aos/linux_code/ipc_lib/queue.h"
+#include "aos/configuration.h"
+#include "aos/init.h"
+#include "aos/ipc_lib/queue.h"
namespace aos {
namespace logging {
diff --git a/aos/logging/context.cc b/aos/logging/context.cc
index 3701b00..2fcb301 100644
--- a/aos/logging/context.cc
+++ b/aos/logging/context.cc
@@ -8,7 +8,7 @@
#include <string>
#include "aos/die.h"
-#include "aos/linux_code/complex_thread_local.h"
+#include "aos/complex_thread_local.h"
namespace aos {
namespace logging {
diff --git a/aos/logging/implementations.cc b/aos/logging/implementations.cc
index 337aa8f..efeb704 100644
--- a/aos/logging/implementations.cc
+++ b/aos/logging/implementations.cc
@@ -10,7 +10,7 @@
#include "aos/logging/printf_formats.h"
#include "aos/queue_types.h"
#include "aos/time/time.h"
-#include "aos/linux_code/ipc_lib/queue.h"
+#include "aos/ipc_lib/queue.h"
#include "aos/once.h"
namespace aos {
diff --git a/aos/logging/log_displayer.cc b/aos/logging/log_displayer.cc
index 1d40de1..0480b4b 100644
--- a/aos/logging/log_displayer.cc
+++ b/aos/logging/log_displayer.cc
@@ -11,7 +11,7 @@
#include <memory>
#include <string>
-#include "aos/linux_code/configuration.h"
+#include "aos/configuration.h"
#include "aos/logging/binary_log_file.h"
#include "aos/queue_types.h"
#include "aos/logging/logging.h"
diff --git a/aos/logging/log_streamer.cc b/aos/logging/log_streamer.cc
index 757ba2e..4477868 100644
--- a/aos/logging/log_streamer.cc
+++ b/aos/logging/log_streamer.cc
@@ -14,8 +14,8 @@
#include "aos/logging/implementations.h"
#include "aos/logging/logging.h"
#include "aos/time/time.h"
-#include "aos/linux_code/init.h"
-#include "aos/linux_code/ipc_lib/queue.h"
+#include "aos/init.h"
+#include "aos/ipc_lib/queue.h"
namespace aos {
namespace logging {
diff --git a/aos/logging/replay.h b/aos/logging/replay.h
index 0de207a..ffb3b7d 100644
--- a/aos/logging/replay.h
+++ b/aos/logging/replay.h
@@ -10,7 +10,7 @@
#include "aos/queue.h"
#include "aos/logging/logging.h"
#include "aos/macros.h"
-#include "aos/linux_code/ipc_lib/queue.h"
+#include "aos/ipc_lib/queue.h"
#include "aos/queue_types.h"
namespace aos {
diff --git a/aos/mutex/BUILD b/aos/mutex/BUILD
index 02cec57..6acccd7 100644
--- a/aos/mutex/BUILD
+++ b/aos/mutex/BUILD
@@ -15,7 +15,7 @@
"//aos:die",
"//aos/type_traits:type_traits",
"//aos/logging",
- "//aos/linux_code/ipc_lib:aos_sync",
+ "//aos/ipc_lib:aos_sync",
],
)
diff --git a/aos/mutex/mutex.h b/aos/mutex/mutex.h
index 8bd986c..ad678cc 100644
--- a/aos/mutex/mutex.h
+++ b/aos/mutex/mutex.h
@@ -4,7 +4,7 @@
#include "aos/macros.h"
#include "aos/type_traits/type_traits.h"
#include "aos/die.h"
-#include "aos/linux_code/ipc_lib/aos_sync.h"
+#include "aos/ipc_lib/aos_sync.h"
namespace aos {
diff --git a/aos/mutex/mutex_test.cc b/aos/mutex/mutex_test.cc
index 8e3daac..9d371b7 100644
--- a/aos/mutex/mutex_test.cc
+++ b/aos/mutex/mutex_test.cc
@@ -13,8 +13,8 @@
#include "aos/time/time.h"
#include "aos/util/death_test_log_implementation.h"
#include "aos/util/thread.h"
-#include "aos/linux_code/ipc_lib/aos_sync.h"
-#include "aos/linux_code/ipc_lib/core_lib.h"
+#include "aos/ipc_lib/aos_sync.h"
+#include "aos/ipc_lib/core_lib.h"
#include "aos/testing/test_logging.h"
#include "aos/testing/test_shm.h"
diff --git a/aos/network/BUILD b/aos/network/BUILD
index 5c1eb03..48922de 100644
--- a/aos/network/BUILD
+++ b/aos/network/BUILD
@@ -15,7 +15,7 @@
"//aos:once",
"//aos/logging",
"//aos/util:string_to_num",
- "//aos/linux_code:configuration",
+ "//aos:configuration",
],
)
diff --git a/aos/network/team_number.cc b/aos/network/team_number.cc
index eb17e7a..4e3f472 100644
--- a/aos/network/team_number.cc
+++ b/aos/network/team_number.cc
@@ -9,7 +9,7 @@
#include "aos/logging/logging.h"
#include "aos/util/string_to_num.h"
-#include "aos/linux_code/configuration.h"
+#include "aos/configuration.h"
#include "aos/once.h"
namespace aos {
diff --git a/aos/linux_code/queue-tmpl.h b/aos/queue-tmpl.h
similarity index 100%
rename from aos/linux_code/queue-tmpl.h
rename to aos/queue-tmpl.h
diff --git a/aos/queue.h b/aos/queue.h
index 47f9503..1897773 100644
--- a/aos/queue.h
+++ b/aos/queue.h
@@ -4,7 +4,7 @@
#include <assert.h>
#include "aos/macros.h"
-#include "aos/linux_code/ipc_lib/queue.h"
+#include "aos/ipc_lib/queue.h"
#include "aos/messages/message.h"
namespace aos {
@@ -223,6 +223,6 @@
} // namespace aos
-#include "aos/linux_code/queue-tmpl.h"
+#include "aos/queue-tmpl.h"
#endif // AOS_QUEUE_H_
diff --git a/aos/queue_types.cc b/aos/queue_types.cc
index 27b497c..654de2d 100644
--- a/aos/queue_types.cc
+++ b/aos/queue_types.cc
@@ -6,9 +6,9 @@
#include <unordered_map>
#include "aos/byteorder.h"
-#include "aos/linux_code/ipc_lib/shared_mem.h"
+#include "aos/ipc_lib/shared_mem.h"
#include "aos/logging/logging.h"
-#include "aos/linux_code/ipc_lib/core_lib.h"
+#include "aos/ipc_lib/core_lib.h"
#include "aos/mutex/mutex.h"
namespace aos {
diff --git a/aos/externals/seasocks/BUILD b/aos/seasocks/BUILD
similarity index 100%
rename from aos/externals/seasocks/BUILD
rename to aos/seasocks/BUILD
diff --git a/aos/externals/seasocks/gen_embedded.bzl b/aos/seasocks/gen_embedded.bzl
similarity index 94%
rename from aos/externals/seasocks/gen_embedded.bzl
rename to aos/seasocks/gen_embedded.bzl
index a11e30a..60930b4 100644
--- a/aos/externals/seasocks/gen_embedded.bzl
+++ b/aos/seasocks/gen_embedded.bzl
@@ -22,7 +22,7 @@
),
'_gen_embedded': attr.label(
executable = True,
- default = Label('//aos/externals/seasocks:gen_embedded'),
+ default = Label('//aos/seasocks:gen_embedded'),
cfg = 'host',
),
},
diff --git a/aos/externals/seasocks/gen_embedded.py b/aos/seasocks/gen_embedded.py
similarity index 100%
rename from aos/externals/seasocks/gen_embedded.py
rename to aos/seasocks/gen_embedded.py
diff --git a/aos/externals/seasocks/internal/Config.h b/aos/seasocks/internal/Config.h
similarity index 100%
rename from aos/externals/seasocks/internal/Config.h
rename to aos/seasocks/internal/Config.h
diff --git a/aos/linux_code/starter/BUILD b/aos/starter/BUILD
similarity index 94%
rename from aos/linux_code/starter/BUILD
rename to aos/starter/BUILD
index 68b39bd..f890bf6 100644
--- a/aos/linux_code/starter/BUILD
+++ b/aos/starter/BUILD
@@ -14,7 +14,7 @@
'starter.cc',
],
deps = [
- '//aos/linux_code:init',
+ '//aos:init',
'//third_party/libevent',
'//aos/logging',
'//aos/logging:implementations',
diff --git a/aos/linux_code/starter/starter.cc b/aos/starter/starter.cc
similarity index 99%
rename from aos/linux_code/starter/starter.cc
rename to aos/starter/starter.cc
index 0c7fdea..bb72523 100644
--- a/aos/linux_code/starter/starter.cc
+++ b/aos/starter/starter.cc
@@ -35,7 +35,7 @@
#include "aos/time/time.h"
#include "aos/unique_malloc_ptr.h"
#include "aos/util/run_command.h"
-#include "aos/linux_code/init.h"
+#include "aos/init.h"
#include "aos/once.h"
// This is the main piece of code that starts all of the rest of the code and
diff --git a/aos/linux_code/starter/starter.sh b/aos/starter/starter.sh
similarity index 100%
rename from aos/linux_code/starter/starter.sh
rename to aos/starter/starter.sh
diff --git a/aos/stl_mutex/BUILD b/aos/stl_mutex/BUILD
index a9b7957..51ba920 100644
--- a/aos/stl_mutex/BUILD
+++ b/aos/stl_mutex/BUILD
@@ -7,7 +7,7 @@
],
deps = [
"//aos/logging",
- "//aos/linux_code/ipc_lib:aos_sync",
+ "//aos/ipc_lib:aos_sync",
],
)
diff --git a/aos/stl_mutex/stl_mutex.h b/aos/stl_mutex/stl_mutex.h
index a5ac807..b88ac8e 100644
--- a/aos/stl_mutex/stl_mutex.h
+++ b/aos/stl_mutex/stl_mutex.h
@@ -3,7 +3,7 @@
#include <mutex>
-#include "aos/linux_code/ipc_lib/aos_sync.h"
+#include "aos/ipc_lib/aos_sync.h"
#include "aos/logging/logging.h"
#include "aos/type_traits/type_traits.h"
#include "aos/macros.h"
diff --git a/aos/testing/BUILD b/aos/testing/BUILD
index 4d1b6a4..f77f0a7 100644
--- a/aos/testing/BUILD
+++ b/aos/testing/BUILD
@@ -72,7 +72,7 @@
":test_logging",
"//aos:queues",
"//aos/logging",
- "//aos/linux_code/ipc_lib:shared_mem",
+ "//aos/ipc_lib:shared_mem",
],
)
diff --git a/aos/testing/test_shm.h b/aos/testing/test_shm.h
index dcb6906..a1c79ee 100644
--- a/aos/testing/test_shm.h
+++ b/aos/testing/test_shm.h
@@ -1,7 +1,7 @@
#ifndef AOS_TESTING_TEST_SHM_H_
#define AOS_TESTING_TEST_SHM_H_
-#include "aos/linux_code/ipc_lib/shared_mem.h"
+#include "aos/ipc_lib/shared_mem.h"
namespace aos {
namespace testing {
diff --git a/aos/time/BUILD b/aos/time/BUILD
index cbeeb5b..e5b1389 100644
--- a/aos/time/BUILD
+++ b/aos/time/BUILD
@@ -15,7 +15,7 @@
"//aos:macros",
"//aos/mutex:mutex",
"//aos/logging",
- "//aos/linux_code/ipc_lib:shared_mem",
+ "//aos/ipc_lib:shared_mem",
],
)
diff --git a/aos/time/time.cc b/aos/time/time.cc
index a72b121..0d7295c 100644
--- a/aos/time/time.cc
+++ b/aos/time/time.cc
@@ -8,7 +8,7 @@
// We only use global_core from here, which is weak, so we don't really have a
// dependency on it.
-#include "aos/linux_code/ipc_lib/shared_mem.h"
+#include "aos/ipc_lib/shared_mem.h"
#include "aos/logging/logging.h"
#include "aos/mutex/mutex.h"
diff --git a/aos/vision/image/V4L2.h b/aos/vision/image/V4L2.h
index 58e5161..d02229a 100644
--- a/aos/vision/image/V4L2.h
+++ b/aos/vision/image/V4L2.h
@@ -1,5 +1,5 @@
-#ifndef AOS_LINUX_CODE_CAMREA_V4L2_H_
-#define AOS_LINUX_CODE_CAMREA_V4L2_H_
+#ifndef AOS_CAMREA_V4L2_H_
+#define AOS_CAMREA_V4L2_H_
// This file handles including everything needed to use V4L2 and has some
// utility functions.