This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Dangerous method: Cyg_SchedulerImplementation::set_idle_thread(Cyg_Thread* thread)?
- From: Bart Veer <bartv at ecoscentric dot com>
- To: fabian dot scheler at gmail dot com
- Cc: ecos-discuss at ecos dot sourceware dot org
- Date: Sat, 11 Jun 2005 14:22:34 +0100 (BST)
- Subject: Re: [ECOS] Dangerous method: Cyg_SchedulerImplementation::set_idle_thread(Cyg_Thread* thread)?
- References: <69dd805e050610140534b5250c@mail.gmail.com>
>>>>> "Fabian" == Fabian Scheler <fabian.scheler@gmail.com> writes:
Fabian> maybe I've just not read carefully enough through the
Fabian> source code of eCos, but two methods appear a bit
Fabian> hazardous to me. These are the implementations of the
Fabian> method
Fabian> Cyg_SchedulerImplementation::set_idle_thread(Cyg_Thread* thread)
Fabian> within the Multi-Level-Queue- and the Bitmap-Scheduler. In
Fabian> both cases these methods set the current thread to the
Fabian> thread given as parameter, at least for single processor
Fabian> systems, but this assumption only holds at system startup
Fabian> in general when no other thread is running. Moreover these
Fabian> methods are public, so the user can change the current
Fabian> idle thread during runtime, and thus, mess up the pointer
Fabian> to the current thread.
This function is not part of the exported API: there is no C
equivalent in kapi.h, nor is there any documentation. It is intended
only for use within the kernel, and only gets used during system
initialization.
Bart
--
Bart Veer eCos Configuration Architect
http://www.ecoscentric.com/ The eCos and RedBoot experts
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss