On Tue, 2004-08-03 at 19:37, Marc Kleine-Budde wrote:
> On Tue, Aug 03, 2004 at 06:56:10PM +0200, Marc Kleine-Budde wrote:
> > > > .faulthandler = if a trap is rised by the cpu, and a xnthread is active
> > > Yes, but a thread is not necessarily active at that moment. The handler
> > > should take care of identifying the faulting context.
> >
> > Hmm - After winding though about 4-5 layers[1]....this function calls
> > the svctable.faulthandler, only if a xnthread is active.
> >
> > int xnpod_trap_fault (void *fltinfo)
> >
> > {
> > if (nkpod == NULL || xnpod_idle_p())
> > return 0;
> >
> > return nkpod->svctable.faulthandler(fltinfo);
> > }
>
> Can one rely upon that (in future versions) the svctable.faulthandler is
> only called if a xnthread is active?
>
No, faults over ISRs must be passed too. Just use the
xnpod_interrupt_p() predicate to identify such context; false would mean
"RT thread", for sure.
> Marc
--
Philippe.