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.

DSPLINK multithread problem( omapl138 wince6 platform)

Other Parts Discussed in Thread: OMAPL138

Hi ,

When I apply DSPLINK in multithread environment under omapl138 wince6 platform , some ERROR happened , I don't know if DSPBIOS can be used this way.

The senerio is as the following.

all the code derives from DSPLINK Loop Sample

In gpp side there are 3 threads ( task_Monitor  , task_gpp2dsp , task_dsp2gpp ) ,

task_Monitor is main thread . It's peusdo code is

task_Monitor()  {

    PROC_setup();

    PROC_attach();

    POOL_open();

    CHNL_create(); CHNL_allocateBuffer()   //   for output

    CHNL_create(); CHNL_allocateBuffer()   //   for input

}

task_gpp2dsp is used to send data to dspside  It's peusdo code is

task_gpp2dsp()  {

while(1) {

    CHNL_issue();CHNL_reclaim

    Sleep();

}

}

task_dsp2gpp thread is similar to task_gpp2dsp thread.

When execute the program , the serial port show the error "Assertion failed (PMGR_CHNL_IsOwner (procId, chnlId, optArgs)). File : pmgr_chnl.c Line : 456"

Can anyone tell me how to solve the problem

  • Hello The function PMGR_CHNL_IsOwner checks that the thread that does CHNL_issue is the same as the thread that does CHNL_create. On WinCE, PMGR_CHNL_IsOwner checks that the thread id using GetCurrentThreadId and process id using GetCallerVMProcessId is identical. Since the above code snippet is failing the calling convention ofCHNL_issue, you are seeing the assertion.

    You need to create the CHNL in the same thread that is doing an issue.

    Deepali