This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How to know whether currently there is any thread readyto run?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]