This main loop that never returns is generally referred to as a super loop. It's always fun to think super because it has control over most things in the system – nothing gets done in the following diagram unless the super loop makes it happen. This type of setup is perfect for very simple systems that need to perform just a few tasks that don't take a considerable amount of time. Basic super loop structures are extremely easy to write and understand; if the problem you're trying to solve can be done with a simple super loop, then use a simple super loop. Here is the execution flow of the code presented previously – each function is called sequentially and the loop never exits:
Now, let's have a look at what this execution looks like in a real-time system and some of the drawbacks associated with this approach.