This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: question about "Cyg_Scheduler" class.
- To: ecos <ecos-discuss at sourceware dot cygnus dot com>
- Subject: Re: [ECOS] question about "Cyg_Scheduler" class.
- From: Rafael Rodríguez Velilla <rrv at tid dot es>
- Date: Mon, 23 Jul 2001 10:08:27 +0200
- Organization: Telefónica I+D
- References: <9860C773D04D834D83FD6FAD00A61E930F2034@gctsemi.gctsemi.com>
Tony Ko wrote:
> hi.
> Cyg_Scheduler has a member fuction named start( ).
>
> // Start execution of the scheduler
> static void start() __attribute__ ((noreturn));
> above sentense shows that.
> but I don't know the meaning of "__attribute__ ((noreturn))".
> so could you tell me what this is for?
That attribute tells gcc that when you invoque that member function
you expect that it will never return from it, so the compiler can do
some optimisations (it doesn't have to save the context of the calling
function).
Once the scheduler is started it gives the control of the CPU to the
threads and never finishes ... is a non return function.
--
Rafael Rodríguez Velilla rrv@tid.es
Telefónica I+D http://www.tid.es
Telf: +34 - 91 337 4270