GeMRTOS
|
GRTOS Kernal functions. More...
Go to the source code of this file.
GRTOS Kernal functions.
This file contains the Kernal functions.
Definition in file grtos_kernel.c.
void gk_ENTRY_BAD_TASK_RETURN | ( | void | ) |
BAD RETURN FUNCTION IN TASK STACK.
gk_ENTRY_BAD_TASK_RETURN
THIS IS THE RETURN ADDRESS WHEN A BAD RETURN IS EXECUTED IN A TASK SWITCH
Definition at line 294 of file grtos_kernel.c.
void gk_ENTRY_IRQ_HANDLER | ( | void | ) |
Executes the ISR of GRTOS.
gk_ENTRY_IRQ_HANDLER
This routine is executed each time processor is interrupted
Disable processor interrupt
Remove pending interrupt of current processor
Get into critical section
An External IRQ happened: IRQ = event_code, IRQ index = event_code - 1
Definition at line 186 of file grtos_kernel.c.
void gk_ENTRY_SIGNAL_RETURN | ( | void | ) |
Return from Signal:
gk_ENTRY_SIGNAL_RETURN
Get critical section and return to GRTOS_Return_from_Signal in grtos_switch.S file
Get into critical section
Definition at line 308 of file grtos_kernel.c.
void gk_INIT_KERNEL | ( | void | ) |
Routine execute BEFORE the main() function, ONLY by PROCESSOR 1.
gk_INIT_KERNEL
Processors with ID different from 1 start in different reset vector. The gk_START_KERNEL() function is executed AFTER the main() function Initialises all the structures to start the GRTOS
Modify to allow executing with normal drivers instead of reduced ones
use alt_dcache_flush_all(); after mutex to flush cache
INITIALIZE THE KCB STRUCTURE
Init GLOBAL VARIABLES (used in grtos_switch.S code)
INITIALIZE THE TIMED EVENT LIST
Set the Next Occurence time equal to G_LATEST_TIME (is g_kcb.KCB_NextECBTL->ECBValue.i64)
Link an ECB with the latest time
Initialize Processor Structures creating IDLE TCBs
!!! Set error NO_FREE_GS_TCB
Definition at line 552 of file grtos_kernel.c.
void gk_KERNEL_TASK_COMPLETE | ( | void | ) |
This function is executed when a task finishes its execution.
gk_KERNEL_TASK_COMPLETE
Enter in Critial Section
Restore TCB to waiting list
If task is an ISR, then enable it for next request
Get the Next Priority to run in the current processor
Definition at line 411 of file grtos_kernel.c.
void gk_KERNEL_TASK_START | ( | void | ) |
Start the execution of the tasks of the system.
gk_KERNEL_TASK_START
Get the Next TCB to run in the current processor
Change State to Running
Definition at line 352 of file grtos_kernel.c.
void gk_KERNEL_TASK_SUSPEND | ( | GS_TCB * | ptcb | ) |
Suspends the execution of the task pointed by ptcb.
gk_KERNEL_TASK_SUSPEND
[in] | ptcb | POinter to the TCB of the task to suspend |
Stop the processor triggering its interrupt
Definition at line 470 of file grtos_kernel.c.
void gk_KERNEL_TASK_SUSPEND_CURRENT | ( | void | ) |
Suspends the execution of the current task and switch to Highest Priority Task.
gk_KERNEL_TASK_SUSPEND_CURRENT
Definition at line 502 of file grtos_kernel.c.
|
related |
GRTOS RESET FUNCTIONS FOR NOT ID=1 PROCESSORS.
gk_ENTRY_RST_HANDLER
This is executed when processor with ID != 1 are reset. A different stack is assigned to each processor in the grtos_start_rest_of_processors function in the rstaux section
Called from grtos_start_rest_of_processors
Disable processor interrupt
Disable the interrupts
Enter in Critial Section
Include the processor in the GRTOS
Definition at line 39 of file grtos_kernel.c.