This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: question about "Cyg_Scheduler" class.


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




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]