int main(void) { SystemInit(); Foo_Init(); Bar_Init(); Baz_Init(); // and so on for(;;) { Foo_Run(); //< module that "Bar" depends on Bar_Run(); //< critical module if (Bar_IsReady()) { Baz_Run(); //< "normal" module // and all other "normal" modules } } } #### int main(void) { SystemInit(); Foo_Init(); Bar_Init(); Baz_Init(); Abc_Init(); // and so on for(;;) { Foo_Run(); //< module that "Bar" depends on Bar_Run(); //< critical module if (!Abc_IsDone()) { Abc_Run(); } if (Bar_IsReady()) { Baz_Run(); //< "normal" module // and all other "normal" modules } } }