Down interruptible
Hello all
why rt_sem_p does not have behaviour like down_interruptible (that receive a signal while being blocked on a semaphore to give up the "down"/"p" operation).Is that a bad design?sem_wait (posix skin)have behaviour like that.
In what situation we must use posix skin?
In what situation we must use native skin?
thx
Signature · 1 line
Iwan Budi Kusnanto
Quoted 5 lines · Iwan Budi Kusnanto
Hello all
whyrt_sem_pdoes not have behaviour likedown_interruptible(that receive a signal while being blocked on a semaphore to give up the "down"/"p" operation).Is that a bad design?sem_wait(posix skin)have behaviour like that.
rt_sem_p() does have the desired property. If you observed anything different in practice, it would be a bug and we would be happy to hear more details (used versions, testcase code, etc.).
Just note that signal delivery breaks the determinism of the target application.
Quoted 3 lines
In what situation we must use posix skin?
In what situation we must use native skin?
There are no technical reasons to pick any of them, it's purely a design question of your application (/me being in hurry and can't go into details ATM).
Jan
Quoted 5 lines · Iwan Budi Kusnanto
Hello all
whyrt_sem_pdoes not have behaviour likedown_interruptible(that receive a signal while being blocked on a semaphore to give up the "down"/"p" operation).Is that a bad design?sem_wait(posix skin)have behaviour like that.
rt_sem_p automatically switches the pending thread to secondary mode upon signal receipt, so that it can process this signal from a regular Linux context, then -EINTR is returned to the caller.
Quoted 4 lines
In what situation we must use posix skin?
In what situation we must use native skin?
The native skin resembles traditional RTOS interfaces; if you know about VxWorks, VRTX, pSOS and the like, it should sound familiar. OTOH, choosing the POSIX interface has the advantage of keeping all options open to move away from Xenomai, since it aims at conforming to the opengroup's specs.
Quoted 3 lines
thx
Signature · 1 line
Philippe.