avr-libc-dev
[Top][All Lists]
Advanced

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

Re: [avr-libc-dev] Can main be interrupt or signal?


From: Björn Haase
Subject: Re: [avr-libc-dev] Can main be interrupt or signal?
Date: Sun, 13 Feb 2005 22:03:37 +0100
User-agent: KMail/1.7.1

> > From: Andy Hutchinson <address@hidden>
> >
> > I'm just reviewing gcc prolog code.
> >
> > Is it "legal" to allow or want  "main" to be an "interrupt" or "signal"
> > functiom.
IMHO it is not useful to declare main to carry the attribute signal or 
interrupt. The way interrupts work presently is to declare functions that 
carry the name __vector01 or similar. If functions with this name are 
declared, they override the weak symbols of the .crt object files that point 
to a default IRQ function.
Since main is supposed to be named "main" one would need to violate gcc in 
order to make shure that main could be called by calling vectorXX().

IIUC you could safely assume that main does not carry the interrupt or signal 
attributes.

Yours,

Björn




reply via email to

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