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.

RTOS/TM4C129XNCZAD: delete terminated task

Part Number: TM4C129XNCZAD

Tool/software: TI-RTOS

Hello,

I'm using

- CCS  Version: 6.1.0.00104,

- TIRTOS: tirtos_tivac_2_16_01_14, 

- xdctools_3_32_01_22_core

i have some tasks that had been constructed by task_construct, and i wanted to terminate those tasks so i called Task_exit at the end of the task function, my problem is that the ROV is displaying those tasks even i set the following line in my CFG file

Task.deleteTerminatedTasks = true;

so why the terminated tasks didn't deleted? and what happen if i tried to construct those tasks once again, is it going to use the stack and the task object without any problems?

Thanks,

Mohammed Fawzy 

  • Mohammed,
    ROV available in your version of XDCtools and TI-RTOS doesn't really differentiate between constructed task objects and a space that contained or will contain task objects. The configuration property 'deleteTerminatedTasks' only impacts an internal list of terminated tasks.
    As for your second question, I am not sure I understand the question, but yes you can reuse Task_Structure for a new task object and everything is expected to work.
  • Sasha,
    i got confused little bit.
    i will try to be more clear to get my answer.
    my questions are:
    - is it normal to the terminated task to keep viewed in the ROV forever as a terminated task even Task.deleteTerminatedTasks is set to true?
    - if the task is in terminated state, does this mean that the task is deleted from the OS list?

    Thanks,
    Mohammed Fawzy
  • Yes, it's normal for ROV to still display such a task, if the task is constructed (the behavior is different when a task instance is created by calling Task_create). ROV doesn't check if such a task is deleted or not, it just displays the content of the structure that is declared as Task_Structure. In the newer versions of TI-RTOS, ROV could recognize that a structure is not initialized and mark it differently but in the version that you are suing ROV doesn't make that distinction.

    If you set Task.deleteTerminatedTasks to 'true', then terminated tasks are also deleted, which means they are deleted from an internal list, memory is freed, etc. If Task.deleteTerminatedTasks is 'false' then you have to call Task_delete explicitly to delete a Task instance.
  • Yes, it's normal for ROV to still display such a task, if the task is constructed (the behavior is different when a task instance is created by calling Task_create). ROV doesn't check if such a task is deleted or not, it just displays the content of the structure that is declared as Task_Structure. In the newer versions of TI-RTOS, ROV could recognize that a structure is not initialized and mark it differently but in the version that you are suing ROV doesn't make that distinction

    Thank you for the reply, but for my records, which version of the ROV this feature is supported?

  • In SYS/BIOS 6.50, uninitialized objects are detected and tagged with a label that says so. It is available here software-dl.ti.com/.../index.html but a product where SYS/BIOS is bundled with all other software packages for TM4C devices is not available yet. I think there should be something available within a month.