I also have a basic software task switcher impelemted. Most tasks are ring3 but idle task and some drivers for doing IO are ring0.
I have until now just had uninterruptable syscalls by disabling interrupts on entry to the call and enable again on exit.
I am thinking about implementing interruptable syscalls. Eg: i have a function that takes 1sec to return. Then i want this syscall to be interrupted, and other tasks scheduled with it not waithing for that call to finish. There are probably other ways to come around something like this, but i think this would be a nice approach.
Critical sections in the syscall kernel part can be handled with enable/disable of interrupts for now since i just have one cpu
![Wink ;)](./images/smilies/icon_wink.gif)
Anyone implemented something like this? How did you do it? Any design conciderations? Anyone got a reference how this could be done?
It has been a few years since i did something on my code last time so im a little bit "rusty"
![Smile :)](./images/smilies/icon_smile.gif)
cheers
Thomas