Tasks
4-42
equals TSK_MAXPRI, the task execution effectively locks out all other
program activity except for the handling of hardware interrupts and software
interrupts.
During the course of a program, each task’s mode of execution can change
for a number of reasons. Figure 4-11 shows how execution modes change.
Figure 4-11.
Execution Mode Variations
Functions in the TSK, SEM, and SIO modules alter the execution state of task
objects: blocking or terminating the currently running task, readying a
previously suspended task, re-scheduling the current task, and so forth.
There is
one
task whose execution mode is TSK_RUNNING. If all program
tasks are blocked and no hardware or software interrupt is running, TSK
executes the TSK_idle task, whose priority is lower than all other tasks in the
system. When a task is preempted by a software or hardware interrupt, the
task execution mode returned for that task by TSK_stat is still
TSK_RUNNING because the task will run when the preemption ends.
Note:
Do not make blocking calls, such as SEM_pend or TSK_sleep, from within
an IDL function. Doing so prevents DSP/BIOS Analysis Tools from
gathering run-time information.
When the TSK_RUNNING task transitions to any of the other three states,
control switches to the highest-priority task that is ready to run (that is, whose
mode is TSK_READY). A TSK_RUNNING task transitions to one of the other
modes in the following ways:
TSK_TERMINATED
TSK_create()
task is created
TSK_BLOCKED
TSK_READY
TSK_yield(),
preemption
TSK_tick(),
SEM_post()
task is readied
TSK_RUNNING
task suspends
TSK_sleep(),...
SEM_pend(),...
task exits
TSK_exit()
TSK_delete()
task is deleted
TSK_delete()
task is deleted
Содержание TMS320 Series
Страница 1: ...TMS320 DSP BIOS v5 40 User s Guide Literature Number SPRU423G April 2009 ...
Страница 16: ...xvi ...
Страница 152: ...Tasks 4 48 Figure 4 12 Trace from Example 4 7 ...
Страница 168: ...Semaphores 4 64 Figure 4 14 Trace Results from Example 4 11 ...
Страница 202: ...5 20 ...
Страница 287: ...Index 9 Index Void 1 11 W words data memory 3 15 of code 1 5 wrapper function 2 29 ...
Страница 288: ...Index 10 Index ...