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 starting and exiting a task, canceling a task start request, changing task priority, and referencing task state. A task is an object identified by an ID number called a task ID. Task states and scheduling rules are explained in Section 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 in 4.5.1.

Other than mutex unlocking, the kernel does not perform processing for freeing of resources acquired by a task (semaphore resources, memory blocks, etc.) upon task exit. Freeing of task resources is the responsibility of the application.

[Difference with T-Kernel]

The following system calls do not exist:

  • tk_chg_slt – modifies a task slice time
  • tk_get_tsp – gets the user space
  • tk_set_tsp – sets the user space
  • tk_get_rid – retrieves a resource group belonging to the task
  • tk_set_rid – sets a resource group belonging to the task
  • tk_get_cpr – retrieves the coprocessor register
  • tk_set_cpr – sets the coprocessor register
  • tk_inf_tsk – refers to task statistical data

See the following for more information:

Comments

Click here to Post a Comment