Functions | |
void | _wait_for_interrupt (void) |
void | greeting (void) |
result_t | initialize (void) |
Initialise the RTOS scheduler. More... | |
port::scheduler::state_t | lock (void) |
Lock the scheduler. More... | |
port::scheduler::state_t | locked (port::scheduler::state_t state) |
Lock/unlock the scheduler. More... | |
bool | locked (void) |
Check if the scheduler is locked. More... | |
bool | preemptive (void) |
Check if the scheduler is in preemptive mode. More... | |
bool | preemptive (bool) |
Set the scheduler preemptive mode. More... | |
void | reschedule (void) |
void | start (void) |
Start the RTOS scheduler. More... | |
stack::element_t * | switch_stacks (stack::element_t *sp) |
port::scheduler::state_t | unlock (void) |
Unlock the scheduler. More... | |
void os::rtos::port::scheduler::_wait_for_interrupt | ( | void | ) |
void os::rtos::port::scheduler::greeting | ( | void | ) |
result_t os::rtos::port::scheduler::initialize | ( | void | ) |
Initialise the RTOS scheduler.
result::ok | The scheduler was initialised. |
EPERM | Cannot be invoked from an Interrupt Service Routines. |
Initialise all RTOS internal objects and be ready to run.
Must be called only once, usually in main().
|
inline |
Lock the scheduler.
Set the scheduler lock state to locked and return the previous state.
Definition at line 869 of file os-sched.h.
|
inline |
Lock/unlock the scheduler.
[in] | state | The new state of the scheduler lock. |
Set the scheduler lock state based on the parameter and return the previous state.
This allows to implement scheduler critical sections, where the scheduler is disabled and context switches are not performed.
Definition at line 899 of file os-sched.h.
|
inline |
Check if the scheduler is locked.
true | The scheduler is locked. |
false | The scheduler is switching threads (not locked). |
Check if the scheduler is locked on the current thread or is switching threads from the ready list.
Definition at line 856 of file os-sched.h.
|
inline |
Check if the scheduler is in preemptive mode.
true | The scheduler is in preemptive mode. |
false | The scheduler is not in preemptive mode. |
Check if the scheduler preemption is enabled.
Definition at line 839 of file os-sched.h.
bool os::rtos::port::scheduler::preemptive | ( | bool | state | ) |
Set the scheduler preemptive mode.
[in] | state | The new state of the scheduler preemptive mode. |
Definition at line 226 of file os-core.cpp.
void os::rtos::port::scheduler::reschedule | ( | void | ) |
void os::rtos::port::scheduler::start | ( | void | ) |
Start the RTOS scheduler.
The scheduler cannot be stopped, it will run forever, but thread switching can be locked/unlocked.
Definition at line 186 of file os-core.cpp.
stack::element_t* os::rtos::port::scheduler::switch_stacks | ( | stack::element_t * | sp | ) |
|
inline |
Unlock the scheduler.
Set the scheduler lock state to unlocked and return the previous state.
Definition at line 882 of file os-sched.h.