GeMRTOS
|
Related Functions | |
(Note that these are not member functions.) |
|
related |
IDLE task. This code is executed when no task is ready. The processor is halted.
gk_CODE_IDLE_TASK
[in] | pdata | Pointer to data |
Task can be changed. The processors run this task with different stacks
Definition at line 880 of file grtos_kernel.c.
|
related |
Kernel Function: creates a new task initializing TCB features.
gk_CreateTask
[in] | TaskCode | Pointer to the beginning of the task code |
[in] | p_arg | Pointer to the argument of the first call |
[in] | StkBotton | Botton of the Stack of the Task |
[in] | StkSize | Size of the stack in words |
[in] | TCBType | Type of the Task |
[in] | TCBReadyPriority | Initial Priority of the task |
[in] | TCBRunPriority | Priority of the task when it is executing |
[in] | TCBDeadline | Deadline of the task |
[in] | TCBPeriod | Period of the task |
[in] | TCB_RDY_LCB_Index | Ready list that should be inserted |
[in] | TCB_Abort_w_Deadline | True when task is aborted when deadline |
[in] | TCBInherPriority | Inhereted priority |
[in] | TCB_INTNumber | Interrupt Number if task is ISR |
< Botton of the Stack of the Task
< Top of the Stack of the task
< Pointer to tha begining of the task code
< Pointer to the argument of the first call
< Type of the Task
< Initial Priority of the task
< Priority of the task when it is executing
< Deadline of the task
< Period of the task
< number of the ready list that should be inserted
< True when task is aborted when deadline, false otherwise
Definition at line 334 of file gemrtos_core.c.
|
related |
Returns the task that the current processor was executing.
Definition at line 2262 of file listfunctions.c.
Determine the priority of a taks according to the resources granted.
gk_TASK_GRANTED_PRIORITY_GET
[in] | ptcb | Pointer to the TCB of the task |
Definition at line 2912 of file listfunctions.c.
Sets the inherence priority of TCB according the priority of granted resources.
gk_TASK_INHERENCE_PRIORITY_SET
[in] | ptcb | Pointer to the TCB |
Definition at line 2435 of file listfunctions.c.
Destroys a task and return the data structure to the TCB free list.
[in] | ptcb | Pointer to the TCB of the task to destroy |
Unlinks all the linked lists and link to the Free TCB list
Definition at line 2855 of file listfunctions.c.
Computes the current priority of the task.
gk_TASK_PRIORITY_SET
[in] | ptcb | Pointer to the TCB |
[in] | task_state | State of the task (G_TCBState_READY, G_TCBState_RUNNING) |
Definition at line 2474 of file listfunctions.c.
Release a new invocation of the task. Preserves the Associated signal list. If task is not completed, then the Abort signal is triggered.
gk_TASK_RELEASE
[in] | ptcb | Pointer to the TCB of the task to release |
Definition at line 897 of file listfunctions.c.
Initializes the Task Stack acording to the TCB parameters.
gk_TASK_STK_Init
[in] | ptcb | Pointer to the TCB of the task to initilise |
Definition at line 2805 of file listfunctions.c.
Returns the event of the TCB that grants the resource.
gk_TCB_in_RCBGEL
[in] | presource | Pointer to RCB |
[in] | ptcb | Pointer to TCB |
Definition at line 2081 of file listfunctions.c.
Unlinks the TCB from events and signals and links them to the free lists respectively.
gk_TCB_List_Unlink
[in] | ptcb | Pointer to the TCB |
Definition at line 1460 of file listfunctions.c.
Unlinks the TCB according to the list it is linked.
gk_TCB_Unlink
[in] | ptcb | Pointer to the TCB |
Definition at line 2550 of file listfunctions.c.
Links an ECB to the associated ECB list of TCB.
gk_TCBAEL_Link
[in] | pevent | Pointer to the ECB |
[in] | ptcb | Ponter to the TCB |
Definition at line 1284 of file listfunctions.c.
Returns the pointer to the SCB associated to a task, NULL otherwise.
gk_TCBASL_GetSCB
[in] | ptcb | Pointer to the TCB |
[in] | SignalType | Signal type to search in the associated signal list of the TCB |
Definition at line 2709 of file listfunctions.c.
Links SCB to TCB Associated Signal List.
gk_TCBASL_Link
[in] | ptcb | Pointer to the TCB |
[in] | psignal | Pointer to the SCB |
Definition at line 1346 of file listfunctions.c.
Unlinks SCB from a TCB Associated Signal List.
gk_TCBASL_Unlink
[in] | ptcb | Pointer to the TCB of the task |
[in] | psignal | Pointer to the SCB of the signal |
Definition at line 1411 of file listfunctions.c.
Links a TCB to the Free TCB List removing associated and pending SCBs and ECBs.
gk_TCBFL_Link
[in] | ptcb | Pointer to the TCB |
TCBs linked list for debugging
freed the structure
Definition at line 1504 of file listfunctions.c.
Return G_TRUE if current priority of ptct1 is greater than the current priority of ptcb2, otherwise returns G_FALSE.
gk_TCBLowerPriorityThanTCB
[in] | ptcb1 | Pointer to the TCB of task 1 |
[in] | ptcb2 | Pointer to the TCB of task 2 |
Definition at line 2307 of file listfunctions.c.
Returns pointer to the SCB in te TCBPSL.
gk_TCBPSL_GetSCB
[in] | ptcb | Pointer to the TCB |
[in] | SignalType | Type of the signal to search in the TCB |
Definition at line 2615 of file listfunctions.c.
Link a SCB to TCB Pending Signal List.
gk_TCBPSL_Link
[in] | ptcb | Pointer to the TCB |
[in] | psignal | Pointer to the SCB |
Definition at line 1543 of file listfunctions.c.
Links the TCB in the Ready Task List sorted by its priority.
gk_TCBRDYL_Link
[in] | ptcb | Pointer to the TCB |
If there exist a free processor, then trigger its interrupt
Definition at line 1653 of file listfunctions.c.
Unlinks the TCB from the Ready Task List.
gk_TCBRDYL_Unlink
[in] | ptcb | Pointer to the TCB |
Definition at line 1740 of file listfunctions.c.
Links the TCB to the Run Task List.
gk_TCBRUNL_Link
[in] | ptcb | Pointer to the TCB |
Definition at line 1786 of file listfunctions.c.
Unlinks TCB from Running List.
gk_TCBRUNL_Unlink
[in] | ptcb | Pointer to the TCB |
Stop the processor executing running task triggering its interrupt
Definition at line 1915 of file listfunctions.c.
Links a TCB in the waiting list.
gk_TCBWL_Link
[in] | ptcb | Pointer to the TCB of the task |
[in] | state | Type of the waiting state |
Definition at line 1990 of file listfunctions.c.
Unlinks the TCB from the waiting list.
gk_TCBWL_Unlink
[in] | ptcb | Pointer to the TCB |
Definition at line 2020 of file listfunctions.c.
|
related |
Configures system to execute next pending signal. Call from switch routine.
GRTOS_Task_GetPendingSCB
Definition at line 835 of file grtos_kernel.c.
|
related |
Return a pointer to a TCB for a new task.
gu_GetTask
[in] | TaskCode | Pointer to the beginning of the task code |
[in] | p_arg | Pointer to the argument of the first call |
[in] | StkBotton | Botton of the Stack of the Task |
[in] | StkSize | Size of the stack in words |
Task is created but has to be activated with gu_StartTaskwithOffset
Definition at line 393 of file grtosuserfunctions.c.
|
related |
Set if task should be aborted when misses a deadline.
gu_SetTaskAbortwhenDeadline
[in] | ptcb | Pointer to the TCB of the task |
[in] | abort_when_deadline | G_TRUE when task should be aborted when deadline is missed, G_FALSE otherwise |
Definition at line 372 of file grtosuserfunctions.c.
|
related |
Set the deadline of the task for the next invocation.
gu_SetTaskDeadline
[in] | ptcb | Pointer to the TCB of the task |
[in] | hours | Hours of the deadline |
[in] | minutes | Minutes of the deadline |
[in] | seconds | Seconds of the deadline |
[in] | ms | miliseconds for the deadline |
The current deadline remains. The new deadline is considered for the next invocation.
Definition at line 255 of file grtosuserfunctions.c.
Set the list of a task.
gu_SetTaskList
[in] | ptcb | Pointer to the TCB of the task |
[in] | plcb | Pointer to the CB of the list |
Check if index is valid
Unlinks from current list and link to the new link accordingly.
Definition at line 198 of file grtosuserfunctions.c.
|
related |
Set the task period for the next invocation.
gu_SetTaskPeriod
[in] | ptcb | Pointer to the TCB of the task |
[in] | hours | Hours of the period |
[in] | minutes | Minutes of the period |
[in] | seconds | Seconds of the period |
[in] | ms | miliseconds for the period |
The current period remains. The new period is considered for the next invocation
Definition at line 283 of file grtosuserfunctions.c.
Set the ready priority of a task.
gu_SetTaskReadyPriority
[in] | ptcb | Pointer to the TCB of the task |
[in] | priority | Priority to assing |
Unlink and link if task is ready
Put priority as level and priority
Definition at line 216 of file grtosuserfunctions.c.
Set the run priority of a task.
gu_SetTaskRunPriority
[in] | ptcb | Pointer to the TCB of the task |
[in] | priority | Priority to assing |
Unlink and link if task is running
Put priority as level and priority
Definition at line 234 of file grtosuserfunctions.c.
Set the type of a task.
gu_SetTaskType
[in] | ptcb | Pointer to the TCB of the task |
[in] | type | Type of task to assign |
Definition at line 180 of file grtosuserfunctions.c.
|
related |
Activates the execution of a task. An offset can be configured.
gu_StartTaskwithOffset
[in] | ptcb | Pointer to the TCB of the task |
[in] | hours | Hours of the offset |
[in] | minutes | Minutes of the offset |
[in] | seconds | Seconds of the offset |
[in] | ms | miliseconds for the offset |
Include start of a ISR
Include start of an IDLE task??
Definition at line 311 of file grtosuserfunctions.c.
Return G_TRUE if task is waiting for a resource, G_FALSE otherwise.
gu_TASK_IS_BLOCKED
[in] | ptcb | Pointer to the TCB of the task |
Definition at line 532 of file grtosuserfunctions.c.
The task is eliminated and all the structures involved are return to the free lists.
gu_TASK_Kill
[in] | ptcb | Pointer to the TCB of the task to be killed |
Definition at line 498 of file grtosuserfunctions.c.
Resume a task that it is in waiting state.
gu_TASK_RESUME
[in] | ptcb | Pointer to the TCB of the task to be resumed |
Definition at line 550 of file grtosuserfunctions.c.
Sleeps the current task the interval specified.
gu_TASK_Sleep
[in] | hours | Hours to sleep |
[in] | minutes | Minutes to sleep |
[in] | seconds | Seconds to sleep |
[in] | ms | miliseconds to sleep |
Definition at line 430 of file grtosuserfunctions.c.
Set event to sleep the current task for a certain number of clock ticks.
gu_TASK_Sleep_Time
[in] | ticks | Number of clock ticks to sleep the task |
It is executed in user mode and gu_TASK_Sleep should be used instead
Definition at line 457 of file grtosuserfunctions.c.
Change to waiting the state of a task.
gu_TASK_SUSPEND
[in] | ptcb | Pointer to the TCB of the task to suspend |
Definition at line 515 of file grtosuserfunctions.c.
|
related |
Creates a TCB and returns its pointer Returns a pointer to a Free TCB, NULL if it is not a TCB available.
gk_TCB_GetFree
INITIALIZE THE TCB STRUCTURE
TCBs linked list for debugging
Definition at line 32 of file gemrtos_core.c.