
2. TASK CONTROL FUNCTION
B–61863E–1/06
PMC CONTROL SOFTWARE
60
The PMC control software provides many system calls to perform task
management, intertask synchronization, exclusive control, intertask
communication, and so forth.
Each task has a specific task ID and task priority. The task ID is a value
from 10 to 39 (10 to 41 for C language function of the 16i/18i/21i/15i–A)
that must be uniquely assigned to tasks. Task priorities range from 10 to
99, where 10 is the highest priority, and 99 is the lowest.
Tasks of equal priority are scheduled (queued) on a FIFO (first-in
first-out) basis.
Function name Description
os_chng_pri Changes task priority.
os_curr_tsk Posts the task ID of the task being performed.
D os_chng_pri changes the task priority dynamically within the range
from 10 to 99.
When there are tasks of equal priority, task ID = 0 and task priority
= 0 can be specified for the task being performed in order to attach
the task to the end of the task queue for the task’s priority.
D os_curr_tsk posts the task ID of the task being performed. This can
be used when a task needs to recognize its own ID in a common
function.
Execution right can be relinquished for a certain time during task
execution, or an event can be awaited for a limited time to avoid a
deadlock.
For PMC applications, a local timer that can be accessed by each task is
used. The timer counts in units of 8 ms.
Function name Description
os_set_tim Sets a timer value.
os_show_tim Reads a timer value.
os_sync_tim Places a task in the wait state until a specified time is reached.
os_wait_tim Places a task in the wait state for a specified time.
D os_set_tim sets a timer value for a task being performed. For other
tasks, their timer values cannot be changed.
D os_show_tim reads the timer value for a task.
D With os_sync_tim, a task can be placed in the wait state until the
timer indicates a certain time. (Wait for absolute time)
D os_wait_tim places a task in the wait state for a specified time
counted from the current time, which is similar to a wait for a
time-out condition. (Wait for relative time)
2.6
SYSTEM CALL
2.6.1
Task Management
2.6.2
Timer Management