I will start out by an overview of our DSPLink setup. Initially, our setup consisted of a single POOL and two tasks/MSGQs on the ARM and DSP side, one with a lower priority than the other. Recently, we decided to add in a third DSPLink task and MSGQ pair. Now there are three local ARM and DSP MSGQ, managed by low, medium and high priority tasks. We followed the same procedure in adding the second task for the new third task and everything ran perfectly. However, upon shutting down ( we kill the tasks from lowest to highest priority ) the lowest priority task would terminate, but it would lockup the medium priority task.
Once we signal the lower task to shutdown, it executes its own TSKMESSAGE_delete (TSKMESSAGE_TransferInfo * info), and MSGQ_close() closes the proper MSGQ. The problem arises when we execute the MEM_free() to free the info structure ( line shown below ). Upon freeing the lowest priority TSKMESSAGE_TransferInfo, the medium priority task dies abruptly on the DSP side and locks up on the following line on the ARM side: MSGQ_get (SampleGppMsgqMed, WAIT_FOREVER, &msg).
Now, if we comment out the MEM_free() call ONLY from the lowest priority task everything shutdown properly without any hiccups. We conducted some memory tests and the MEM_free call is pointing to the proper info structure. Why does freeing the lowest priority task TSKMESSAGE_TransferInfo structure lockup/kill the medium priority task? If anyone could shed some light this we would highly appreciate it.
MEM_free (DSPLINK_SEGID,info,sizeof (TSKMESSAGE_TransferInfo)) ;
Note: We are using BIOS 5.33.05 / DSPLink 1.65.00.03 on the OMAP-L138 with Linux on the ARM Core.
Thank you very much,
Arya B.