Merge remote-tracking branch 'origin/master' into isa/arm64
[lunaix-os.git] / lunaix-os / includes / lunaix / owloysius.h
index c1f8584141c8b623e7607b0903af6acd45e63152..99cffa262a01ba12b47a74eaaf13e4ac2c756664 100644 (file)
@@ -3,8 +3,30 @@
 
 #include <lunaix/ds/ldga.h>
 
+/**
+ * @brief stage where only basic memory management service
+ * is present
+ */
+#define on_sysconf c_sysconf
+
+/**
+ * @brief stage where basic memory management service
+ * interrupt management and timer/clock service avaliable
+ */
 #define on_earlyboot c_earlyboot
+
+/**
+ * @brief stage where most kernel service is ready, non-preempt 
+ * kernel.
+ * 
+ * boot-stage initialization is about to conclude.
+ */
 #define on_boot c_boot
+
+/**
+ * @brief stage where all services started, kernel is in preempt
+ * state
+ */
 #define on_postboot c_postboot
 
 #define owloysius_fetch_init(func, call_stage)                                     \
 
 #define invoke_init_function(stage) ldga_invoke_fn0(lunainit##_##stage)
 
+static inline void
+initfn_invoke_sysconf()
+{
+    invoke_init_function(on_sysconf);
+}
+
+static inline void
+initfn_invoke_earlyboot()
+{
+    invoke_init_function(on_earlyboot);
+}
+
+static inline void
+initfn_invoke_boot()
+{
+    invoke_init_function(on_boot);
+}
+
+static inline void
+initfn_invoke_postboot()
+{
+    invoke_init_function(on_postboot);
+}
+
 #endif /* __LUNAIX_OWLOYSIUS_H */