Add initial multitasking code to kernel. Create initial kernel task with one single thread pointing to a function with an endless loop used as fallback, when no other tasks are existing.
When creating a new task, a structure has to be created consisting a list of threads that store a void pointer to cpu stack necessary for switching. A void pointer pointing to created mmu is stored per task as it should be the same for all threads. Both necessary parts of a task / thread have to to be created depending on architecture.
When a timer interrupt is fired, a task switch has to be done, when there are existing waiting tasks with threads.
First version should include simple round robin scheduling without any priority based switching.
Add initial multitasking code to kernel. Create initial kernel task with one single thread pointing to a function with an endless loop used as fallback, when no other tasks are existing.
When creating a new task, a structure has to be created consisting a list of threads that store a void pointer to cpu stack necessary for switching. A void pointer pointing to created mmu is stored per task as it should be the same for all threads. Both necessary parts of a task / thread have to to be created depending on architecture.
When a timer interrupt is fired, a task switch has to be done, when there are existing waiting tasks with threads.
First version should include simple round robin scheduling without any priority based switching.