1.3.7. Task management

Each task in the runtime system has a specified logical priority. This priority is separated into the following 8 task segments, each with 31 priorities to categorize tasks:

Usage

Defines

Priority

Task segment 1 For system tasks like scheduler

TASKPRIO_SYSTEM_BASE

0

TASKPRIO_SYSTEM_END

31

Task segment 2 For real time tasks like IEC-tasks

TASKPRIO_REALTIME_BASE

32

TASKPRIO_REALTIME_END

63

Task segment 3

High priority tasks like high prior communication tasks

TASKPRIO_HIGH_BASE

64

TASKPRIO_HIGH_END

95

Task segment 4

Above normal tasks

TASKPRIO_ABOVENORMAL_BASE

96

TASKPRIO_ABOVENORMAL_END

127

Task segment 5

Normal priority tasks like standard communication task

TASKPRIO_NORMAL_BASE

128

TASKPRIO_NORMAL_END

159

Task segment 6

Below normal tasks

TASKPRIO_BELOWNORMAL_BASE

160

TASKPRIO_BELOWNORMAL_END

191

Task segment 7

Low task priorities.

TASKPRIO_LOW_BASE

192

TASKPRIO_LOW_END

223

Task segment 8

Lowest task priorities for background tasks.

TASKPRIO_LOWEST_BASE

224

TASKPRIO_LOWEST_END

TASKPRIO_IDLE

TASKPRIO_MIN

255

So each task priority should be assigned to one of these 8 task segments.

A task can be specified with a special m4-Macro in its component Dep.m4 file. These macros are described in 11. If you specify your task with this macro, the list of used tasks in your system can be generated by the RTS-Configurator. Additionally this entry will exported in the Reference-Documentation by the RTS-Configurator too!.
So if you would like to know, which tasks with which priority are used in the runtime system, please look in the corresponding Reference-Documentation, in the Dep.m4 files for the macros or in the Dep.h files for the categories “Task”, “Task prefix” or “Task placeholder”.