I'm having a problem with multitasking in my monolithic kernel. I have implemented pre-emptive multitasking using stack switching
where an IRQ 0 handler saves the registers onto the stack, calls switch_task and then restores the registers.
However, when switching from a second user-mode process back to the first, the stack values are not the saved values that
were saved when switching from the first to the second process.
It's been tested using two kernel-mode processes, and it works fine using the test code.
I would appreciate any input.
https://github.com/darkavengr/CCP/blob/ ... 86/pic.asm
https://github.com/darkavengr/CCP/blob/ ... /sched.asm
https://github.com/darkavengr/CCP/blob/ ... testcode.c
Multitasking stack switching problems
-
- Posts: 2
- Joined: Sat Feb 17, 2024 1:11 pm
- Location: Here, there and everywhere
- GitHub: https://github.com/darkavengr/CCP
-
- Member
- Posts: 5560
- Joined: Mon Mar 25, 2013 7:01 pm
Re: Multitasking stack switching problems
Since you've deleted this file, does that mean you fixed it?darkavengr wrote:https://github.com/darkavengr/CCP/blob/ ... testcode.c
-
- Posts: 2
- Joined: Sat Feb 17, 2024 1:11 pm
- Location: Here, there and everywhere
- GitHub: https://github.com/darkavengr/CCP
Re: Multitasking stack switching problems
Yes, the problem has been fixed.