Merge "Fix time's conditional use of global_core to find its offset"
diff --git a/aos/linux_code/init.cc b/aos/linux_code/init.cc
index ca14ab3..2e47b16 100644
--- a/aos/linux_code/init.cc
+++ b/aos/linux_code/init.cc
@@ -60,6 +60,10 @@
WriteCoreDumps();
}
+const char *const kNoRealtimeEnvironmentVariable = "AOS_NO_REALTIME";
+
+} // namespace
+
void LockAllMemory() {
// Allow locking as much as we want into RAM.
SetSoftRLimit(RLIMIT_MEMLOCK, RLIM_INFINITY, false);
@@ -91,10 +95,6 @@
free(heap_data);
}
-const char *const kNoRealtimeEnvironmentVariable = "AOS_NO_REALTIME";
-
-} // namespace
-
void InitNRT() {
InitStart();
aos_core_create_shared_mem(false, false);
diff --git a/aos/linux_code/init.h b/aos/linux_code/init.h
index 2e57166..9b0c3d6 100644
--- a/aos/linux_code/init.h
+++ b/aos/linux_code/init.h
@@ -35,6 +35,8 @@
// name can have a maximum of 16 characters.
void SetCurrentThreadName(const ::std::string &name);
+void LockAllMemory();
+
} // namespace aos
#endif // AOS_LINUX_CODE_INIT_H_