GeMRTOS
|
GEmRTOS CORE definitions. More...
Go to the source code of this file.
Data Structures | |
union | timepriority |
struct | gs_tm |
struct | gs_ext_isr |
struct | gs_ecb |
GS_ECB Event Control Block structure. More... | |
struct | gs_kcb |
GS_KCB Kernel Control Block structure. More... | |
struct | gs_lcb |
GS_LCB List Control Block. More... | |
struct | gs_pcb |
GS_PCB Processor Control Block. More... | |
struct | T_MESSAGE_RESOURCE |
struct | gs_mcb |
struct | g_rgb |
G_RCB Resource Request Data Structure. More... | |
struct | gs_rrds |
GS_RRDS Resource Request Data Structure. More... | |
struct | gs_scb |
GS_SCB Signal Control Block structure. More... | |
struct | gs_tcb |
gs_tcb Task Control Block (TCB) structure More... | |
GEmRTOS CORE definitions.
This file contains the Message queue definitions.
Definition in file gemrtos_core.h.
typedef struct g_rgb G_RCB |
Definition at line 54 of file gemrtos_core.h.
typedef struct gs_ecb GS_ECB |
Definition at line 51 of file gemrtos_core.h.
typedef struct gs_kcb GS_KCB |
Definition at line 47 of file gemrtos_core.h.
typedef struct gs_lcb GS_LCB |
Definition at line 49 of file gemrtos_core.h.
typedef struct gs_mcb GS_MCB |
Definition at line 55 of file gemrtos_core.h.
typedef struct gs_pcb GS_PCB |
Definition at line 48 of file gemrtos_core.h.
typedef struct gs_rrds GS_RRDS |
Definition at line 53 of file gemrtos_core.h.
typedef struct gs_scb GS_SCB |
Definition at line 52 of file gemrtos_core.h.
typedef unsigned int GS_STK |
Definition at line 63 of file gemrtos_core.h.
typedef struct gs_tcb GS_TCB |
Definition at line 50 of file gemrtos_core.h.
typedef unsigned long long gt_priority |
Definition at line 66 of file gemrtos_core.h.
typedef unsigned long long gt_time |
Definition at line 65 of file gemrtos_core.h.
typedef struct gs_tm gt_tm |
typedef unsigned INT32 |
Definition at line 62 of file gemrtos_core.h.
typedef unsigned long long INT64 |
Definition at line 61 of file gemrtos_core.h.
typedef struct g_rgb t_message_resource |
Definition at line 56 of file gemrtos_core.h.
typedef struct g_rgb t_semaphore_resource |
Definition at line 57 of file gemrtos_core.h.
typedef union timepriority TIMEPRIORITY |
|
related |
|
related |
|
related |
|
related |
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.
|
related |
|
related |
G_RCB* gk_Get_RCB | ( | void | ) |
GS_RRDS* gk_Get_RRDS | ( | void | ) |
GS_SCB* gk_Get_SCB | ( | void | ) |
|
related |
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.
|
related |
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 |
|
related |
|
related |
void gk_MONITOR_FIFO_SAMPLE | ( | int | data | ) |
Monitor functions
|
related |
|
related |
void gk_PCBInit | ( | void | ) |
|
related |
|
related |
|
related |
|
related |
|
related |
Links a RRDS to the Free List.
gk_RRDSFL_Link
[in] | prrds | Pointer to the RRDS |
Check the RRDS according structure (queue, semaphore)
Check if RRDS is to ECB or TCB too (I am not sure)
TCBs linked list for debugging
Definition at line 2105 of file listfunctions.c.
void gk_RST_MONITOR_HANDLER | ( | void | ) |
|
related |
|
related |
|
related |
|
related |
GS_TCB* gk_TCB_GetFree | ( | void | ) |
void gk_TCBFL_Init | ( | void | ) |
|
related |
void grtos_irq_entry | ( | void | ) |
void GRTOS_Start_Task | ( | void | ) |
void GRTOS_Suspend_Task | ( | void | ) |
|
related |
User functions for system status and control
|
related |
Function Headers for user usage
|
related |
|
related |
|
related |
|
related |
|
related |
|
related |
|
related |
INT32 gu_get_reserved_mutex_processor | ( | void | ) |
|
related |
Task related functions
INT32 gu_Set_Default_Task_Type | ( | unsigned int | type | ) |
Default setting functions
|
related |
|
related |
|
related |
|
related |
Signal related functions
|
related |
|
related |
FILE* fpuart[G_NUMBER_OF_PCB] |
volatile int G_DEBUG_SAMPLE_BEGIN_ENABLE |
volatile int G_DEBUG_SAMPLE_END_ENABLE |
volatile int G_IRQ_ENABLED |
volatile int G_IRQ_PENDING |
GS_KCB g_kcb |
volatile INT32 G_Running |
volatile INT32 G_SCB_ARG |
volatile INT32 G_SCB_CODE |
volatile INT32 G_SCB_PENDING |
volatile GS_LCB* G_TASK_LCB_DEFAULT |
volatile INT64 G_TASK_PERIOD_DEFAULT |
volatile INT64 G_TASK_PRIORITY_DEFAULT |
volatile INT32 G_TASK_TYPE_DEFAULT |
volatile GS_STK G_TCB_CURRENT |
volatile INT32 GRTOS_InterruptDisableRegisterAddress |
volatile INT32 GRTOS_InterruptEnableRegisterAddress |
volatile INT32 GRTOS_MutexReleaseRegisterAddress |
volatile INT32 GRTOS_MutexRequestRegisterAddress |
volatile int GRTOS_S_PROCESSOR1_IRQ |
volatile void* gs_addressof_G_PCBTbl |
volatile INT32 gs_offsetof_PCB_EXECTCB |
volatile INT32 gs_offsetof_PCB_IDLETCB |
volatile INT32 gs_offsetof_TCB_StackPointer |
volatile INT32 gs_sizeof_G_PCBTbl |
struct T_QUEUE_RESOURCE queue |