This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Dangerous method: Cyg_SchedulerImplementation::set_idle_thread(Cyg_Thread* thread)?
- From: Fabian Scheler <fabian dot scheler at gmail dot com>
- To: ecos-discuss at ecos dot sourceware dot org
- Date: Fri, 10 Jun 2005 23:05:43 +0200
- Subject: [ECOS] Dangerous method: Cyg_SchedulerImplementation::set_idle_thread(Cyg_Thread* thread)?
- Reply-to: Fabian Scheler <fabian dot scheler at gmail dot com>
Hello,
maybe I've just not read carefully enough through the source code of
eCos, but two methods appear a bit hazardous to me. These are the
implementations of the method
Cyg_SchedulerImplementation::set_idle_thread(Cyg_Thread* thread)
within the Multi-Level-Queue- and the Bitmap-Scheduler. In both cases
these methods set the current thread to the thread given as parameter,
at least for single processor systems, but this assumption only holds
at system startup in general when no other thread is running. Moreover
these methods are public, so the user can change the current idle
thread during runtime, and thus, mess up the pointer to the current
thread.
Ciao, Fabian
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss