public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] question about "Cyg_Scheduler" class.
@ 2001-07-20 20:36 Tony Ko
  2001-07-23  1:51 ` Rafael Rodríguez Velilla
  2001-07-23  4:39 ` Rafael Rodríguez Velilla
  0 siblings, 2 replies; 3+ messages in thread
From: Tony Ko @ 2001-07-20 20:36 UTC (permalink / raw)
  To: ecos-discuss

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?

thanks in advance.

Tony.



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [ECOS] question about "Cyg_Scheduler" class.
  2001-07-20 20:36 [ECOS] question about "Cyg_Scheduler" class Tony Ko
@ 2001-07-23  1:51 ` Rafael Rodríguez Velilla
  2001-07-23  4:39 ` Rafael Rodríguez Velilla
  1 sibling, 0 replies; 3+ messages in thread
From: Rafael Rodríguez Velilla @ 2001-07-23  1:51 UTC (permalink / raw)
  To: ecos

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 778 bytes --]

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [ECOS] question about "Cyg_Scheduler" class.
  2001-07-20 20:36 [ECOS] question about "Cyg_Scheduler" class Tony Ko
  2001-07-23  1:51 ` Rafael Rodríguez Velilla
@ 2001-07-23  4:39 ` Rafael Rodríguez Velilla
  1 sibling, 0 replies; 3+ messages in thread
From: Rafael Rodríguez Velilla @ 2001-07-23  4:39 UTC (permalink / raw)
  To: ecos

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 780 bytes --]

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



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-07-23  4:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-20 20:36 [ECOS] question about "Cyg_Scheduler" class Tony Ko
2001-07-23  1:51 ` Rafael Rodríguez Velilla
2001-07-23  4:39 ` Rafael Rodríguez Velilla

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).