I clicked around in the kernel section and the other commenters highlighting the simplicity weren't lying. It's beautiful in its simplicity.
Seeing the screenshots I was kind of expecting this was a pre-emptive multi-tasking OS (forgetting what I read in the submission).
Things that thus surprised me on a cursory look:
- noticed krn_main() ends with `while (1);` [1]. I would've expected a "schedule" call or something. I assume there's no real busy loop burning CPU, maybe it's never meant to reach this code?
- I'm reminded of the "bare metal OS" when I see one of the apps call `krn_\*` functions directly [2].
Thanks, so glad people like the code! I keep looking for ways to make it simpler and more obvious.
> - noticed krn_main() ends with `while (1);` [1]. I would've expected a "schedule" call or something. I assume there's no real busy loop burning CPU, maybe it's never meant to reach this code?
Yeah, `gui_main()` takes over and is not supposed to return, so the code is unreachable. The loop is just an old idiom used in such places (e.g. [1]), though I've now replaced it with a comment and a call to `halt()` to better convey the intention.
> - I'm reminded of the "bare metal OS" when I see one of the apps call `krn_*` functions directly [2].
Yeah... but at least the kernel doesn't call the apps... which it could ;^)
Seeing the screenshots I was kind of expecting this was a pre-emptive multi-tasking OS (forgetting what I read in the submission).
Things that thus surprised me on a cursory look:
[1]: https://github.com/luke8086/gentleos32/blob/main/kernel/main...[2]: https://github.com/luke8086/gentleos32/blob/ea691f14635c023d...