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.

TCI 6616 simulator with binary semaphore

Hi

I am using ccsv5 and sys bios6 with TCI6616sim.

I am creating a mutex with semaphore count as 1.Semaphore_create(1, NULL, NULL))

This particular mutex I am taking and giving multiple times in Semaphore_pend and Semaphore_post with BIOS_wait forever mode.

After 5 or 6 such successful take/give, its getting hung on semaphore pend call. Even though just before that the mutex is unlocked.

Please help me to solve this.

regards

Soumya

  • What version of BIOS are you on?

    You can use ROV or KOV depending on what version of BIOS you are on to view the state of the Tasks and Semaphore.

    My best guess is you did one less Semaphore_post() than you expected.  Even though a mutex maybe unlocked, if another task grabbed it because of an interrupt or something like that, it could become locked again.

    Judah