[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] avr-libc: interrupt.h, ISR and ISR_NOBLOCK

From: Georg-Johann Lay
Subject: Re: [avr-gcc-list] avr-libc: interrupt.h, ISR and ISR_NOBLOCK
Date: Fri, 04 May 2012 22:39:28 +0200
User-agent: Thunderbird (Windows/20100228)

Joerg Wunsch schrieb:
Georg-Johann Lay <address@hidden> wrote:

I just don't see a trick how to add "signal" only if NO_INTERRUPT
is not specified.

Neither do I.

The compiler could be changed to handle it, of course.
But I am no fan of trying to support mutually exclusive/contradicting

One hack would be that "interrupt" overrides/is stronger than "signal" and likewise for OS_task/OS_main.

I wonder whether we should just keep the old "interrupt" and "signal"
attributes for historical backwards compatibility, and invent new
ones, like:

__attribute__((isr))  -- this function implements an ISR (needs
                         RETI, must guarantee to completely save
__attribute__((interruptible)) -- this function is supposed to also
                                  have the "isr" attribute, but it
                                  is asked to re-enable interrupts
                                  as soon as possible

These names would be a lot clearer.

No, the clearest names are qkrdxzhj and qhzdrxkj, and perhaps qhzkxrdj and qrkzdhxj as supplement.

All the ISR() stuff and deprecation if SIGNAL and INTERRUPT was -- if
I understand you correctly -- because users did not read the docs
and instead tried to deduce the semantics of the above attributes from
their identifier name.

This, if there are new attributes or defines, the best will be /not/ use
identifiers that might give raise to any false conclusions and force to
read their documentation.

And having 2^6 or even more combinations of attributes, some reasonable,
some questionable, some contradicting, some contradicting but fixed for
historical reasons as they were abused by AVR-LibC?


The old "interrupt" attribute
would be equivalent to "isr, interruptible", while the old "signal"
one is the same as "isr" (except "signal" was never supposed to be
accompanied by "interrupt").

reply via email to

[Prev in Thread] Current Thread [Next in Thread]