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]

How to know if scheduler has started?


How does driver or application code know if the scheduler has
been started?

I've been asked that by several customers who need to be able
to write functions that can be called from either the
cyg_user_start() context or from a thread contex, and I've
never been able to come up with an answer.

It looks like (Scheduler::current_thread != NULL) may be one
way in older versions of eCos -- but I can't find the
equivalent in 2.0 code.  Anyway, I was hoping there'd be
something kapi.h that could be called.

Can cyg_thread_self() be used to determine if the scheduler has
been started?  I've been looking at the eCos sources, but
haven't been able to figure out how cyg_thread_self() works,
since I can't find the implimentation of the self() method for
Cyg_Thread.  Where is it?

-- 
Grant Edwards
grante@visi.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


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