This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How do I make switching between Tasks in RTOS ?



There are a lot of tasks in the project. I want to switch between tasks and put in order the tasks. 

Here is a project:

github.com/.../cc1310_all

  • The TI-RTOS kernel is preemptive. The highest priority thread runs. Hwi (hardware interrupts) are the highest priority thread. Then Swi (software interrupts). Next is tasks and finally idle. Hwi and Swi run to completion. Tasks are preempted by
    - a Hwi
    - a Swi
    - higher priority task
    Additionally a task gives up the processor (context switches to another task) if a blocking call is made (e.g. Task_sleep, Semaphore_pend and the semaphore is not available, etc.).

    There is a Task_yield, but this just yields to a task for the same priority. If there is not another task with the same priority, Task_yield does nothing.

    If you want a time-slicing kernel, there is a write-up in the SYS/BIOS User Guide that details how to make the kernel be time-sliced.

    Todd
  • Please mark this as Verify Answer if you feel you received enough information.