2 ms·
> To start with, Linux kernel lacks some API that PalmOS simply needs, for example ability to disable and re-enable task switching. Yup... PalmOS sometimes asks
by kevin_thibedeau 4y ago
> To start with, Linux kernel lacks some API that PalmOS simply needs, for example ability to disable and re-enable task switching. Yup... PalmOS sometimes asks for preemption to be disabled.
The POSIX port of FreeRTOS (FreeRTOS running on top of Pthreads) has a way to emulate this behavior. All tasks are threads and all but one stays suspended at any given time. The FreeRTOS scheduler can switch out which task is allowed to run by sending signals to their respective thread. This allows the tasks to operate as if the FreeRTOS scheduler is in control as normal and the Linux scheduler only has an opportunity to run the one thread flagged by the signalling mechanism.