From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rafael Rodríguez Velilla To: ecos Subject: Re: [ECOS] question about "Cyg_Scheduler" class. Date: Mon, 23 Jul 2001 04:39:00 -0000 Message-id: <3B5BDB7B.47C68475@tid.es> References: <9860C773D04D834D83FD6FAD00A61E930F2034@gctsemi.gctsemi.com> X-SW-Source: 2001-07/msg00683.html 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