[Top][All Lists]

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

Re: [avr-gcc-list] SIGNAL or INTERRUPT ?!

From: Joerg Wunsch
Subject: Re: [avr-gcc-list] SIGNAL or INTERRUPT ?!
Date: Sun, 4 Sep 2005 21:22:08 +0200
User-agent: Mutt/

As Royce Pereira wrote:

> Just asking - why not have the 2nd case i.e SIG_XXX(void) convention
> for both cases - one case with the 'interrupt' attribute and one
> without?

If you'd use __attribute__((signal)), that's just it: SIGNAL() is only
a helper macro that shortcuts the function declaration for you.  Just
look at its implementation.

For the rare cases where __attribute__((interrupt)) is really needed,
we'll eventually require users to manually do it that way, without any
shortcut macro.  Of course, as it used to be with cbi and sbi, they
could always roll their own INTERRUPT() macro then, but still, they're
doing it deliberately, so they ought to know what they're doing.  The
problem with the INTERRUPT() macro wasn't such a macro existing at
all, but rather it's name being a poor choice for the innocent.

cheers, J"org               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/                        NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)

reply via email to

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