AnsweredAssumed Answered

experiencing problem with VDK::PendSemaphore()

Question asked by AsifHabib on May 23, 2011
Latest reply on May 30, 2011 by AsifHabib
Branched to a new discussion

Hi,

 

I have a thread which "pends" on multiple semaphores sequentially, which are being posted from "callbacks". First few semaphores pend successfully, where as the remaining semaphores return false and do not pend. The scenario is shown below:

 

 

 

thread::Run()

{

 

 

     while(1)

     {

          VDK::PendSemaphore(Sem1, 0);

          //This pends successfully and thread resumes after semaphore posted from callback

 

 

          VDK::PendSemaphore(Sem2, 0);

          //This pends successfully and thread resumes after semaphore posted  from callback

 

 

          VDK::PendSemaphore(Sem3, 0);

          //This does not pend and returns false

 

 

          VDK::PendSemaphore(Sem4, 0);

          //This also does not pend and returns false

     }

 

 

}

 

 

what could be the reason for this ambiguos behaviour? Any clues?

 

 

Best Regards,

Asif

Outcomes