|
PebbleOS v4.47.0-512-g5285d4236
|
Scheduler start and preemption control. More...
Functions | |
| bool | pbl_kernel_is_started (void) |
| Check whether the scheduler has started. | |
| bool | pbl_kernel_is_running (void) |
| Check whether threads are being scheduled. | |
| void | pbl_sched_lock (void) |
| Disable preemption. | |
| void | pbl_sched_unlock (void) |
| Undo one pbl_sched_lock(), performing any deferred switch at the outermost one. | |
| bool | pbl_sched_is_locked (void) |
| Check whether preemption is disabled. | |
Scheduler start and preemption control.
pbl_sched_lock() keeps the calling thread running without masking interrupts: switches requested meanwhile, e.g. by an ISR waking a higher priority thread, happen at the outermost pbl_sched_unlock(). Blocking while the scheduler is locked is not allowed.
| bool pbl_kernel_is_running | ( | void | ) |
Check whether threads are being scheduled.
| bool pbl_kernel_is_started | ( | void | ) |
Check whether the scheduler has started.
| bool pbl_sched_is_locked | ( | void | ) |
Check whether preemption is disabled.
| void pbl_sched_lock | ( | void | ) |
Disable preemption.
ISRs still run. Nestable; balance each call with pbl_sched_unlock().
| void pbl_sched_unlock | ( | void | ) |
Undo one pbl_sched_lock(), performing any deferred switch at the outermost one.