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.

Bios 5 - stack during TSK_delete

Hello expert,

I'm straggling on this problem for the last days. I'm working on Bios 5.42.1.09 on the C55. 

Some of my bios tasks are ad-hoc tasks, which created and deleted on run time via TSK_create and TSK_delete API.  The creation and deletion of these tasks are made by another manager task. The problem is that whenever I call the TSK_delete, the manager task hang on pending. I tried to assembly debug  the TSK_delete and found that it doesn't return from the lock2 function. I found in the forum that lock2 is pending on the MEM_mutex, but I don't  know why it locked.

/*

 *  ======== lock2 ========
 */
static Void lock2(Void)
{
    if (TSK_isTSK()) {
        LCK_pend(&_MEM_mutex, SYS_FOREVER);
    }
    else {
    SYS_abort("*** MEM lock NOT CALLED IN TSK CONTEXT");
    }
}

Is there any option to see the status of the _MEM_mutex and to find out who is responsible for the mem locking?

Thanks

Yossi.

  • Hi Yossi
    We missed this forum post , is this still open?
    I am moving this to TI RTOS forums for additional support from BIOS experts.
    Regards
    Mukul
  • Hi Yossi,

    It looks like one of the other tasks is acquiring the memory lock and then probably getting preempted. In order to determine which task is acquiring the lock, you can try the following experiment:

    Get the "lck.c" file from here and include it in your project. This will allow you to have your own version of LCK_pend and LCK_post APIs. Now, you can add some log prints in the LCK_pend() function to determine which task is acquiring the lock.

    Best,

    Ashish