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/AM4378: NDK task delete issue

Part Number: AM4378
Other Parts Discussed in Thread: SYSBIOS

Tool/software: TI-RTOS

Hi everyone,

we are using TI RTOS on our custom platform, which works quite well.

We are using as one of the modules NDK which enforces to have Task.deleteTerminatedTasks to be set "true".

So I cannot use manual Task_delete(*Task_Handle hdl).

I can trace, that the priority after task Termination (called Task_exit() ) is set to "0" and the next element pointer and the prev element pointer gets zeroed, but not the handle.

Is that normal behavior? How can I detect, wether the handle, which has been used is free to start the next task on it or not? My Handle is defined as static, because in that Routine, I don't want to start the next task, before the current one has finished.

Thanks to all,

best regards,

Stefan

  • Hi,

    Can you elaborate the SYSBIOS version used? I found the user guide: software-dl.ti.com/.../Task.html

    DETAILS
    If this feature is enabled, an Idle function is installed that deletes dynamically created Tasks that have terminated either by falling through their task function or by explicitly calling Task_exit().
    A list of terminated Tasks that were created dynmically is maintained internally. Each invocation of the installed Idle function deletes the first Task on this list. This one-at-a-time process continues until the list is empty.
    NOTE
    This feature is disabled by default.
    If this feature is enable, the user's application must not also delete terminated tasks or undefined and/or potentially catastrophic behavior will result.

    Regards, Eric
  • Hi Eric,

    thank you very much for the reply.
    The description, you're pointing at, is what I have already found.
    I'm using bios_6_46_01_38.
    My Problem is how I can't proove, that the terminated Task been cleared by the idle function (due to Task.deleteTerminatedTasks = true ).
    Since this function is enabled, I do not do anything but leaving the Task function by falling through or calling Task_exit().
    There is no Task_delete() in use.

    Thanks,
    with best regards,
    Stefan
  • Hi Stefan,

    You can add a Task Delete hook function. So when the task is deleted in the Idle task, your hook function will be called. This will be called for all Task_deletes with the specific task handle that is being deleted. So you'll need to keep track of the task handles you are interesting in and act accordingly.

    Todd