R_RTOS
0.1
DistributedRealTimeOperatingSystemfortheARMCortexMArchitecture
|
Scheduler and related functions. More...
Data Structures | |
struct | tskPrioArEle |
Task priority element for the second dimension of the scheduler. More... | |
Typedefs | |
typedef struct tskPrioArEle | TskPrioArEle |
tskPrioArEle | |
typedef struct tskPrioArEle * | PTskPrioArEle |
Pointer to a tskPrioArEle. | |
typedef uint16_t | PrioARFlgs |
Used for priority array flags. | |
Functions | |
RetCode | tsk_rmvTskActvTskLst (PTskTCB const tsk) |
Delete a Task from the active task list. More... | |
RetCode | tsk_insrtTskActvTskLst (PTskTCB const tsk) |
Insert a task into the active task list. More... | |
void | os_INIT_Scheduler (void) |
Initialize the Scheduler mechanism. More... | |
void | os_SCHEDULE (void) |
Schedules the next ready task according to its priority. More... | |
Variables | |
volatile PTskTCB | p_cur_tsk_tcb = NULL |
Pointer to currently running task's tskTCB. More... | |
volatile PTskTCB | p_nxt_tsk_tcb = NULL |
Pointer to task's tskTCB, which is scheduled to run next. More... | |
volatile BitsOSFlags | gOS_FLAGS |
Flags used for maintaining the OS. More... | |
Scheduler and related functions.
void os_INIT_Scheduler | ( | void | ) |
Initialize the Scheduler mechanism.
void os_SCHEDULE | ( | void | ) |
Schedules the next ready task according to its priority.
The task queue is scanned until a task ready to run is found. The queue is sorted according to the tasks' priority beforehand.
Insert a task into the active task list.
[in] | tsk | Task to insert into the active task list |
Delete a Task from the active task list.
[in] | tsk | Task to delete from the active task list |
gOS_FLAGS |
Flags used for maintaining the OS.
Contains various flags for the operation of the OS.
might be obsolete
Pointer to currently running task's tskTCB.
To keep track of the currently running task this pointer stores it. Is set to NULL when the currently running task is ended/killed, which is then acknowledged by the context switch (No saving of the current task's context).
Initialized to NULL
Pointer to task's tskTCB, which is scheduled to run next.
The scheduler sets this pointer to the task which is to be run after the context switch. The context switch automatically assigns its value to p_cur_tst_tcb once the context is switched.
Initialized to NULL