This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: How to know whether currently there is any thread readyto run?
- From: Jonathan Larmour <jifl at eCosCentric dot com>
- To: Young Jay <young_jay at sohu dot com>
- Cc: ecos-discuss at sources dot redhat dot com
- Date: Thu, 04 Mar 2004 01:52:27 +0000
- Subject: Re: [ECOS] How to know whether currently there is any thread readyto run?
- References: <199867.1078302763981.JavaMail.postfix@mx28.mail.sohu.com>
Young Jay wrote:
> Hello, all:
>
> In my design, when performing the real time clock interrupt ISR, I'd
> like to know if there is any thread just getting ready to run after a
> time delay. Thus I can decide whether the system power mode should be
> changed. Is there a function designed for this need? Thanks a lot for
> you concern.
Sort of. After the clock *D*SR runs, possibly by editting interrupt_end
before the scheduler unlock, you can compare the handle returned against
the idle thread, e.g. by testing cyg_thread_get_priority( cyg_thread_self()
) == 31.
Jifl
--
eCosCentric http://www.eCosCentric.com/ The eCos and RedBoot experts
>>>>> Visit us in booth 2527 at the Embedded Systems Conference 2004 <<<<<
March 30 - April 1, San Francisco http://www.esconline.com/electronicaUSA/
--["No sense being pessimistic, it wouldn't work anyway"]-- Opinions==mine
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss