On Sun, Oct 10, 2004 at 08:14:14PM +0200, Philippe Gerum wrote:
> > How does the delivery of linux signals work with fusion thread?
[...]
> > In Fusion, there isn't a ADEOS_SIGNAL_PROCESS handler. Does that mean
> > that all signals are delivered the by the linux-kernel? Does this
> > include a migration from the realtime to linux? If, where?
> Yes. The new implementation since 0.6 ensures that Linux keeps deciding
> for the appropriate actions to take upon a signal that has been received
> for any Linux task, even if it is mapped to a shadow RT thread. This is
> far more robust and preserves the signal semantics for user-space apps.
> The latter was a prerequisite to obtain a decent GDB support for
> real-time threads in user-space because you have to relay the SIGTRAP
> signal properly for this; but not only: as Jan pointed it out recently,
He sent me a copy of this thread today :)
> allowing apps to decide for their own handling of signals
> even/especially for real-time threads is needed for them to properly
> perform cleanup actions and so on.
> To this end, 1) the kick handler (wired to Linux's signal_wake_up())
> unblocks any signaled shadow that happens to be sleeping; 2) the nucleus
> detects that a shadow has been unblocked upon return from a Xenomai
> syscall, and attempts to setup a restart condition conforming to the
> Linux convention when applicable (see request_syscall_restart()'s
> handling of ERESTARTSYS). The latter includes relaxing the unblocked
> shadow so that the signal handlers or default actions could be run in
> the proper context.
I see - But what happens to hardened linux tasks who just working in
RT-userspace? A reschedule 'only'?
---------------<xnshadow_kick_process>---------------------
if (thread == thread->sched->runthread)
xnsched_set_resched(thread->sched);
[...]
xnpod_schedule();
-----------------------------------------------------------
They don't get the XNKICKED flag set...AFAICS in the nucleus scheduler
there isn't a test for signals_pending() - At least no test for
linux-signals, only for xenomai or are both connected in a way I've
overlooked? When will the threads in this state be relaxed?
Marc
--
#!/bin/sh
set - `type $0` 'tr "[a-zA-Z]" "[n-za-mN-ZA-M]"';while [ "$2" != "" ];do \
shift;done; echo 'frq -a -rc '`echo "$0"| $1 `'>$UBZR/.`rpub signature|'`\
echo $1|$1`'`;rpub "Jr ner fvtangher bs obet. Erfvfgnapr vf shgvyr!"'|$1|sh