Why _ThreadProcessSignalsFromIrq() in new exception processing?
Sergei Organov
osv at javad.ru
Fri Feb 7 17:56:04 UTC 2003
Joel Sherrill <joel.sherrill at OARcorp.com> writes:
> Sergei Organov wrote:
> >
> > Valette Eric <eric.valette at free.fr> writes:
> > > Sergei Organov wrote:
> > > > Could somebody please explain what is the purpose of call to
> > > > _ThreadProcessSignalsFromIrq() in the new-exception-processing from
> > > > the shared_raw_irq_code_entry? Should it be implemented in the old
> > > > exception processing for proper RTEMS behavior?
> > >
> > > I guess, you will not get fully working posix signaling without doing
> > > this (look at pthreadkill or signalsend). This block of code is used to
> > > trigger a processing on the newly switched thread that end up calling
> > > _API_extensions_Run_postswitch.
> >
> > "Guess" is better than nothing :-) Does it mean I'm OK even without the
> > call if I don't use pthreads?
>
> No. Eric's description was correct but it is also be accounting
> Classic API signals. And POSIX signals can be sent to Classic tasks.
> There are in fact the mechanism used to implement Ada interrupts and
> this path is critical for handling FPU exceptions in Ada.
I'm lost. Please see below.
>
> > > NB : The code was already there on ix86 when I implemented the new
> > > exception model I just keeped it. When going to PPC, the call was
> > > missing so I added it.
> >
> > So maybe those one who wrote it initially for ix86 will comment more...
>
> I'm commenting on the general use of the single boolean variable that is
> set to indicate that a signal has been sent to the currently executing
> thread.
Now I'm totally lost. I'm looking at 20020807 snapshot now. The boolean
variable exists and is used in all the BSPs and old/new variants. That's not a
problem. There are, however, three BSPs that use it differently than others.
These BSPs are: arm, i386, powerpc/new_exception_processing.
Please take a look, for example, into
c/src/lib/libbsp/powerpc/shared/irq/irq_asm.S
and
c/src/lib/libbsp/powerpc/shared/irq/irq.c
Search for _ThreadProcessSignalsFromIrq there.
If you are saying that this handling is the only correct, then all other BSPs
are broken?! I can't believe that, so the initial question remains (refer to
the beginning of citations above).
--
Sergei.
More information about the users
mailing list