[ECOS] question about "Cyg_Scheduler" class.

Rafael Rodríguez Velilla rrv@tid.es
Mon Jul 23 01:51:00 GMT 2001


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



More information about the Ecos-discuss mailing list