Resource sem issue
steve at stellartec.com
Thu Oct 28 06:55:28 CEST 2004
Hey all. I'm using the latest vesuvio with 184.108.40.206 and adeos. I'm not using
lxrt or xenomai. I'm using the old fashioned stuff with maximum determinism.
Anyway, my problem is this. I have two threads accessing a piece of hardware
via a resource semaphore which I init with rt_typed_sem_init(&sem, 1,
I have several functions that can be called that need this resource, so
sometimes multiple rt_sem_wait calls are issued on the same semaphore.
However, it appears that the nesting is not workign correctly. I have
confirmed I am making only 2 rt_sem_waits and 2 rt_sem_signals on a
semaphore, but resource protection is not occuring. I have to add 3
rt_sem_wait calls to the start of a function to make the thread hang. It
should only take one.
I am using rt_sem_wait_if to get the semaphore, and I'm sleeping for the
system tick time (125 uS) if I don't get it within 15 ticks, I assume
something is wrong and timeout.
Is there any reason this should not work?
This used to work with the previous magma tree.
If I just use a regular rt_sem_wait call, it behaves correctly.
More information about the Rtai