|
PebbleOS
|
Scheduler start, preemption control and uptime. More...
Functions | |
| void | pbl_kernel_start (void) |
| Start the scheduler. | |
| 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. | |
| pbl_tick_t | pbl_uptime_ticks (void) |
| Get the time since the scheduler started. | |
Scheduler start, preemption control and uptime.
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.
| void pbl_kernel_start | ( | void | ) |
Start the scheduler.
Creates the idle thread and switches to the highest priority thread. Called once from main(), after the first threads have been created.
| 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.
| pbl_tick_t pbl_uptime_ticks | ( | void | ) |
Get the time since the scheduler started.