Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Octocontrabass wrote:The schedule() function returns when the process has been scheduled. A process that has exited should not be scheduled.
Thanks for your reply. I do not known how the schedule works within the exit function.
the panic says it will not return, but in my program it always returns at the time that I want it exit.
You need to make sure that once the thread exits, it gets removed from the running queue or else it will just be rescheduled.
Once removed from the running queue, place it on some sort of a "dead queue" and have a special thread that picks up the dead threads and removes their metadata.
OS: Basic OS
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader