Skip to contentSkip to conversation

Down interruptible

Xenomai-help Iwan Budi Kusnanto 3 participants 3 messages Sep 3, 2007

lore
Share & tools
lore
#0 lore raw

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
#1 lore raw
Quoted 5 lines · Iwan Budi Kusnanto

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.

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

#2 lore raw
In reply to Iwan Budi Kusnanto
Quoted 5 lines · Iwan Budi Kusnanto

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.

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.