pub fn enable_preemption_on_cpu()
Expand description
Enables preemptive scheduling on the current CPU.
After calling this function on a CPU, a task that is executing in the user mode may get preempted if another runnable task on the same CPU is deemed more urgent by the scheduler.
OSTD achieves task preemption by registering a per-CPU timer callback
to invoke the scheduler periodically.
Thus, this function should be called once on every CPU
by an OSTD-based kernel during its initialization phase,
after it has injected its scheduler via inject_scheduler
.