[ECOS] ecos idle function

Milind Kopikare milindkopi@yahoo.com
Thu Jan 16 20:14:00 GMT 2003


Hi,
   this question has been posted before but I didn't
quite get the answer. 
    In eCos, Andrew Lunn's code should work if in idle
time we shift to the idle_thread_main function in
thread.cxx. But, whenever the processor is idling, the
code dosent jump there. For want of other tasks to do,
the processor hangs. i have got around this by
creating my own idle task function in my code which
takes over whenever nothing else is going on. but
would appericiate if someone could fill me in on how
ecos idle functions can get activated. is there any
particular variable I would need to define to start
this idle task?  
     
thanks,
Milind


Re: idle thread
From: Jonathan Larmour <jlarmour at redhat dot com> 
To: Andrea Acquaviva <aacquaviva at deis dot unibo dot
it> 
Cc: Andrew Lunn <andrew dot lunn at ascom dot
ch>,"ecos-discuss at sources dot redhat dot com"
<ecos-discuss at sources dot redhat dot com> 
Date: Wed, 30 Jan 2002 00:05:53 +0000 
Subject: Re: [ECOS]idle thread 
References: <3C4D5834.37033644@deis.unibo.it>
<20020122143341.B24432@biferten.ma.tech.ascom.ch>
<3C570EC8.7E14BF60@deis.unibo.it> 

--------------------------------------------------------------------------------

Andrea Acquaviva wrote:
> For example, if a thread is waiting for a blocking
I/O device to fill the
> input buffer, the driver should put the thread into
idle state until an
> interrupt arrives.
> How can I do this with ecos? When do the scheduler
decide to switch to idle
> thread?

When there are no other runnable threads to switch to.

Drivers most often block by using some kernel
synchronization primitive
like a mutex, condition variable or semaphore.

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK.
Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous
Huxley || Opinions==mine




__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss



More information about the Ecos-discuss mailing list