Component: Tasks

Macro name

CYGPKG_UITRON_TASKS

Type

Dummy

Description

µITRON Tasks are the basic blocks of multi-tasking in the µITRON world; they are threads or lightweight processes, sharing the address space and the CPU. They communicate using the primitives outlined above. Each has a stack, an entry point (a C or C++ function), and (where appropriate) a scheduling priority.

Option: Number of tasks

Macro name

CYGNUM_UITRON_TASKS

Type

Count

Description

The number of µITRON tasks present in the system. Valid task object IDs will range from 1 to this value.

Option: Start tasks

Macro name

CYGNUM_UITRON_START_TASKS

Type

Count

Description

The number of µITRON tasks to start automatically. Tasks from 1 to this value will be started at the beginning of application execution. A value of zero here means to start them all. Tasks started in this way have a start code of zero, as if they were started by sta_tsk(i,0). If create and delete operations are supported, this number should be no greater than the number of tasks created initially.

Component: Support create and delete

Macro name

CYGPKG_UITRON_TASKS_CREATE_DELETE

Type

Boolean

Description

Support task create and delete operations (cre_tsk, del_tsk). Otherwise all tasks are created, up to the number specified above.

Option: Number of tasks created initially

Macro name

CYGNUM_UITRON_TASKS_INITIALLY

Type

Count

Description

The number of µITRON tasks initially created. This number should not be more than the number of tasks in the system, though setting it to a large value to mean 'all' is acceptable. Initially, only tasks numbered 1 to this number exist; higher numbered ones must be created before use.

Option: Default stack size

Macro name

CYGNUM_UITRON_STACK_SIZE

Type

Count

Description

Define a default stack size for µITRON tasks, for use in the initialization options below.

Option: Externs for initialization

Macro name

CYGDAT_UITRON_TASK_EXTERNS

Type

Multiline

Description

Task initializers may refer to external objects such as memory for stack or functions to call. Use this option to define or declare any external objects needed by the task static initializer below. Example: create some memory for a stack using 'static char stack1[CYGNUM_UITRON_STACK_SIZE];' to set up a chunk of memory of the default stack size. Note: this option is invoked in the 'outermost' context of C++ source, where global/static objects are created; it should contain valid, self-contained, C++ source.

Option: Static initializers

Macro name

CYGDAT_UITRON_TASK_INITIALIZERS

Type

Multiline

Description

Tasks must be statically initialized: enter a list of initializers separated by commas, one per line. An initializer is 'CYG_UIT_TASK(NAME,PRIO,FUNC,STACK,SIZE)' where name is a quoted string to name the task, prio is the initial priority of the task, func is the name of the entry point, stack is the address of the task's stack, and size is the size of the task's stack. When create and delete operations are supported, 'CYG_UIT_TASK_NOEXS(NAME,STACK,SIZE)' should be used for tasks which are not initially created, in order to tell the system what memory to use for stacks when these tasks are created later on. Using 'CYGNUM_UITRON_STACK_SIZE' for size is recommended, to use the option defined above, so long as that truly is the size of your stack(s). Note: this option is invoked in the context of a C++ array initializer, between curly brackets. Ensure that the number of initializers here exactly matches the number of tasks specified.