MicroC Task: Reactive Component with associated interface, data and functionality, defined as an Activity sub-type. A “MicroC TASK” might be defined as a TASK in the environment, thus running on its own, like in OSEK, or might be plugged into existing time slice (also called TASK), using the OSI “Link with Scheduler” mechanism. MicroC Tasks run independent of each other. According to the environment, a TASK run might be interrupted and preempt by a higher priority TASK, or an interrupt.
MicroC recognizes two Task running modes 2,3:
1. RUN_TO_TERMINATE: That MicroC Task will run, once entered the function frame, until it has stabilized, and then will leave the function frame (return, terminate, etc.)
2. RUN_TO_WAIT_EVENT: That MicroC Task will run, once entered the function frame, and will never leave 2 the function frame. It will be active until it has stabilized, i.e., it finished its calculation, and then it will enter a rescheduling call defined as “Wait for Event”/”Wait for Multiple Events”.
Note: Use the Data Dictionary->Design Attributes-> Use Active Bit flag.Actual implementation details of TASK/ISR is defined in the OSI.
●
Some of the OSIs (for example, the mainloop_sc) might support only a subset of those.
●
There is a mode, named “Use Active Bit” that allows further control and actually enables even such Tasks to sometimes return/terminate.