Spawn task function as separate Linux Thread
Embedded Coder Support Package for ARM Cortex-A Processors
The Linux Task block creates a task function that spawns as a separate Linux® thread. The task function runs the code of the downstream Function-Call Subsystem.
Port_1 — Function-call control signal
A function-call control signal that triggers a Function-Call Subsystem (Simulink) block.
Task name (32 characters or less) — Name of thread on Linux
Task0 (default) | name for task
Specify a name for this task. You can enter at most 32 characters consisting of letters, numbers, or a combination of letters and numbers.
Thread scheduling policy — Thread scheduling policy used by Linux
SCHED_FIFO (default) |
Select the scheduling policy to apply to this thread. You can choose one of these options.
SCHED_FIFO— This option enables a first in, first out scheduling algorithm that executes real-time processes without time slicing. With FIFO scheduling, a higher-priority process preempts a lower-priority process. The lower-priority process remains at the top of the list for its priority and resumes execution when the scheduler blocks all higher-priority processes.
For example, in this image, task2 preempts task1, and task3 preempts task2. When task3 completes, task2 resumes. When task2 completes, task1 resumes.
SCHED_FIFO— This option enables the Thread priority parameter on which you can set to a value from 1 to 99.
SCHED_OTHER— This option enables the default Linux time-sharing scheduling algorithm. You can use this scheduling for all processes except those requiring special static priority real-time mechanisms. With this algorithm, the scheduler chooses processes based on their dynamic priority within the static priority 0 list. Each time the process is ready to run and the scheduler denies it, the operating system increases the dynamic priority of that process. Such prioritization helps the scheduler serve the SCHED_OTHER processes.
SCHED_OTHER, hides the Thread priority parameter, and sets the thread priority to 0.
Threaded priority (1 to 99) — Priority of the Linux thread
1 (default) | integer from 1 to 99
Specify the priority of the Linux thread. A value of 1 indicates a low priority, and a value of 99 indicates a high priority. Higher-priority tasks can preempt lower-priority tasks.
To enable this parameter, set Thread scheduling policy to
Introduced in R2014a