I have an application where I use a LCK object to synchronize access to a shared memory object. Generally I have paired pend and post operations. I understand that I can have multiple pend operations in the same task as long as I have an equivalent number of posts. What happens when I have more posts than pends. In other words:
LCK_pend(lock, 1000)
< --- Do Something --->
LCK_post(lock);
<- --- do something --->
LCK_post(lock);
From what I can see in my code, it seems to put the LCK object in a weird state and continually blocks any access to the lock.
I'm using DSP/BIOS 5.32. Has anyone encountered this? Can anyone confirm this behavior? Other than switching to a semaphore, is there any way that I can check the state of the LCK prior to calling post?
Thanks,
~C