4.1 Task Management Functions
Task management functions are functions that directly manipulate or reference task states. Functions are provided for creating and deleting a task, for task starting and exit, canceling a task start request, changing task priority, and referencing task state. A task is an object identi.ed by an ID number called a task ID. Task states and scheduling rules are explained at 2.2.
For control of execution order, a task has a base priority and current priority. When simply “task priority” is talked about, this means the current priority. The base priority of a task is initialized as the startup priority when a task is started. If the mutex function is not used, the task current priority is always identical to its base priority. For this reason, the current priority immediately after a task is started is the task startup priority. When the mutex function is used, the current priority is set as discussed at 4.5.1.
The kernel does not perform processing for freeing of resources acquired by a task (semaphore resources, memory blocks, etc.) upon task exit, other than mutex unlocking. Freeing of task resources is the responsibility of the application.

Comments