Do superstructure initialization before going realtime
It does a lot of math in the constructor, which eventually runs into the
realtime resource limit.
Change-Id: Ie57dcc956019ce291f495c1af9a9040b706e7fcf
diff --git a/aos/linux_code/init.h b/aos/linux_code/init.h
index e34ecfd..91b8c19 100644
--- a/aos/linux_code/init.h
+++ b/aos/linux_code/init.h
@@ -10,7 +10,8 @@
// them again after fork(2)ing.
// Does the non-realtime parts of the initialization process.
-void InitNRT();
+// If for_realtime is true, this sets up to call GoRT later.
+void InitNRT(bool for_realtime = false);
// Initializes everything, including the realtime stuff.
// relative_priority adjusts the priority of this process relative to all of the
// other ones (positive for higher priority).
@@ -22,6 +23,9 @@
// exit gracefully).
void Cleanup();
+// Performs the realtime parts of initialization after InitNRT(true) has been called.
+void GoRT(int relative_priority = 0);
+
// Sets up this process to write core dump files.
// This is called by Init*, but it's here for other files that want this
// behavior without calling Init*.