[ECOS] How to know if scheduler has started?

Grant Edwards grante@visi.com
Wed Sep 17 14:49:00 GMT 2003


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



More information about the Ecos-discuss mailing list