Keil Logo Arm Logo

Task Management

RTX166 Tiny implements a state machine to manage task scheduling. Each RTX166 Tiny task is always in exactly one state which tells the disposition of the task. The following diagram shows how tasks move from one state to another.

 

State Description
Running The task that is currently running is in the Running State. Only one task at a time may be in this state. The os_running_task_id routine returns the task number of the currently executing task.
Ready Tasks which are ready to run are in the Ready State. Once the Running task has completed processing and the MCU can begin running another task, RTX166 Tiny selects and starts the next Ready task.
Waiting Tasks which are waiting for an event are in the Waiting State. Once the event occurs, the task is switched to the Ready State. The os_wait function is used to place a task in the Waiting State.
Deleted Tasks which have not been started or tasks which have been deleted are in the Deleted State. The os_delete_task routine places a task that has been started (with os_create_task) into the Deleted State.
Timeout Tasks which were interrupted by a Round-Robin Time-Out are in the Timeout State. This state is equivalent to the Ready State.

Keil logo

Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.