avr-gcc-list
[Top][All Lists]
Advanced

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

RE: [avr-gcc-list] Re: [patch #6004] "main-as-normal" patches for GCC


From: Weddington, Eric
Subject: RE: [avr-gcc-list] Re: [patch #6004] "main-as-normal" patches for GCC
Date: Mon, 2 Jun 2008 12:13:54 -0600

 

> -----Original Message-----
> From: 
> address@hidden 
> [mailto:address@hidden
> org] On Behalf Of Rolf Ebert
> Sent: Monday, June 02, 2008 11:56 AM
> To: 'AVR-GCC'
> Subject: [avr-gcc-list] Re: [patch #6004] "main-as-normal" 
> patches for GCC
> 
> Anatoly Sokolov schrieb in avr-libc-devel:
> 
> > The 'OS_main' attribute added in GCC 4.4.
> > The 'OS_main' patch for GCC 4.3 and 4.2 stored on WinAVR project SVN
> > repository.
> 
> Is there some documentation out there about the effect of all the AVR 
> specific attributes?  I'd like to understand the puposes and 
> (generated 
> code) consequences of
> 
> OS_main
> OS_task
> naked
> 

Hi Rolf,

Currently there isn't documentation for OS_main and OS_task function
attributes. Anatoly has left that up to me to write up and submit.

The 'naked' function attribute is documented in the GCC User Manual
(4.3.0):
<http://gcc.gnu.org/onlinedocs/gcc-4.3.0/gcc/Function-Attributes.html#Fu
nction-Attributes>

IIRC, the main thing with the OS_main and OS_task function attributes is
that they cause those functions to not save any of the "call-saved"
registers.

OS_main will have a guarantee that interrupts are disabled before
entering the function. OS_task will NOT have a guarantee that interrupts
are disabled.

The OS_main and OS_task attributes are mainly used for RTOSes, for the
main() function and task functions respectively. However, OS_main can be
useful in an application's main() function that does not have an RTOS,
as it will reduce the code size slightly.

Suggestions welcome for the future documentation of these attributes.

HTH,
Eric




reply via email to

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