[Python-Dev] Issue #8863 adds a new?PYTHONNOFAULTHANDLER?environment variable

"Martin v. Löwis" martin at v.loewis.de
Thu Dec 23 19:57:21 CET 2010


> Horrible or not, the existence of __attribute__(signal) seems to
> indicate that this is the case on some platform, or at least was
> historically.

The signal attribute has an effect only on ATMEL AVR processors,
according to the documentation (and according to my source grep).
On other processors, gcc typically implements
__attribute__((interrupt)), meaning that the function is an interrupt
handler - something that you cannot express in regular C. This may
involve re-enabling interrupts on entry, but may also involve other
code generation aspects (such as using iret instead of ret on x86).

For AVR, there was apparently some compatibility issue, introducing
the need for two different ways to declare an ISR:
__attribute__((interrupt)) causes interrupts to be re-enabled on
entry (using the "sei" instruction); __attribute__((signal)) keeps
them disabled.

So this has nothing to do with Unix signals.

Regards,
Martin


More information about the Python-Dev mailing list