Signals in GeMRTOS #
Signals in operating systems handle exceptional conditions that may happen during runtime. Signals allow tasks to execute associated code when a certain condition takes place. Some of these conditions may be defined, for instance, as when a task is created, a resource is granted or a task is blocked. In GeMRTOS, the GS_SCB data structure is defined to store the signal information and it is linked to data structures accordingly. The GS_SCB data structure points to the code to be executed when the condition of the signal occurs. This code is executed prior to the execution of the code of the task with which the signal is associated. In GeMRTOS, there exist different signal types.
- Todo:
- Define the rest of SCB types
Types of GeMRTOS scheduling lists #
The following are the type of signals in GeMRTOS, but more can be defined:
scbtype
Main signal related functions #
Creating and initializing a signal #
GS_SCB *gu_signal_create(enum scbtype Type, G_INT32 Priority, void *pxcb, void *Signal_Code, void *Signal_Arg);
The gu_signal_create function creates and associates a type signal to a task. The priority given to the signal created determines the execution order when there exist more than a signal code to be executed.
gu_signal_create
The signal is created with the following parameters:
Name Description Type It is the signal type to be associated with. It is the name of the signal type, for instance: G_SCBType_TCB_ABORTED. Priority It is the priority given to the signal create and determines the execution order when more than one signal code has to be executed. pxcb It is the control structure to link the signal created. This control structure may be resources, processors, tasks, or events. Signal_Code It is a pointer to the function that imlpements the signal code: i.e. the function name of the signal. Signal_Arg It is the argument to pass to the signal function when it is executed.