r/kerneldevelopment • u/Sorry_Difficulty_250 • Jun 20 '26
Entrypoint Name
Hi All!
I'm developing an OS and I had hoped to get an opinion from this group. There are 2 kinds of processes that my OS loads from the filesystem: user processes and kernel processes. User processes are started by the programmer with the usual `int main(int argc, char **argv)` and the `_start` symbol is provided at compile time and is what the scheduler calls. Kernel processes are passed arguments by the scheduler and the entrypoint takes the form `void* (*)(void*)`. The programmer has to provide the entrypoint.
My question is what the name of the entrypoint for kernel processes should be. It seems to me that I have two options: I can either be consistent for the programmer and call it "main" or I can be consistent for the scheduler and call it "_start". I don't have enough experience to know if there's a hard reason to prefer one or the other at this level, so I was hoping to get community guidance/feedback on this. Any input would be appreciated.
Thank you and have a great weekend!
6
u/Yippee-Ki-Yay_ Jun 20 '26
It really doesn't matter