Resource sem issue

Paolo Mantegazza mantegazza at
Fri Oct 29 18:22:38 CEST 2004

Steven Seeger wrote:
>  Ok fellas. 
> I have two threads and a resource semaphore. One thread locks the semaphore
> with an rt_sem_wait() and then sleeps for 500 ms, and then releases it. The
> other thread runs every 40 ms and tries to get the semaphore with
> rt_sem_wait_if.
> I call rt_sem_wait_if 3 times each time that thread runs, and print the
> result. I then signal the sem 3 times and wait for its period.

Do you signal the sem even if you do not own it yet? It acts in fast 
mode always and there is no check whatsoever.


More information about the Rtai mailing list