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.

Semaphore_Create get hangs

hi

i was trying to implement semaphore on c6678 proceesor,

i wrote below code , just to create semaphore , but core 3 get hangs and dont give configuration respons

 521 //        Error_Block eic_sem_eb;
 522 //        Error_init(&eic_sem_eb);
 523 //        Semaphore_Params eic_sem_param;
 524 //        Semaphore_Params_init(&eic_sem_param);
 525 //        eic_sem_param.mode = Semaphore_Mode_BINARY;
 526 //        /* Syncronisation Semaphore betwen encoder and decoder in case of transcoder */
 527         if(DNUM == 3 &&transcoderEnable && !eic_sem)
 528         {
 529             eic_sem = Semaphore_create(0,NULL,NULL);
 530         }

i tried with eic_sem_param and eic_sem_eb  but result is same.

q1> Is it normal Behaviour.

thanks

Anshul

  • Hi Anshul,

    Do you want a semaphore which is shared among multiple cores?  I mean, core A posts a semaphore and core B pends the semaphore.

    If yes, to my best knowledge, the BIOS Semaphore does not work for the purpose.  My understanding is BIOS Semaphore is designed to share among multiple tasks which run in one core.

    To realize multicore semaphores, hardware semaphore module can be used.  The http://www.ti.com/litv/pdf/sprugs3a covers the topic.

    If you need a software library and a sample code, they are distributed as MCSDK CSL (http://www.ti.com/tool/bioslinuxmcsdk).  BIOSMCSDK-C66X is for C6678.  In the distribution, there is a sample code in pdk_C6678_1_1_2_5/packages/ti/csl/example/sem2 .

    I hope it helps.

    Regards,
    Atsushi